//
//  Manager.h
//  gaotingshan
//
//  Created by Mac Book DQ02 on 16/6/12.
//  Copyright © 2016年 Xu Mengzhu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FileDownloadTool.h"
#import "MyMD5.h"
#import "Singleton.h"
#import "HomePageViewController.h"
#import "AttractionDetailController.h"
#import <AlipaySDK/AlipaySDK.h>

static AFHTTPSessionManager *sessionManager = nil;

typedef void (^modelBlock)(NSArray *modelArr);//回调查询的景点数组
typedef void (^attributeBlock)(NSDictionary *attributes);

@interface Manager : NSObject

+(AFHTTPSessionManager *)initSessionManager;//获取同一个manager对象

+(void)startNoticeInternetStatus;//开启网络状态监听
+(BOOL)setNetStatusOnView:(UIView *)view;//在网络请求页面，设置无网络的视图提示

+(void)loginRequestWithUsernameAndPassword;//用于自动登录的网络请求

+(BOOL)checkTelNumber:(NSString*)telNumber;//判断手机号码合法性

+(void)upoadLocationToServer:(CLLocation *)location;//上传坐标到服务器

+(void)collectionBtnClicked:(UIViewController *)vc andAreaId:(NSString *)areaId;//收藏按钮点击事件
+(void)requestForCollection:(UIViewController *)vc andAreaId:(NSString *)areaId;//收藏的请求函数

//新浪微博分享事件

+(void)shareToWXTimeLine:(NSString *)sender;

+(void)spotDetailMapClicked:(UIViewController *)vc andName:(NSString *)spotName andCode:(NSString *)thCode;//点击景点详情地图的时候，触发的事件
+(NSArray *)graphicArrByAttracModelArr:(NSArray *)modelArr   andType:(NSString *)type;//根据model数组，得到graphic，在地图底图上显示景点名字,或者停车场数组
+(NSArray *)spotsGraphicArrWithModelArr:(NSArray *)modelArr; //根据model数组，获取graphic数组
+(void)getInformationForType:(NSDictionary *)parameter andBlock:(modelBlock)block;//根据搜索条件，获取model数组

//设置导航栏的文本的偏好属性（景点导航栏透明设置）
+(void)setNaviAttributesWithBlo:(attributeBlock)attrBlock;

//设置导航栏的背景图和文字偏好属性，（基本设置）
+(void)setNavi:(UINavigationBar *)bar;

//删除括号里面的内容
+(NSString *)deleteCharactersInBrackets:(NSString *)originStr;

+(NSArray *)relayModelArrByJsonFile;//中继model数组获得

+(UIWebView *)screenFrameWebview;//设置全屏的webview

+(void)alipayRequest:(NSDictionary *)parameter orderSpec:(NSString *)orderSpec flag:(int)aliFlag;//拼装好的订单，发送支付请求

//+(NSArray *)setNaviRightItemsOnView:(id)vc andAction:(SEL)action;
//+(UIBarButtonItem *)rightItemTarget:(id)target img:(NSString *)imgName tag:(int)tag action:(SEL)action ;
//+(NSArray *)setNaviRight:(id)vc andAction:(SEL)action;//设置导航栏右边分享和收藏按钮

@end
