Commit 4889f46b0a6cce07205b227be3262b09966d75a3
1 parent
93e40209
0.0.6
Showing
14 changed files
with
79 additions
and
45 deletions
CNLiveCommunitModule.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 = 'CNLiveCommunitModule' | 10 | s.name = 'CNLiveCommunitModule' |
| 11 | - s.version = '0.0.5' | 11 | + s.version = '0.0.6' |
| 12 | s.summary = 'A short description of CNLiveCommunitModule.' | 12 | s.summary = 'A short description of CNLiveCommunitModule.' |
| 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. |
CNLiveCommunitModule/Classes/Core/CNLiveCommunitModuleProtocol.h
| @@ -15,9 +15,13 @@ NS_ASSUME_NONNULL_BEGIN | @@ -15,9 +15,13 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 15 | /// @param webUrl url | 15 | /// @param webUrl url |
| 16 | -(UIViewController *)pushWebViewWithMainProjectWithWebUrl:(NSString *)webUrl type:(NSString *)type; | 16 | -(UIViewController *)pushWebViewWithMainProjectWithWebUrl:(NSString *)webUrl type:(NSString *)type; |
| 17 | 17 | ||
| 18 | -/// 用主工程的webView打开 | 18 | +/// 跳转活动详情界面 |
| 19 | +/// @param activityId 活动id | ||
| 20 | +-(void)pushWebViewWithMainProjectWithActivityId:(NSString *)activityId; | ||
| 21 | + | ||
| 22 | +/// 支付完成回调主工程 | ||
| 19 | /// @param paramDict url | 23 | /// @param paramDict url |
| 20 | --(void)pushWebViewWithMainProjectWithParamDict:(NSDictionary *)paramDict; | 24 | +-(void)pushPayResultWithMainProjectWithParamDict:(NSDictionary *)paramDict; |
| 21 | 25 | ||
| 22 | /// 调用工程中支付功能 | 26 | /// 调用工程中支付功能 |
| 23 | /// @param orderId 订单id | 27 | /// @param orderId 订单id |
CNLiveCommunitModule/Classes/View/CNLiveCommuntSubView.m
| @@ -234,10 +234,15 @@ | @@ -234,10 +234,15 @@ | ||
| 234 | [self.evalButton setTitleColor:color forState:UIControlStateNormal]; | 234 | [self.evalButton setTitleColor:color forState:UIControlStateNormal]; |
| 235 | }else if ([recoredModel.index isEqualToString:@"0"] | 235 | }else if ([recoredModel.index isEqualToString:@"0"] |
| 236 | || [recoredModel.index isEqualToString:@"1"]) { | 236 | || [recoredModel.index isEqualToString:@"1"]) { |
| 237 | - self.evalButton.hidden = NO; | ||
| 238 | - self.evalButton.userInteractionEnabled = NO; | ||
| 239 | - [self.evalButton setTitle:@"活动已取消" forState:UIControlStateNormal]; | ||
| 240 | - [self.evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal]; | 237 | + if ([recoredModel.status isEqualToString:@"2"]) { |
| 238 | + self.evalButton.hidden = NO; | ||
| 239 | + self.evalButton.userInteractionEnabled = NO; | ||
| 240 | + [self.evalButton setTitle:@"活动已取消" forState:UIControlStateNormal]; | ||
| 241 | + [self.evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal]; | ||
| 242 | + }else{ | ||
| 243 | + self.evalButton.userInteractionEnabled = NO; | ||
| 244 | + self.evalButton.hidden = YES; | ||
| 245 | + } | ||
| 241 | }else{ | 246 | }else{ |
| 242 | self.evalButton.userInteractionEnabled = NO; | 247 | self.evalButton.userInteractionEnabled = NO; |
| 243 | self.evalButton.hidden = YES; | 248 | self.evalButton.hidden = YES; |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntListViewController.m
| @@ -208,13 +208,11 @@ | @@ -208,13 +208,11 @@ | ||
| 208 | } | 208 | } |
| 209 | if (self.showType == CNLiveCommuntListShowTypeRecord) { | 209 | if (self.showType == CNLiveCommuntListShowTypeRecord) { |
| 210 | CNLiveCommuntyActivityRecordListModel * repairModel = self.dataArray[indexPath.row]; | 210 | CNLiveCommuntyActivityRecordListModel * repairModel = self.dataArray[indexPath.row]; |
| 211 | - [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithParamDict:[repairModel mj_JSONObject]]; | 211 | + [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:repairModel.handworkId]; |
| 212 | } | 212 | } |
| 213 | if (self.showType == CNLiveCommuntListShowTypeHome) { | 213 | if (self.showType == CNLiveCommuntListShowTypeHome) { |
| 214 | CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row]; | 214 | CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row]; |
| 215 | - [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithParamDict:[listModel mj_JSONObject]]; | ||
| 216 | -// CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:listModel.idStr]; | ||
| 217 | -// [self.navigationController pushViewController:signUpView animated:YES]; | 215 | + [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:listModel.idStr]; |
| 218 | } | 216 | } |
| 219 | } | 217 | } |
| 220 | 218 |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
| @@ -104,7 +104,7 @@ | @@ -104,7 +104,7 @@ | ||
| 104 | [self.view addSubview:bottemView]; | 104 | [self.view addSubview:bottemView]; |
| 105 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { | 105 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 106 | make.left.right.bottom.mas_equalTo(weakSelf.view); | 106 | make.left.right.bottom.mas_equalTo(weakSelf.view); |
| 107 | - make.height.mas_equalTo(50); | 107 | + make.height.mas_equalTo(50+kVerticalBottomSafeHeight); |
| 108 | }]; | 108 | }]; |
| 109 | 109 | ||
| 110 | float unitPrice = [self.detailModel.unitPrice floatValue]; | 110 | float unitPrice = [self.detailModel.unitPrice floatValue]; |
| @@ -160,7 +160,7 @@ | @@ -160,7 +160,7 @@ | ||
| 160 | CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId]; | 160 | CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId]; |
| 161 | [weakSelf.navigationController pushViewController:resultVC animated:YES]; | 161 | [weakSelf.navigationController pushViewController:resultVC animated:YES]; |
| 162 | }else{ | 162 | }else{ |
| 163 | - [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:signUpModel.orderId price:weakSelf.detailModel.unitPrice body:weakSelf.detailModel.name]; | 163 | + [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:signUpModel.order.idStr price:weakSelf.detailModel.unitPrice body:weakSelf.detailModel.name]; |
| 164 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payResultSuccessNNotification:) name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil]; | 164 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payResultSuccessNNotification:) name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil]; |
| 165 | } | 165 | } |
| 166 | }]; | 166 | }]; |
| @@ -169,6 +169,27 @@ | @@ -169,6 +169,27 @@ | ||
| 169 | { | 169 | { |
| 170 | NSDictionary * paramDict = (NSDictionary *)note.userInfo; | 170 | NSDictionary * paramDict = (NSDictionary *)note.userInfo; |
| 171 | NSLog(@"支付成功之后返回数据=>%@ json==>%@",paramDict,[paramDict mj_JSONString]); | 171 | NSLog(@"支付成功之后返回数据=>%@ json==>%@",paramDict,[paramDict mj_JSONString]); |
| 172 | + [[CNLiveCommuntyModule shareInstance].protocol pushPayResultWithMainProjectWithParamDict:paramDict]; | ||
| 173 | + if ([paramDict allKeys].count > 0 && [[paramDict allKeys] containsObject:@"systemPayData"]) { | ||
| 174 | + //0支付失败,1支付成功报名失败,2报名成功 | ||
| 175 | + NSDictionary * systemPayData = [paramDict dictionaryForKey:@"systemPayData"]; | ||
| 176 | + NSString * type = [systemPayData stringValueForKey:@"text" default:@"0"]; | ||
| 177 | + if ([type isEqualToString:@"0"]) { | ||
| 178 | + CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithActivityId:@"" OrderId:@"" Msg:@""]; | ||
| 179 | + [self.navigationController pushViewController:resultVC animated:YES]; | ||
| 180 | + }else if ([type isEqualToString:@"1"]) { | ||
| 181 | + CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithActivityId:@"" OrderId:@"" Msg:@"剩余名额不足,退款将原路退回"]; | ||
| 182 | + [self.navigationController pushViewController:resultVC animated:YES]; | ||
| 183 | + }else{ | ||
| 184 | + NSString * orderId = [systemPayData stringValueForKey:@"orderId" default:@""]; | ||
| 185 | + NSString * activityId = [systemPayData stringValueForKey:@"classId" default:@""]; | ||
| 186 | + CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithActivityId:activityId OrderId:orderId Msg:@""]; | ||
| 187 | + [self.navigationController pushViewController:resultVC animated:YES]; | ||
| 188 | + } | ||
| 189 | + }else{ | ||
| 190 | + CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithActivityId:@"" OrderId:@"" Msg:@""]; | ||
| 191 | + [self.navigationController pushViewController:resultVC animated:YES]; | ||
| 192 | + } | ||
| 172 | } | 193 | } |
| 173 | /// 跳转删除人员 | 194 | /// 跳转删除人员 |
| 174 | /// @param subDict 显示信息 | 195 | /// @param subDict 显示信息 |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntViewController.m
| @@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
| 53 | for (CNLiveCommuntyHomeModel * homeModel in homeArray) { | 53 | for (CNLiveCommuntyHomeModel * homeModel in homeArray) { |
| 54 | if ([homeModel.columnColour isNotBlank]) weakSelf.selectColor = [UIColor colorWithHexString:homeModel.columnColour]; | 54 | if ([homeModel.columnColour isNotBlank]) weakSelf.selectColor = [UIColor colorWithHexString:homeModel.columnColour]; |
| 55 | if ([homeModel.columnColourUncheck isNotBlank]) weakSelf.normalColor = [UIColor colorWithHexString:homeModel.columnColourUncheck]; | 55 | if ([homeModel.columnColourUncheck isNotBlank]) weakSelf.normalColor = [UIColor colorWithHexString:homeModel.columnColourUncheck]; |
| 56 | - [weakSelf settingTabberWithImages:@[homeModel.columnImg,homeModel.columnImgUncheck] CompleterBlock:^(NSDictionary *tempDict) { | 56 | + [weakSelf settingTabberWithImages:@[homeModel.columnImgUncheck,homeModel.columnImg] CompleterBlock:^(NSDictionary *tempDict) { |
| 57 | NSMutableDictionary * dict = [[NSMutableDictionary alloc] init]; | 57 | NSMutableDictionary * dict = [[NSMutableDictionary alloc] init]; |
| 58 | [dict addEntriesFromDictionary:tempDict]; | 58 | [dict addEntriesFromDictionary:tempDict]; |
| 59 | [dict setObject:homeModel forKey:@"model"]; | 59 | [dict setObject:homeModel forKey:@"model"]; |
| @@ -63,41 +63,43 @@ | @@ -63,41 +63,43 @@ | ||
| 63 | weakSelf.tabBar.backgroundColor = [UIColor whiteColor]; | 63 | weakSelf.tabBar.backgroundColor = [UIColor whiteColor]; |
| 64 | for (NSDictionary * subDict in array) { | 64 | for (NSDictionary * subDict in array) { |
| 65 | CNLiveCommuntyHomeModel * homeModel = [subDict objectForKey:@"model"]; | 65 | CNLiveCommuntyHomeModel * homeModel = [subDict objectForKey:@"model"]; |
| 66 | + UIImage *nomal_image = [[UIImage alloc] initWithData:[subDict objectForKey:@"nomal"]]; | ||
| 67 | + UIImage *select_image = [[UIImage alloc] initWithData:[subDict objectForKey:@"select"]]; | ||
| 66 | if (homeModel.contentColumnList.count > 0) { | 68 | if (homeModel.contentColumnList.count > 0) { |
| 67 | CNLiveCommuntConsuViewController * vc = [[CNLiveCommuntConsuViewController alloc] initWithHomeArray:homeModel.contentColumnList titles:homeModel.titles NBhdId:weakSelf.nbhdId]; | 69 | CNLiveCommuntConsuViewController * vc = [[CNLiveCommuntConsuViewController alloc] initWithHomeArray:homeModel.contentColumnList titles:homeModel.titles NBhdId:weakSelf.nbhdId]; |
| 68 | vc.title = homeModel.columnName; | 70 | vc.title = homeModel.columnName; |
| 69 | vc.view.backgroundColor = [UIColor whiteColor]; | 71 | vc.view.backgroundColor = [UIColor whiteColor]; |
| 70 | - [weakSelf addChildViewController:vc noralImage:[subDict objectForKey:@"nomal"] selectImage:[subDict objectForKey:@"select"]]; | 72 | + [weakSelf addChildViewController:vc noralImage:nomal_image selectImage:select_image]; |
| 71 | }else{ | 73 | }else{ |
| 72 | if ([homeModel.type isEqualToString:@"3"]) {//生活服务界面 原生 | 74 | if ([homeModel.type isEqualToString:@"3"]) {//生活服务界面 原生 |
| 73 | CNLiveCommuntServiceViewController * vc = [[CNLiveCommuntServiceViewController alloc] initWithHomeModel:homeModel isRootVC:YES isShowLocation:YES]; | 75 | CNLiveCommuntServiceViewController * vc = [[CNLiveCommuntServiceViewController alloc] initWithHomeModel:homeModel isRootVC:YES isShowLocation:YES]; |
| 74 | vc.title = homeModel.columnName; | 76 | vc.title = homeModel.columnName; |
| 75 | vc.view.backgroundColor = [UIColor whiteColor]; | 77 | vc.view.backgroundColor = [UIColor whiteColor]; |
| 76 | - [weakSelf addChildViewController:vc noralImage:[subDict objectForKey:@"nomal"] selectImage:[subDict objectForKey:@"select"]]; | 78 | + [weakSelf addChildViewController:vc noralImage:nomal_image selectImage:select_image]; |
| 77 | } | 79 | } |
| 78 | if ([homeModel.type isEqualToString:@"2"]) { | 80 | if ([homeModel.type isEqualToString:@"2"]) { |
| 79 | CNLiveCommuntListViewController * vc = [[CNLiveCommuntListViewController alloc] initWithShowType:CNLiveCommuntListShowTypeHome NBhdId:homeModel.idStr]; | 81 | CNLiveCommuntListViewController * vc = [[CNLiveCommuntListViewController alloc] initWithShowType:CNLiveCommuntListShowTypeHome NBhdId:homeModel.idStr]; |
| 80 | vc.title = homeModel.columnName; | 82 | vc.title = homeModel.columnName; |
| 81 | vc.view.backgroundColor = [UIColor whiteColor]; | 83 | vc.view.backgroundColor = [UIColor whiteColor]; |
| 82 | - [weakSelf addChildViewController:vc noralImage:[subDict objectForKey:@"nomal"] selectImage:[subDict objectForKey:@"select"]]; | 84 | + [weakSelf addChildViewController:vc noralImage:nomal_image selectImage:select_image]; |
| 83 | } | 85 | } |
| 84 | if (![homeModel.type isNotBlank] && [homeModel.cmsPageType isNotBlank] && ![homeModel.cmsPageType isEqualToString:@"4"]) { | 86 | if (![homeModel.type isNotBlank] && [homeModel.cmsPageType isNotBlank] && ![homeModel.cmsPageType isEqualToString:@"4"]) { |
| 85 | CNLiveCommuntActiviViewController * vc = [[CNLiveCommuntActiviViewController alloc] initWithWebUrl:homeModel.cmsPageUrl isRootVC:YES Type:homeModel.cmsPageType]; | 87 | CNLiveCommuntActiviViewController * vc = [[CNLiveCommuntActiviViewController alloc] initWithWebUrl:homeModel.cmsPageUrl isRootVC:YES Type:homeModel.cmsPageType]; |
| 86 | vc.title = homeModel.columnName; | 88 | vc.title = homeModel.columnName; |
| 87 | vc.view.backgroundColor = [UIColor whiteColor]; | 89 | vc.view.backgroundColor = [UIColor whiteColor]; |
| 88 | - [weakSelf addChildViewController:vc noralImage:[subDict objectForKey:@"nomal"] selectImage:[subDict objectForKey:@"select"]]; | 90 | + [weakSelf addChildViewController:vc noralImage:nomal_image selectImage:select_image]; |
| 89 | } | 91 | } |
| 90 | if (![homeModel.type isNotBlank] && [homeModel.cmsPageType isEqualToString:@"4"]) { | 92 | if (![homeModel.type isNotBlank] && [homeModel.cmsPageType isEqualToString:@"4"]) { |
| 91 | CNLiveCommuntServiceViewController * vc = [[CNLiveCommuntServiceViewController alloc] initWithHomeModel:homeModel isRootVC:YES isShowLocation:NO]; | 93 | CNLiveCommuntServiceViewController * vc = [[CNLiveCommuntServiceViewController alloc] initWithHomeModel:homeModel isRootVC:YES isShowLocation:NO]; |
| 92 | vc.title = homeModel.columnName; | 94 | vc.title = homeModel.columnName; |
| 93 | vc.view.backgroundColor = [UIColor whiteColor]; | 95 | vc.view.backgroundColor = [UIColor whiteColor]; |
| 94 | - [weakSelf addChildViewController:vc noralImage:[subDict objectForKey:@"nomal"] selectImage:[subDict objectForKey:@"select"]]; | 96 | + [weakSelf addChildViewController:vc noralImage:nomal_image selectImage:select_image]; |
| 95 | } | 97 | } |
| 96 | if (![homeModel.type isNotBlank] && ![homeModel.cmsPageType isNotBlank] && [homeModel.cmsPageUrl isNotBlank]) { | 98 | if (![homeModel.type isNotBlank] && ![homeModel.cmsPageType isNotBlank] && [homeModel.cmsPageUrl isNotBlank]) { |
| 97 | CNLiveCommuntActiviViewController * vc = [[CNLiveCommuntActiviViewController alloc] initWithWebUrl:homeModel.cmsPageUrl isRootVC:YES Type:@"1"]; | 99 | CNLiveCommuntActiviViewController * vc = [[CNLiveCommuntActiviViewController alloc] initWithWebUrl:homeModel.cmsPageUrl isRootVC:YES Type:@"1"]; |
| 98 | vc.title = homeModel.columnName; | 100 | vc.title = homeModel.columnName; |
| 99 | vc.view.backgroundColor = [UIColor whiteColor]; | 101 | vc.view.backgroundColor = [UIColor whiteColor]; |
| 100 | - [weakSelf addChildViewController:vc noralImage:[subDict objectForKey:@"nomal"] selectImage:[subDict objectForKey:@"select"]]; | 102 | + [weakSelf addChildViewController:vc noralImage:nomal_image selectImage:select_image]; |
| 101 | } | 103 | } |
| 102 | } | 104 | } |
| 103 | } | 105 | } |
| @@ -118,7 +120,7 @@ | @@ -118,7 +120,7 @@ | ||
| 118 | NSString * imageUrl = images[i]; | 120 | NSString * imageUrl = images[i]; |
| 119 | if ([imageUrl isNotBlank]) { | 121 | if ([imageUrl isNotBlank]) { |
| 120 | [SDWebImageManager.sharedManager loadImageWithURL:[NSURL URLWithString:imageUrl] options:SDWebImageRetryFailed progress:NULL completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) { | 122 | [SDWebImageManager.sharedManager loadImageWithURL:[NSURL URLWithString:imageUrl] options:SDWebImageRetryFailed progress:NULL completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) { |
| 121 | - [tempDict setObject:image forKey:i == 1 ? @"nomal" : @"select"]; | 123 | + [tempDict setObject:UIImagePNGRepresentation(image) forKey:[images indexOfObject:imageURL.absoluteString] == 0 ? @"nomal" : @"select"]; |
| 122 | if (tempDict.count == images.count && completerBlock) completerBlock(tempDict); | 124 | if (tempDict.count == images.count && completerBlock) completerBlock(tempDict); |
| 123 | }]; | 125 | }]; |
| 124 | } | 126 | } |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyHomeListViewController.m
| @@ -127,25 +127,24 @@ | @@ -127,25 +127,24 @@ | ||
| 127 | { | 127 | { |
| 128 | CNLiveCommuntyHomeListModel * listModel = self.dataSource[indexPath.row]; | 128 | CNLiveCommuntyHomeListModel * listModel = self.dataSource[indexPath.row]; |
| 129 | if (listModel && [listModel.idStr isNotBlank]) { | 129 | if (listModel && [listModel.idStr isNotBlank]) { |
| 130 | + | ||
| 131 | + [[NSUserDefaults standardUserDefaults] setObject:listModel.idStr forKey:kCNLiveCommuntyNBhdIdIdentifier]; | ||
| 132 | + [[NSUserDefaults standardUserDefaults] synchronize]; | ||
| 133 | + [[NSUserDefaults standardUserDefaults] setObject:listModel.name forKey:kCNLiveCommuntyNBhdNameIdentifier]; | ||
| 134 | + [[NSUserDefaults standardUserDefaults] synchronize]; | ||
| 135 | + CNLiveCommuntViewController * homeView = [[CNLiveCommuntViewController alloc] initWithNBhdId:listModel.idStr]; | ||
| 136 | + [self.navigationController pushViewController:homeView animated:YES]; | ||
| 137 | + | ||
| 130 | NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:self.navigationController.viewControllers]; | 138 | NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:self.navigationController.viewControllers]; |
| 131 | for (UIViewController * vc in self.navigationController.viewControllers) { | 139 | for (UIViewController * vc in self.navigationController.viewControllers) { |
| 132 | if ([vc isKindOfClass:CNLiveCommuntyHomeListViewController.class]) { | 140 | if ([vc isKindOfClass:CNLiveCommuntyHomeListViewController.class]) { |
| 133 | [tempArray removeObject:vc]; | 141 | [tempArray removeObject:vc]; |
| 134 | - break; | ||
| 135 | } | 142 | } |
| 136 | if ([vc isKindOfClass:CNLiveCommuntViewController.class]) { | 143 | if ([vc isKindOfClass:CNLiveCommuntViewController.class]) { |
| 137 | [tempArray removeObject:vc]; | 144 | [tempArray removeObject:vc]; |
| 138 | - break; | ||
| 139 | } | 145 | } |
| 140 | } | 146 | } |
| 141 | self.navigationController.viewControllers = tempArray; | 147 | self.navigationController.viewControllers = tempArray; |
| 142 | - | ||
| 143 | - [[NSUserDefaults standardUserDefaults] setObject:listModel.idStr forKey:kCNLiveCommuntyNBhdIdIdentifier]; | ||
| 144 | - [[NSUserDefaults standardUserDefaults] synchronize]; | ||
| 145 | - [[NSUserDefaults standardUserDefaults] setObject:listModel.name forKey:kCNLiveCommuntyNBhdNameIdentifier]; | ||
| 146 | - [[NSUserDefaults standardUserDefaults] synchronize]; | ||
| 147 | - CNLiveCommuntViewController * homeView = [[CNLiveCommuntViewController alloc] initWithNBhdId:listModel.idStr]; | ||
| 148 | - [self.navigationController pushViewController:homeView animated:YES]; | ||
| 149 | } | 148 | } |
| 150 | } | 149 | } |
| 151 | @end | 150 | @end |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
| @@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
| 114 | [self.view addSubview:self.bottemView]; | 114 | [self.view addSubview:self.bottemView]; |
| 115 | [self.bottemView mas_makeConstraints:^(MASConstraintMaker *make) { | 115 | [self.bottemView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 116 | make.left.right.bottom.mas_equalTo(weakSelf.view); | 116 | make.left.right.bottom.mas_equalTo(weakSelf.view); |
| 117 | - make.height.mas_equalTo(50); | 117 | + make.height.mas_equalTo(50+kVerticalBottomSafeHeight); |
| 118 | }]; | 118 | }]; |
| 119 | } | 119 | } |
| 120 | 120 |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultListViewController.m
| @@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
| 65 | [self.view addSubview:bottemView]; | 65 | [self.view addSubview:bottemView]; |
| 66 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { | 66 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 67 | make.left.right.bottom.mas_equalTo(weakSelf.view); | 67 | make.left.right.bottom.mas_equalTo(weakSelf.view); |
| 68 | - make.height.mas_equalTo(50); | 68 | + make.height.mas_equalTo(50+kVerticalBottomSafeHeight); |
| 69 | }]; | 69 | }]; |
| 70 | 70 | ||
| 71 | NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: %.2f元",(self.detailModel.signupVoList.count * [self.detailModel.unitPrice floatValue])/2]]; | 71 | NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: %.2f元",(self.detailModel.signupVoList.count * [self.detailModel.unitPrice floatValue])/2]]; |
| @@ -191,7 +191,7 @@ | @@ -191,7 +191,7 @@ | ||
| 191 | UILabel * priceLabel = [[UILabel alloc] init]; | 191 | UILabel * priceLabel = [[UILabel alloc] init]; |
| 192 | priceLabel.textColor = UIColorHex(#DF0D23); | 192 | priceLabel.textColor = UIColorHex(#DF0D23); |
| 193 | priceLabel.font = [UIFont boldSystemFontOfSize:16]; | 193 | priceLabel.font = [UIFont boldSystemFontOfSize:16]; |
| 194 | - priceLabel.text = [NSString stringWithFormat:@"%lu元",[self.detailModel.unitPrice integerValue]*100*self.detailModel.signupVoList.count]; | 194 | + priceLabel.text = [NSString stringWithFormat:@"%@元",self.detailModel.unitPrice]; |
| 195 | [view addSubview:priceLabel]; | 195 | [view addSubview:priceLabel]; |
| 196 | [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) { | 196 | [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 197 | make.centerY.mas_equalTo(view); | 197 | make.centerY.mas_equalTo(view); |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultViewController.m
| @@ -79,7 +79,7 @@ | @@ -79,7 +79,7 @@ | ||
| 79 | -(void)descAction:(UIButton *)button | 79 | -(void)descAction:(UIButton *)button |
| 80 | { | 80 | { |
| 81 | if (self.isSuccess) { | 81 | if (self.isSuccess) { |
| 82 | - CNLiveCommuntyResultListViewController * resultVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:self.signUpModel.signsString OrderId:self.signUpModel.orderId handworkId:self.activityId]; | 82 | + CNLiveCommuntyResultListViewController * resultVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:self.signUpModel.signsString OrderId:[self.signUpModel.orderId isNotBlank]?self.signUpModel.orderId:self.orderId handworkId:self.activityId]; |
| 83 | [self.navigationController pushViewController:resultVC animated:YES]; | 83 | [self.navigationController pushViewController:resultVC animated:YES]; |
| 84 | }else{ | 84 | }else{ |
| 85 | [self.navigationController popViewControllerAnimated:YES]; | 85 | [self.navigationController popViewControllerAnimated:YES]; |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyUserEditViewController.m
| @@ -66,7 +66,7 @@ | @@ -66,7 +66,7 @@ | ||
| 66 | [self.view addSubview:bottemView]; | 66 | [self.view addSubview:bottemView]; |
| 67 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { | 67 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 68 | make.left.right.bottom.mas_equalTo(weakSelf.view); | 68 | make.left.right.bottom.mas_equalTo(weakSelf.view); |
| 69 | - make.height.mas_equalTo(50); | 69 | + make.height.mas_equalTo(50+kVerticalBottomSafeHeight); |
| 70 | }]; | 70 | }]; |
| 71 | 71 | ||
| 72 | UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom]; | 72 | UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom]; |
| @@ -123,7 +123,7 @@ | @@ -123,7 +123,7 @@ | ||
| 123 | return; | 123 | return; |
| 124 | } | 124 | } |
| 125 | __weak typeof(self) weakSelf = self; | 125 | __weak typeof(self) weakSelf = self; |
| 126 | - [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES isNew:YES CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { | 126 | + [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES isNew:self.userDict.allKeys.count == 0 CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { |
| 127 | [weakSelf.navigationController popViewControllerAnimated:YES]; | 127 | [weakSelf.navigationController popViewControllerAnimated:YES]; |
| 128 | }]; | 128 | }]; |
| 129 | } | 129 | } |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyUserListViewController.m
| @@ -66,7 +66,7 @@ | @@ -66,7 +66,7 @@ | ||
| 66 | [self.view addSubview:bottemView]; | 66 | [self.view addSubview:bottemView]; |
| 67 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { | 67 | [bottemView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 68 | make.left.right.bottom.mas_equalTo(weakSelf.view); | 68 | make.left.right.bottom.mas_equalTo(weakSelf.view); |
| 69 | - make.height.mas_equalTo(50); | 69 | + make.height.mas_equalTo(50+kVerticalBottomSafeHeight); |
| 70 | }]; | 70 | }]; |
| 71 | 71 | ||
| 72 | UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom]; | 72 | UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom]; |
Example/CNLiveCommunitModule/CNLIVEViewController.m
| @@ -112,9 +112,8 @@ | @@ -112,9 +112,8 @@ | ||
| 112 | // NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; | 112 | // NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; |
| 113 | // CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId]; | 113 | // CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId]; |
| 114 | // [self.navigationController pushViewController:recordVC animated:YES]; | 114 | // [self.navigationController pushViewController:recordVC animated:YES]; |
| 115 | - [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:@"0.01" PayUrl:@"https://www.baidu.com" CompleterBlock:^{ | ||
| 116 | - NSLog(@"隐藏了"); | ||
| 117 | - }]; | 115 | + [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; |
| 116 | + [[NSUserDefaults standardUserDefaults] synchronize]; | ||
| 118 | } | 117 | } |
| 119 | if (indexPath.row == 2) { | 118 | if (indexPath.row == 2) { |
| 120 | CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init]; | 119 | CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init]; |
Example/CNLiveCommunitModule/CNLiveCommunitModuleImpl.m
| @@ -28,15 +28,21 @@ | @@ -28,15 +28,21 @@ | ||
| 28 | NSLog(@"调用支付相关参数 orderId=>%@ price=>%@ body=>%@",orderId,price,body); | 28 | NSLog(@"调用支付相关参数 orderId=>%@ price=>%@ body=>%@",orderId,price,body); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | -/// 用主工程的webView打开 | ||
| 32 | -/// @param paramDict url | ||
| 33 | --(void)pushWebViewWithMainProjectWithParamDict:(NSDictionary *)paramDict | 31 | +/// 跳转活动详情界面 |
| 32 | +/// @param activityId 活动id | ||
| 33 | +-(void)pushWebViewWithMainProjectWithActivityId:(NSString *)activityId | ||
| 34 | { | 34 | { |
| 35 | - NSString * idStr = [paramDict objectForKey:@"id"]; | ||
| 36 | - CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:idStr]; | 35 | + CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:activityId]; |
| 37 | [[CNLiveCommuntTools cCommunt_currentViewController].navigationController pushViewController:signUpView animated:YES]; | 36 | [[CNLiveCommuntTools cCommunt_currentViewController].navigationController pushViewController:signUpView animated:YES]; |
| 38 | } | 37 | } |
| 39 | 38 | ||
| 39 | +/// 支付完成回调主工程 | ||
| 40 | +/// @param paramDict url | ||
| 41 | +-(void)pushPayResultWithMainProjectWithParamDict:(NSDictionary *)paramDict | ||
| 42 | +{ | ||
| 43 | + | ||
| 44 | +} | ||
| 45 | + | ||
| 40 | /// 获取主工程的视讯相关界面逻辑 | 46 | /// 获取主工程的视讯相关界面逻辑 |
| 41 | /// @param pageId 界面id | 47 | /// @param pageId 界面id |
| 42 | /// @param channelName 频道名 | 48 | /// @param channelName 频道名 |