BaseViewController.h 4.13 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10 11
//
//  BaseViewController.h
//  Lighting
//
//  Created by 曹云霄 on 16/4/27.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>


12
@class ResellerViewController;
13

14
@interface BaseViewController : UIViewController
15 16


曹云霄's avatar
曹云霄 committed
17 18 19 20 21 22 23
/**
 *  结束刷新
 *
 *  @param TableView Tableview
 */
- (void)endRefreshingForTableView:(UIScrollView *)TableView;

24

25 26 27 28 29
/**
 完善导购个人信息
 */
- (void)perfectGuideInformation;

30 31 32
/**
 完善导购经销商信息
 */
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
- (void)perfectResellerInformation:(void(^)(ResellerViewController *resellerVc))completed;

/**
 通过经销商ID获取省市区
 */
- (void)getStoreAddress:(void(^)())completed;

/**
 直辖市处理

 @param province 省
 @param city 市
 @param country 区
 @param address 详细地址
 */
+ (NSString *)isMunicipality:(NSString *)province withCity:(NSString *)city withCountry:(NSString *)country withDetailAddress:(NSString *)address;
49

曹云霄's avatar
曹云霄 committed
50 51 52 53
/**
 完善门店位置信息
 */
- (void)perfectStoreLocationInformation;
54

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
/**
 *  获得主体的storyboard对象
 */
+ (UIStoryboard *)getMainStoryboardClass;

/**
 获得公告storyboard对象
 */
+ (UIStoryboard *)getAnnouncementStoryboardClass;

/**
 获得学习中心storyboard对象
 */
+ (UIStoryboard *)getLearningCenterStoryboardClass;

曹云霄's avatar
曹云霄 committed
70
/**
71
 获得积分storyboard对象
曹云霄's avatar
曹云霄 committed
72
 */
73
+ (UIStoryboard *)getGuideIntegralStoryboardClass;
曹云霄's avatar
曹云霄 committed
74 75 76 77

/**
 *  调用打印机
 */
曹云霄's avatar
曹云霄 committed
78
- (void)callAirprintWithdata:(NSString *)PDFpath successBlock:(void(^)())success errorBlock:(void(^)())failed;
曹云霄's avatar
曹云霄 committed
79

80 81 82 83
/**
 *  判断是否有相机权限
 */
+ (BOOL)determineCameraPermissions;
曹云霄's avatar
曹云霄 committed
84

85 86 87 88 89
/**
 *  判断是否有相册权限
 */
+ (BOOL)determinePhotosPermissions;

勾芒's avatar
勾芒 committed
90 91 92 93

/**
 *  查询订单状态图片
 */
94
+ (UIImage *)returnOrderStateImageWithStateCode:(NSInteger)ordercode;
勾芒's avatar
勾芒 committed
95 96 97 98

/**
 *  查询订单状态文本      //code == 0 取文字  code == 1取颜色
 */
曹云霄's avatar
曹云霄 committed
99
+ (id)returnOrderStateTitleWithStateCode:(NSInteger)ordercode withPoint:(CGPoint)point withCode:(NSInteger)code;
勾芒's avatar
勾芒 committed
100

勾芒's avatar
勾芒 committed
101 102 103
/**
 *  查询购物车数量
 */
104
- (void)queryShoppingCarNumber;
曹云霄's avatar
曹云霄 committed
105

106 107 108 109 110
/**
 *  查询购物车商品
 */
- (void)queryShoppingCarGoods;

111 112 113 114
/**
 *  获取版本号
 */
- (NSString*)getAppVersion;
115

116 117 118 119 120 121 122 123 124 125
/**
 *  通过面额获取相应的图片
 */
+ (UIImage *)getCorrespondingPictures:(NSInteger)total;

/**
 *  判断字符串是否为空
 */
+ (BOOL)isBlankString:(NSString *)string;

126 127 128 129 130 131 132 133 134 135
/**
 *  获取当前时间之前或者之后的时间(之前传入负数)
 */
+ (NSString *)getTimeby:(NSInteger)day;

/**
 查询兑奖单state对应文字
 */
+ (id)returnPrizeBillStateTitleColor:(NSString *)stateCode;

136

曹云霄's avatar
曹云霄 committed
137 138 139 140 141 142 143 144
/**
 格式化时间字符串
 
 @param dateString 时间字符串
 @return 中文标示
 */
+ (NSString *)formateDate:(NSString *)dateString;

145 146 147 148 149 150 151 152 153
/**
 提现申请状态

 @param text 状态码

 @return 字体颜色、文本
 */
+ (NSDictionary *)setupLabelColor:(NSString *)text;

曹云霄's avatar
曹云霄 committed
154 155 156 157 158 159 160 161
/**
 收支明细

 @param number 金额
 @param type   类型
 */
+ (NSString *)separatePaymentsAndWithfrawal:(NSNumber *)number withType:(NSString *)type;

162 163 164 165 166
/**
 考核题型转义
 */
+ (NSString *)returnTopicTypeTitle:(NSString *)typeCode;

167

168 169 170 171 172 173 174
/**
 闯关结果状态

 @param passResult 闯关结果

 @return 状态图片
 */
175
+ (UIImage *)emigratedState:(NSString *)passResult;
176

177

178 179 180 181 182 183 184 185 186 187 188 189 190
/**
 保存用户名密码

 @param account  用户名
 @param passWord 密码
 */
+ (void)saveAccountAndPassWord:(NSString *)account AndPassword:(NSString *)passWord;

/**
 删除用户名密码
 */
+ (void)deleteAccountAndPassWord;

191 192 193 194 195 196 197
/**
 比较时间大小

 @param dateString 时间字符串

 @return 是否比当前时间大
 */
198
- (int)compareOneDay:(NSDate *)oneDay withAnotherDay:(NSDate *)anotherDay;
199 200


201 202 203 204 205 206 207
/**
 转换秒钟
 
 @param totalSeconds 秒数
 
 */
- (NSString *)timeFormatted:(NSInteger)totalSeconds;
208

曹云霄's avatar
曹云霄 committed
209 210
/**
 url转码
211

曹云霄's avatar
曹云霄 committed
212 213 214
 @param ChineseString 带中文的字符串
 */
- (NSString *)returnUrlString:(NSString *)ChineseString;
215 216


曹云霄's avatar
曹云霄 committed
217 218 219 220 221 222 223
/**
 UIPopoverPresentationController弹出框

 @param viewController 需要弹出的控制器
 @param size size
 @param barbuttonitem 箭头按钮
 */
224
- (void)popoverPresentationController:(UIViewController *)viewController withPreferredContentSize:(CGSize)size  withBarButtonItem:(UIBarButtonItem *)barbuttonitem;
曹云霄's avatar
曹云霄 committed
225 226 227 228 229 230 231 232 233 234 235 236 237 238














曹云霄's avatar
曹云霄 committed
239
@end