Commit 0a4eaeb4ca67b9f775699d253b110e012a0bb854

Authored by yanglingyu
1 parent 226254fe

更改交互问题

CNLiveCServiceModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveCServiceModule' 10 s.name = 'CNLiveCServiceModule'
11 - s.version = '0.0.2' 11 + s.version = '0.0.3'
12 s.summary = '我的服务内容' 12 s.summary = '我的服务内容'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveCServiceModule/Classes/Category/UIImage+CNBundleOrGredient.h
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
13 13
14 // 创建一张渐变色图片 14 // 创建一张渐变色图片
15 + (UIImage *)gradientImageWithColors:(NSArray *)colors rect:(CGRect)rect; 15 + (UIImage *)gradientImageWithColors:(NSArray *)colors rect:(CGRect)rect;
16 -+(UIImage *)loadBundleImage:(NSString *)imageName; 16 ++(UIImage *)loadCServiceBundle:(NSString *)imageName;
17 17
18 @end 18 @end
19 19
CNLiveCServiceModule/Classes/Category/UIImage+CNBundleOrGredient.m
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 #import "UIImage+CNBundleOrGredient.h" 8 #import "UIImage+CNBundleOrGredient.h"
9 9
10 @implementation UIImage (CNBundleOrGredient) 10 @implementation UIImage (CNBundleOrGredient)
11 -+(UIImage *)loadBundleImage:(NSString *)imageName 11 ++(UIImage *)loadCServiceBundle:(NSString *)imageName
12 { 12 {
13 NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"CNLiveServiceVC")]; 13 NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"CNLiveServiceVC")];
14 NSURL *url = [bundle URLForResource:@"CNServiceBundle" withExtension:@"bundle"]; 14 NSURL *url = [bundle URLForResource:@"CNServiceBundle" withExtension:@"bundle"];
CNLiveCServiceModule/Classes/Manager/CNLiveCServiceManagerBridge.m
@@ -34,17 +34,17 @@ @@ -34,17 +34,17 @@
34 } 34 }
35 + (void)jumpServiceType:(CNCServiceJumpType)jumpType service:(NSString *)serviceId type:(NSString *)type to:(NSString *)to shopType:(NSString *)shopType controller:(UIViewController *)controller{ 35 + (void)jumpServiceType:(CNCServiceJumpType)jumpType service:(NSString *)serviceId type:(NSString *)type to:(NSString *)to shopType:(NSString *)shopType controller:(UIViewController *)controller{
36 NSDictionary *param = @{ 36 NSDictionary *param = @{
37 - @"serviceId":serviceId,  
38 - @"type":type,  
39 - @"to":to,  
40 - @"shopType":shopType, 37 + @"serviceId":serviceId?serviceId:@"",
  38 + @"type":type?type:@"",
  39 + @"to":to?to:@"",
  40 + @"shopType":shopType?shopType:@"",
41 }; 41 };
42 [CNLiveCServiceManagerBridge jumpViewControllerType:jumpType param:param controller:controller]; 42 [CNLiveCServiceManagerBridge jumpViewControllerType:jumpType param:param controller:controller];
43 } 43 }
44 + (void)jumpGoodsViewController:(NSString *)goodsId controller:(UIViewController *)controller 44 + (void)jumpGoodsViewController:(NSString *)goodsId controller:(UIViewController *)controller
45 { 45 {
46 NSDictionary *param = @{ 46 NSDictionary *param = @{
47 - @"goodsId":goodsId, 47 + @"goodsId":goodsId?goodsId:@"",
48 }; 48 };
49 [CNLiveCServiceManagerBridge jumpViewControllerType:CNCServiceJumpTypeGoods param:param controller:controller]; 49 [CNLiveCServiceManagerBridge jumpViewControllerType:CNCServiceJumpTypeGoods param:param controller:controller];
50 } 50 }
@@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
60 60
61 + (void)jumpWebVCWithUrl:(NSString *)urlStr controller:(UIViewController *)controller{ 61 + (void)jumpWebVCWithUrl:(NSString *)urlStr controller:(UIViewController *)controller{
62 NSDictionary *param = @{ 62 NSDictionary *param = @{
63 - @"webUrl":urlStr, 63 + @"webUrl":urlStr?urlStr:@"",
64 }; 64 };
65 [CNLiveCServiceManagerBridge jumpViewControllerType:CNCServiceJumpTypeWebVC param:param controller:controller]; 65 [CNLiveCServiceManagerBridge jumpViewControllerType:CNCServiceJumpTypeWebVC param:param controller:controller];
66 } 66 }
CNLiveCServiceModule/Classes/Present/CNLiveServicePresent.m
@@ -17,7 +17,7 @@ static const CGFloat margin = 15; @@ -17,7 +17,7 @@ static const CGFloat margin = 15;
17 @"sid":CNUserShareModelUid?CNUserShareModelUid:@"", 17 @"sid":CNUserShareModelUid?CNUserShareModelUid:@"",
18 @"title":searchStr?searchStr:@"", 18 @"title":searchStr?searchStr:@"",
19 @"type":@"1", 19 @"type":@"1",
20 - @"page":page, 20 + @"page":page?page:@"",
21 @"pageSize":@"10" 21 @"pageSize":@"10"
22 }; 22 };
23 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 23 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
@@ -42,6 +42,7 @@ static const CGFloat margin = 15; @@ -42,6 +42,7 @@ static const CGFloat margin = 15;
42 } 42 }
43 } 43 }
44 }else{ 44 }else{
  45 + [QMUITips showError:error.localizedDescription inView:AppKeyWindow hideAfterDelay:3];
45 !failure?:failure(); 46 !failure?:failure();
46 } 47 }
47 }]; 48 }];
@@ -155,6 +156,7 @@ static const CGFloat margin = 15; @@ -155,6 +156,7 @@ static const CGFloat margin = 15;
155 if (model) { 156 if (model) {
156 !result?:result(dataArray.copy,model.hots); 157 !result?:result(dataArray.copy,model.hots);
157 }else{ 158 }else{
  159 + [QMUITips showError:error.localizedDescription inView:AppKeyWindow hideAfterDelay:3];
158 !failure?:failure(); 160 !failure?:failure();
159 } 161 }
160 }]; 162 }];
@@ -249,6 +251,7 @@ static const CGFloat margin = 15; @@ -249,6 +251,7 @@ static const CGFloat margin = 15;
249 if (array) { 251 if (array) {
250 !result?:result(dataArray.copy); 252 !result?:result(dataArray.copy);
251 }else{ 253 }else{
  254 + [QMUITips showError:error.localizedDescription inView:AppKeyWindow hideAfterDelay:3];
252 !failure?:failure(); 255 !failure?:failure();
253 } 256 }
254 } 257 }
@@ -259,7 +262,7 @@ static const CGFloat margin = 15; @@ -259,7 +262,7 @@ static const CGFloat margin = 15;
259 NSDictionary * params = @{@"sid": CNUserShareModelUid ? CNUserShareModelUid : @"", 262 NSDictionary * params = @{@"sid": CNUserShareModelUid ? CNUserShareModelUid : @"",
260 @"pageSize":@"10", 263 @"pageSize":@"10",
261 @"type":@"2", 264 @"type":@"2",
262 - @"page":page 265 + @"page":page?page:@""
263 266
264 }; 267 };
265 268
@@ -278,6 +281,7 @@ static const CGFloat margin = 15; @@ -278,6 +281,7 @@ static const CGFloat margin = 15;
278 if (model) { 281 if (model) {
279 !succeed?:succeed(array.copy); 282 !succeed?:succeed(array.copy);
280 }else{ 283 }else{
  284 + [QMUITips showError:error.localizedDescription inView:AppKeyWindow hideAfterDelay:3];
281 !failure?:failure(); 285 !failure?:failure();
282 } 286 }
283 287
@@ -305,6 +309,8 @@ static const CGFloat margin = 15; @@ -305,6 +309,8 @@ static const CGFloat margin = 15;
305 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:cn_API_Classify(@"/servingApi/removeMyNewest") Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { 309 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:cn_API_Classify(@"/servingApi/removeMyNewest") Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
306 if (!error) { 310 if (!error) {
307 succeed(); 311 succeed();
  312 + }else{
  313 + [QMUITips showError:error.localizedDescription inView:AppKeyWindow hideAfterDelay:3];
308 } 314 }
309 }]; 315 }];
310 } 316 }
@@ -312,7 +318,7 @@ static const CGFloat margin = 15; @@ -312,7 +318,7 @@ static const CGFloat margin = 15;
312 + (void)loadAllServiceWithServiceId:(NSString *)serviceId page:(nonnull NSString *)page result:(nonnull void (^)(NSArray * _Nonnull, BOOL))succeed error:(void (^)(void))failure 318 + (void)loadAllServiceWithServiceId:(NSString *)serviceId page:(nonnull NSString *)page result:(nonnull void (^)(NSArray * _Nonnull, BOOL))succeed error:(void (^)(void))failure
313 { 319 {
314 NSDictionary * params = @{@"sid": CNUserShareModelUid ? CNUserShareModelUid : @"", 320 NSDictionary * params = @{@"sid": CNUserShareModelUid ? CNUserShareModelUid : @"",
315 - @"categoryId":serviceId 321 + @"categoryId":serviceId?serviceId:@""
316 }; 322 };
317 323
318 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 324 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
@@ -343,6 +349,7 @@ static const CGFloat margin = 15; @@ -343,6 +349,7 @@ static const CGFloat margin = 15;
343 NSString *lastPage = dic[@"isLastPage"]; 349 NSString *lastPage = dic[@"isLastPage"];
344 !succeed?:succeed(array.copy,lastPage.boolValue); 350 !succeed?:succeed(array.copy,lastPage.boolValue);
345 }else{ 351 }else{
  352 + [QMUITips showError:error.localizedDescription inView:AppKeyWindow hideAfterDelay:3];
346 !failure?:failure(); 353 !failure?:failure();
347 } 354 }
348 355
@@ -352,7 +359,7 @@ static const CGFloat margin = 15; @@ -352,7 +359,7 @@ static const CGFloat margin = 15;
352 + (void)loadServiceInfoServiceId:(NSString *)serviceId result:(nonnull void (^)(CNLiveSearchModel * _Nonnull))succeed error:(void(^)(void))failure 359 + (void)loadServiceInfoServiceId:(NSString *)serviceId result:(nonnull void (^)(CNLiveSearchModel * _Nonnull))succeed error:(void(^)(void))failure
353 { 360 {
354 NSDictionary * params = @{@"sid": CNUserShareModelUid ? CNUserShareModelUid : @"", 361 NSDictionary * params = @{@"sid": CNUserShareModelUid ? CNUserShareModelUid : @"",
355 - @"serviceId":serviceId 362 + @"serviceId":serviceId?serviceId:@""
356 }; 363 };
357 364
358 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 365 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
CNLiveCServiceModule/Classes/View/CNLIveCategoryCell.m
@@ -95,7 +95,7 @@ @@ -95,7 +95,7 @@
95 { 95 {
96 if (!_rightImage) { 96 if (!_rightImage) {
97 _rightImage = [[UIImageView alloc] init]; 97 _rightImage = [[UIImageView alloc] init];
98 - [_rightImage setImage:[UIImage loadBundleImage:@"service_right"]]; 98 + [_rightImage setImage:[UIImage loadCServiceBundle:@"service_right"]];
99 } 99 }
100 return _rightImage; 100 return _rightImage;
101 } 101 }
CNLiveCServiceModule/Classes/View/CNLiveCycleCell.m
@@ -50,6 +50,14 @@ static NSString *CNServiceOrLookID = @"CNLiveServiceOrLookCell"; @@ -50,6 +50,14 @@ static NSString *CNServiceOrLookID = @"CNLiveServiceOrLookCell";
50 CNCategoryModel *categoryModel = (CNCategoryModel *)model; 50 CNCategoryModel *categoryModel = (CNCategoryModel *)model;
51 [CNLiveAllServiceVC allServiceVCWithId:categoryModel.id title:categoryModel.title]; 51 [CNLiveAllServiceVC allServiceVCWithId:categoryModel.id title:categoryModel.title];
52 } 52 }
  53 + if ([model isKindOfClass:[CNLiveSearchModel class]]) {
  54 + CNLiveSearchModel *searchModel = (CNLiveSearchModel *)model;
  55 + [CNLiveCServiceManagerBridge jumpServiceController:searchModel.id type:searchModel.type to:searchModel.to shopType:searchModel.shopType controller:[CNLiveCServiceManagerBridge viewControllerFromView:self]];
  56 + }
  57 + if ([model isKindOfClass:[CnLivePageContentModel class]]) {
  58 + CnLivePageContentModel *pageModel = (CnLivePageContentModel *)model;
  59 + [CNLiveCServiceManagerBridge jumpGetPageOtherVC:pageModel.contentId controller:[CNLiveCServiceManagerBridge viewControllerFromView:self]];
  60 + }
53 } 61 }
54 62
55 } 63 }
@@ -77,12 +85,12 @@ static NSString *CNServiceOrLookID = @"CNLiveServiceOrLookCell"; @@ -77,12 +85,12 @@ static NSString *CNServiceOrLookID = @"CNLiveServiceOrLookCell";
77 cell.model = self.dataSource[indexPath.row]; 85 cell.model = self.dataSource[indexPath.row];
78 86
79 }else if (indexPath.row == self.dataSource.count){ 87 }else if (indexPath.row == self.dataSource.count){
80 - [cell.logoView setImage:[UIImage loadBundleImage:@"service_mine"]]; 88 + [cell.logoView setImage:[UIImage loadCServiceBundle:@"service_mine"]];
81 cell.titleLabel.text = @"我的服务"; 89 cell.titleLabel.text = @"我的服务";
82 [cell.titleLabel sizeToFit]; 90 [cell.titleLabel sizeToFit];
83 [cell setNeedsLayout]; 91 [cell setNeedsLayout];
84 }else{ 92 }else{
85 - [cell.logoView setImage:[UIImage loadBundleImage:@"service_more"]]; 93 + [cell.logoView setImage:[UIImage loadCServiceBundle:@"service_more"]];
86 cell.titleLabel.text = @"更多服务"; 94 cell.titleLabel.text = @"更多服务";
87 [cell.titleLabel sizeToFit]; 95 [cell.titleLabel sizeToFit];
88 [cell setNeedsLayout]; 96 [cell setNeedsLayout];
CNLiveCServiceModule/Classes/View/CNLiveGoodsOrVideoHeaderView.m
@@ -92,7 +92,7 @@ @@ -92,7 +92,7 @@
92 { 92 {
93 if (!_LogoImage) { 93 if (!_LogoImage) {
94 _LogoImage = [[UIImageView alloc] init]; 94 _LogoImage = [[UIImageView alloc] init];
95 - [_LogoImage setImage:[UIImage loadBundleImage:@"service_hot"]]; 95 + [_LogoImage setImage:[UIImage loadCServiceBundle:@"service_hot"]];
96 _LogoImage.hidden = YES; 96 _LogoImage.hidden = YES;
97 } 97 }
98 return _LogoImage; 98 return _LogoImage;
@@ -119,7 +119,7 @@ @@ -119,7 +119,7 @@
119 { 119 {
120 if (!_moreBtn) { 120 if (!_moreBtn) {
121 _moreBtn = [QMUIButton buttonWithType:UIButtonTypeCustom]; 121 _moreBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
122 - [_moreBtn setImage:[UIImage loadBundleImage:@"object_more"] forState:UIControlStateNormal]; 122 + [_moreBtn setImage:[UIImage loadCServiceBundle:@"object_more"] forState:UIControlStateNormal];
123 [_moreBtn setTitle:@"更多" forState:UIControlStateNormal]; 123 [_moreBtn setTitle:@"更多" forState:UIControlStateNormal];
124 [_moreBtn setTitleColor:CNLiveColorWithHexString(@"#999695") forState:UIControlStateNormal]; 124 [_moreBtn setTitleColor:CNLiveColorWithHexString(@"#999695") forState:UIControlStateNormal];
125 _moreBtn.titleLabel.font = UIFontMake(12); 125 _moreBtn.titleLabel.font = UIFontMake(12);
CNLiveCServiceModule/Classes/View/CNLiveMainSearch.m
@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 { 85 {
86 if (!_searchImage) { 86 if (!_searchImage) {
87 _searchImage = [[UIImageView alloc] init]; 87 _searchImage = [[UIImageView alloc] init];
88 - [_searchImage setImage:[UIImage loadBundleImage:@"service_search"]]; 88 + [_searchImage setImage:[UIImage loadCServiceBundle:@"service_search"]];
89 } 89 }
90 return _searchImage; 90 return _searchImage;
91 } 91 }
CNLiveCServiceModule/Classes/View/CNLiveServiceChinasCell.m
@@ -47,8 +47,8 @@ @@ -47,8 +47,8 @@
47 _cycleView.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated; 47 _cycleView.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;
48 _cycleView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter; 48 _cycleView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
49 _cycleView.hidesForSinglePage = YES; 49 _cycleView.hidesForSinglePage = YES;
50 - _cycleView.currentPageDotImage = [UIImage loadBundleImage:@"pagecontrol_yes"];  
51 - _cycleView.pageDotImage = [UIImage loadBundleImage:@"pagecontrol_no"]; 50 + _cycleView.currentPageDotImage = [UIImage loadCServiceBundle:@"pagecontrol_yes"];
  51 + _cycleView.pageDotImage = [UIImage loadCServiceBundle:@"pagecontrol_no"];
52 _cycleView.pageControlDotSize = CGSizeMake(4, 4); 52 _cycleView.pageControlDotSize = CGSizeMake(4, 4);
53 } 53 }
54 return _cycleView; 54 return _cycleView;
CNLiveCServiceModule/Classes/View/CNLiveServiceLookCell.m
@@ -128,8 +128,8 @@ @@ -128,8 +128,8 @@
128 _cycleView.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated; 128 _cycleView.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;
129 _cycleView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter; 129 _cycleView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
130 _cycleView.hidesForSinglePage = YES; 130 _cycleView.hidesForSinglePage = YES;
131 - _cycleView.currentPageDotImage = [UIImage loadBundleImage:@"pagecontrol_yes"];  
132 - _cycleView.pageDotImage = [UIImage loadBundleImage:@"pagecontrol_no"]; 131 + _cycleView.currentPageDotImage = [UIImage loadCServiceBundle:@"pagecontrol_yes"];
  132 + _cycleView.pageDotImage = [UIImage loadCServiceBundle:@"pagecontrol_no"];
133 _cycleView.pageControlDotSize = CGSizeMake(4, 4); 133 _cycleView.pageControlDotSize = CGSizeMake(4, 4);
134 } 134 }
135 return _cycleView; 135 return _cycleView;
CNLiveCServiceModule/Classes/View/CNLiveServiceOrLookCell.m
@@ -63,12 +63,12 @@ @@ -63,12 +63,12 @@
63 _type = type; 63 _type = type;
64 if (type == CNLiveCellShowTypeService) { 64 if (type == CNLiveCellShowTypeService) {
65 self.describe.hidden = YES; 65 self.describe.hidden = YES;
66 - [self.rightBtn setImage:[UIImage loadBundleImage:@"service_right"] forState:UIControlStateNormal]; 66 + [self.rightBtn setImage:[UIImage loadCServiceBundle:@"service_right"] forState:UIControlStateNormal];
67 }else{ 67 }else{
68 self.describe.hidden = NO; 68 self.describe.hidden = NO;
69 self.rightBtn.layer.cornerRadius = 9; 69 self.rightBtn.layer.cornerRadius = 9;
70 [self.rightBtn setTitle:@"进入 " forState:UIControlStateNormal]; 70 [self.rightBtn setTitle:@"进入 " forState:UIControlStateNormal];
71 - [self.rightBtn setImage:[UIImage loadBundleImage:@"service_enter"] forState:UIControlStateNormal]; 71 + [self.rightBtn setImage:[UIImage loadCServiceBundle:@"service_enter"] forState:UIControlStateNormal];
72 self.rightBtn.backgroundColor = CNLiveColorWithHexString(@"#2C7EEE"); 72 self.rightBtn.backgroundColor = CNLiveColorWithHexString(@"#2C7EEE");
73 } 73 }
74 [self setNeedsLayout]; 74 [self setNeedsLayout];
CNLiveCServiceModule/Classes/View/CNLiveVideoRecommendCell.m
@@ -156,7 +156,7 @@ @@ -156,7 +156,7 @@
156 { 156 {
157 if(!_lookNum){ 157 if(!_lookNum){
158 _lookNum = [UIButton buttonWithType:UIButtonTypeCustom]; 158 _lookNum = [UIButton buttonWithType:UIButtonTypeCustom];
159 - [_lookNum setImage:[UIImage loadBundleImage:@"listen"] forState:UIControlStateNormal]; 159 + [_lookNum setImage:[UIImage loadCServiceBundle:@"listen"] forState:UIControlStateNormal];
160 [_lookNum setTitleColor:CNLiveColorWithHexString(@"#9F9F9F") forState:UIControlStateNormal]; 160 [_lookNum setTitleColor:CNLiveColorWithHexString(@"#9F9F9F") forState:UIControlStateNormal];
161 _lookNum.titleLabel.font = UIFontMake(11); 161 _lookNum.titleLabel.font = UIFontMake(11);
162 } 162 }
CNLiveCServiceModule/Classes/ViewController/CNLiveAllServiceVC.m
@@ -38,7 +38,7 @@ static NSString *HistoryFootID = @"UICollectionFooterView"; @@ -38,7 +38,7 @@ static NSString *HistoryFootID = @"UICollectionFooterView";
38 - (void)requestService{ 38 - (void)requestService{
39 if (![CNLiveNetworking isNetworking]) { 39 if (![CNLiveNetworking isNetworking]) {
40 self.listCollectionView.mj_footer.hidden = YES; 40 self.listCollectionView.mj_footer.hidden = YES;
41 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(requestService)]; 41 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(requestService)];
42 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 42 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
43 [self setCNAPIErrorEmptyView]; 43 [self setCNAPIErrorEmptyView];
44 return; 44 return;
@@ -59,7 +59,7 @@ static NSString *HistoryFootID = @"UICollectionFooterView"; @@ -59,7 +59,7 @@ static NSString *HistoryFootID = @"UICollectionFooterView";
59 strongself 59 strongself
60 [self.listCollectionView.mj_footer endRefreshing]; 60 [self.listCollectionView.mj_footer endRefreshing];
61 self.listCollectionView.mj_footer.hidden = YES; 61 self.listCollectionView.mj_footer.hidden = YES;
62 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(requestService)]; 62 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(requestService)];
63 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 63 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
64 [self setCNAPIErrorEmptyView]; 64 [self setCNAPIErrorEmptyView];
65 }]; 65 }];
@@ -207,7 +207,7 @@ static NSString *HistoryFootID = @"UICollectionFooterView"; @@ -207,7 +207,7 @@ static NSString *HistoryFootID = @"UICollectionFooterView";
207 }; 207 };
208 if ([self.title isEqualToString:@"全部服务"]) { 208 if ([self.title isEqualToString:@"全部服务"]) {
209 [_navigationBar.right setTitleColor:CNLiveColorWithHexString(@"#F5A623") forState:UIControlStateNormal]; 209 [_navigationBar.right setTitleColor:CNLiveColorWithHexString(@"#F5A623") forState:UIControlStateNormal];
210 - _navigationBar.rightImage = [UIImage loadBundleImage:@"service_search"]; 210 + _navigationBar.rightImage = [UIImage loadCServiceBundle:@"service_search"];
211 _navigationBar.onClickRightButton = ^{ 211 _navigationBar.onClickRightButton = ^{
212 [CNLiveServiceSearchVC serviceSearchVC:nil]; 212 [CNLiveServiceSearchVC serviceSearchVC:nil];
213 }; 213 };
CNLiveCServiceModule/Classes/ViewController/CNLiveMyServicesVC.m
@@ -29,7 +29,7 @@ static NSString *HotListCellID = @"HotListCellID"; @@ -29,7 +29,7 @@ static NSString *HotListCellID = @"HotListCellID";
29 - (void)myServiceData{ 29 - (void)myServiceData{
30 if (![CNLiveNetworking isNetworking]) { 30 if (![CNLiveNetworking isNetworking]) {
31 self.listCollectionView.mj_footer.hidden = YES; 31 self.listCollectionView.mj_footer.hidden = YES;
32 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(myServiceData)]; 32 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(myServiceData)];
33 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 33 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
34 [self setCNAPIErrorEmptyView]; 34 [self setCNAPIErrorEmptyView];
35 return; 35 return;
@@ -41,7 +41,7 @@ static NSString *HotListCellID = @"HotListCellID"; @@ -41,7 +41,7 @@ static NSString *HotListCellID = @"HotListCellID";
41 if (!dataArray||dataArray.count <= 0) { 41 if (!dataArray||dataArray.count <= 0) {
42 self.listCollectionView.mj_footer.hidden = YES; 42 self.listCollectionView.mj_footer.hidden = YES;
43 self.navigationBar.right.hidden = YES; 43 self.navigationBar.right.hidden = YES;
44 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_noMsg"] text:@"暂无内容" detailText:nil buttonTitle:NULL buttonAction:NULL]; 44 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_noMsg"] text:@"暂无内容" detailText:nil buttonTitle:NULL buttonAction:NULL];
45 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 45 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
46 [self setCNAPIErrorEmptyView]; 46 [self setCNAPIErrorEmptyView];
47 }else{ 47 }else{
@@ -60,7 +60,7 @@ static NSString *HotListCellID = @&quot;HotListCellID&quot;; @@ -60,7 +60,7 @@ static NSString *HotListCellID = @&quot;HotListCellID&quot;;
60 self.listCollectionView.mj_footer.hidden = YES; 60 self.listCollectionView.mj_footer.hidden = YES;
61 strongself 61 strongself
62 self.navigationBar.right.hidden = YES; 62 self.navigationBar.right.hidden = YES;
63 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(myServiceData)]; 63 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(myServiceData)];
64 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 64 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
65 [self setCNAPIErrorEmptyView]; 65 [self setCNAPIErrorEmptyView];
66 }]; 66 }];
CNLiveCServiceModule/Classes/ViewController/CNLiveServiceSearchVC.m
@@ -47,7 +47,7 @@ static NSString *HistoryFootID = @&quot;HistoryFootID&quot;; @@ -47,7 +47,7 @@ static NSString *HistoryFootID = @&quot;HistoryFootID&quot;;
47 - (void)searchRequese{ 47 - (void)searchRequese{
48 if (![CNLiveNetworking isNetworking]) { 48 if (![CNLiveNetworking isNetworking]) {
49 self.listCollectionView.mj_footer.hidden = YES; 49 self.listCollectionView.mj_footer.hidden = YES;
50 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(searchRequese)]; 50 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(searchRequese)];
51 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 51 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
52 [self setCNAPIErrorEmptyView]; 52 [self setCNAPIErrorEmptyView];
53 return; 53 return;
@@ -57,7 +57,7 @@ static NSString *HistoryFootID = @&quot;HistoryFootID&quot;; @@ -57,7 +57,7 @@ static NSString *HistoryFootID = @&quot;HistoryFootID&quot;;
57 weakSelf.listCollectionView.hidden = YES; 57 weakSelf.listCollectionView.hidden = YES;
58 strongself 58 strongself
59 if (!dataArray||dataArray.count <= 0) { 59 if (!dataArray||dataArray.count <= 0) {
60 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_noMsg"] text:@"暂无内容" detailText:nil buttonTitle:NULL buttonAction:@selector(searchRequese)]; 60 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_noMsg"] text:@"暂无内容" detailText:nil buttonTitle:NULL buttonAction:@selector(searchRequese)];
61 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 61 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
62 [self setCNAPIErrorEmptyView]; 62 [self setCNAPIErrorEmptyView];
63 }else{ 63 }else{
@@ -76,7 +76,7 @@ static NSString *HistoryFootID = @&quot;HistoryFootID&quot;; @@ -76,7 +76,7 @@ static NSString *HistoryFootID = @&quot;HistoryFootID&quot;;
76 } error:^{ 76 } error:^{
77 weakSelf.listCollectionView.hidden = YES; 77 weakSelf.listCollectionView.hidden = YES;
78 strongself 78 strongself
79 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(searchRequese)]; 79 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(searchRequese)];
80 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 80 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
81 [self setCNAPIErrorEmptyView]; 81 [self setCNAPIErrorEmptyView];
82 82
CNLiveCServiceModule/Classes/ViewController/CNLiveServiceVC.m
@@ -41,7 +41,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;; @@ -41,7 +41,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;;
41 @implementation CNLiveServiceVC 41 @implementation CNLiveServiceVC
42 - (void)requestService{ 42 - (void)requestService{
43 if (![CNLiveNetworking isNetworking]) { 43 if (![CNLiveNetworking isNetworking]) {
44 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(requestService)]; 44 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_noNet"] text:@"网络开小差了,刷新试试" detailText:nil buttonTitle:@" 刷新 " buttonAction:@selector(requestService)];
45 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 45 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
46 [self setCNAPIErrorEmptyView]; 46 [self setCNAPIErrorEmptyView];
47 return; 47 return;
@@ -57,7 +57,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;; @@ -57,7 +57,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;;
57 dispatch_group_leave(requestGroup); 57 dispatch_group_leave(requestGroup);
58 } error:^{ 58 } error:^{
59 strongself 59 strongself
60 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(requestService)]; 60 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(requestService)];
61 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 61 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
62 [self setCNAPIErrorEmptyView]; 62 [self setCNAPIErrorEmptyView];
63 dispatch_group_leave(requestGroup); 63 dispatch_group_leave(requestGroup);
@@ -69,7 +69,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;; @@ -69,7 +69,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;;
69 } error:^{ 69 } error:^{
70 70
71 strongself 71 strongself
72 - [self showEmptyViewWithImage:[UIImage loadBundleImage:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(requestService)]; 72 + [self showEmptyViewWithImage:[UIImage loadCServiceBundle:@"service_failure"] text:@"加载失败,请点击重试" detailText:nil buttonTitle:@" 重试 " buttonAction:@selector(requestService)];
73 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop); 73 self.emptyView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop);
74 [self setCNAPIErrorEmptyView]; 74 [self setCNAPIErrorEmptyView];
75 dispatch_group_leave(requestGroup); 75 dispatch_group_leave(requestGroup);
@@ -228,7 +228,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;; @@ -228,7 +228,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;;
228 { 228 {
229 if (!_topBackView) { 229 if (!_topBackView) {
230 _topBackView = [[UIImageView alloc] init]; 230 _topBackView = [[UIImageView alloc] init];
231 - [_topBackView setImage:[UIImage loadBundleImage:@"service_top"]]; 231 + [_topBackView setImage:[UIImage loadCServiceBundle:@"service_top"]];
232 232
233 } 233 }
234 return _topBackView; 234 return _topBackView;
Example/CNLiveCServiceModule.xcodeproj/project.pbxproj
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - 08FF464C27586919001A767D /* CNLiveCServiceModuleImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FF464A27586918001A767D /* CNLiveCServiceModuleImpl.m */; }; 10 + 08FF465A2758CD4B001A767D /* CNLiveCServiceModuleImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FF46582758CD4A001A767D /* CNLiveCServiceModuleImpl.m */; };
11 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 11 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
12 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 12 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
13 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 13 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -38,8 +38,8 @@ @@ -38,8 +38,8 @@
38 /* End PBXContainerItemProxy section */ 38 /* End PBXContainerItemProxy section */
39 39
40 /* Begin PBXFileReference section */ 40 /* Begin PBXFileReference section */
41 - 08FF464927586918001A767D /* Base */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Base; path = Base.lproj/CNLiveCServiceModuleImpl.h; sourceTree = "<group>"; };  
42 - 08FF464B27586918001A767D /* Base */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = Base; path = Base.lproj/CNLiveCServiceModuleImpl.m; sourceTree = "<group>"; }; 41 + 08FF46582758CD4A001A767D /* CNLiveCServiceModuleImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveCServiceModuleImpl.m; sourceTree = "<group>"; };
  42 + 08FF46592758CD4B001A767D /* CNLiveCServiceModuleImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveCServiceModuleImpl.h; sourceTree = "<group>"; };
43 24FCDF117E18830B2795CC8A /* Pods_CNLiveCServiceModule_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveCServiceModule_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 24FCDF117E18830B2795CC8A /* Pods_CNLiveCServiceModule_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveCServiceModule_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
44 2ABB53829768F83F1D995005 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; 44 2ABB53829768F83F1D995005 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
45 6003F58A195388D20070C39A /* CNLiveCServiceModule_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveCServiceModule_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 6003F58A195388D20070C39A /* CNLiveCServiceModule_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveCServiceModule_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -101,8 +101,8 @@ @@ -101,8 +101,8 @@
101 08FF464727586356001A767D /* CNLIveCServiceModule */ = { 101 08FF464727586356001A767D /* CNLIveCServiceModule */ = {
102 isa = PBXGroup; 102 isa = PBXGroup;
103 children = ( 103 children = (
104 - 08FF464827586918001A767D /* CNLiveCServiceModuleImpl.h */,  
105 - 08FF464A27586918001A767D /* CNLiveCServiceModuleImpl.m */, 104 + 08FF46592758CD4B001A767D /* CNLiveCServiceModuleImpl.h */,
  105 + 08FF46582758CD4A001A767D /* CNLiveCServiceModuleImpl.m */,
106 ); 106 );
107 name = CNLIveCServiceModule; 107 name = CNLIveCServiceModule;
108 sourceTree = "<group>"; 108 sourceTree = "<group>";
@@ -417,7 +417,7 @@ @@ -417,7 +417,7 @@
417 files = ( 417 files = (
418 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */, 418 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */,
419 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */, 419 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */,
420 - 08FF464C27586919001A767D /* CNLiveCServiceModuleImpl.m in Sources */, 420 + 08FF465A2758CD4B001A767D /* CNLiveCServiceModuleImpl.m in Sources */,
421 6003F59A195388D20070C39A /* main.m in Sources */, 421 6003F59A195388D20070C39A /* main.m in Sources */,
422 ); 422 );
423 runOnlyForDeploymentPostprocessing = 0; 423 runOnlyForDeploymentPostprocessing = 0;
@@ -441,22 +441,6 @@ @@ -441,22 +441,6 @@
441 /* End PBXTargetDependency section */ 441 /* End PBXTargetDependency section */
442 442
443 /* Begin PBXVariantGroup section */ 443 /* Begin PBXVariantGroup section */
444 - 08FF464827586918001A767D /* CNLiveCServiceModuleImpl.h */ = {  
445 - isa = PBXVariantGroup;  
446 - children = (  
447 - 08FF464927586918001A767D /* Base */,  
448 - );  
449 - name = CNLiveCServiceModuleImpl.h;  
450 - sourceTree = "<group>";  
451 - };  
452 - 08FF464A27586918001A767D /* CNLiveCServiceModuleImpl.m */ = {  
453 - isa = PBXVariantGroup;  
454 - children = (  
455 - 08FF464B27586918001A767D /* Base */,  
456 - );  
457 - name = CNLiveCServiceModuleImpl.m;  
458 - sourceTree = "<group>";  
459 - };  
460 6003F596195388D20070C39A /* InfoPlist.strings */ = { 444 6003F596195388D20070C39A /* InfoPlist.strings */ = {
461 isa = PBXVariantGroup; 445 isa = PBXVariantGroup;
462 children = ( 446 children = (