Commit 73d7e51d54bc1f19c888ee3cc3750cfe78e9d60d

Authored by liushiyu
1 parent 4fabf352

0.0.8

CNLiveCommuntyModule.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveCommuntyModule'
11   - s.version = '0.0.7'
  11 + s.version = '0.0.8'
12 12 s.summary = 'A short description of CNLiveCommuntyModule.'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveCommuntyModule/Classes/Core/CNLiveCommunitHeader.h
... ... @@ -59,4 +59,6 @@
59 59  
60 60  
61 61 static NSString *const kCNLiveCommuntyNBhdInfoIdentifier = @"kCNLiveCommuntyNBhdInfoIdentifier";
  62 +
  63 +#define isDemo [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] isEqualToString:@"org.cocoapods.demo.CNLiveCommuntyModule-Example"]
62 64 #endif /* CNLiveCommunitHeader_h */
... ...
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
... ... @@ -212,6 +212,7 @@ MJCodingImplementation
212 212 {
213 213 self.infoArray = [[NSMutableArray alloc] init];
214 214 self.processArray = [[NSMutableArray alloc] initWithArray:@[@"",@"",@"",@""]];
  215 + __block NSString * status = [NSString stringWithFormat:@"%@",[keyValues objectForKey:@"status"]];
215 216 [keyValues enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) {
216 217 key = [NSString stringWithFormat:@"%@",key];
217 218 obj = [NSString stringWithFormat:@"%@",obj];
... ... @@ -249,7 +250,7 @@ MJCodingImplementation
249 250 [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"];
250 251 [self.infoArray addObject:tempDict];
251 252 }
252   - if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"createTime"]) {
  253 + if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"createTime"] && [status isEqualToString:@"0"]) {
253 254 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)];
254 255 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
255 256 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
... ... @@ -257,7 +258,7 @@ MJCodingImplementation
257 258 [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"];
258 259 [self.processArray replaceObjectAtIndex:0 withObject:tempDict];
259 260 }
260   - if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"repairTime"]) {
  261 + if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"repairTime"] && [status isEqualToString:@"1"]) {
261 262 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)];
262 263 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
263 264 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
... ... @@ -265,7 +266,7 @@ MJCodingImplementation
265 266 [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"];
266 267 [self.processArray replaceObjectAtIndex:1 withObject:tempDict];
267 268 }
268   - if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"payTime"]) {
  269 + if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"payTime"] && [status isEqualToString:@"3"]) {
269 270 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)];
270 271 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
271 272 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
... ... @@ -273,7 +274,7 @@ MJCodingImplementation
273 274 [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"];
274 275 [self.processArray replaceObjectAtIndex:2 withObject:tempDict];
275 276 }
276   - if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"cancleTime"]) {
  277 + if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"cancleTime"] && [status isEqualToString:@"2"]) {
277 278 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)];
278 279 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
279 280 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
... ... @@ -285,7 +286,7 @@ MJCodingImplementation
285 286 [self.processArray removeObject:@""];
286 287 for (NSDictionary * subDict in self.processArray) {
287 288 NSString * key = [subDict stringValueForKey:@"key" default:@""];
288   - if ([key isEqualToString:@"用户提交报修订单"]) self.showType = 0;
  289 + if ([key isEqualToString:@"用户提交报修订单"] ) self.showType = 0;
289 290 if ([key isEqualToString:@"维修人员已接单"]) self.showType = 1;
290 291 if ([key isEqualToString:@"完成维修并支付"]) self.showType = 2;
291 292 if ([key isEqualToString:@"用户取消报修订单"]) self.showType = 3;
... ... @@ -485,34 +486,37 @@ MJCodingImplementation
485 486 }];
486 487  
487 488 NSMutableArray * tempArray01 = [[NSMutableArray alloc] init];
488   - NSArray * voList = [keyValues arrayForKey:@"signupVoList"];
  489 + NSMutableArray * voList = [[NSMutableArray alloc] initWithArray:[keyValues arrayForKey:@"signupVoList"]];
489 490 for (NSDictionary * dict in voList) {
490   -
  491 + NSMutableArray * tempA = [[NSMutableArray alloc] init];
491 492 NSMutableDictionary * tempDict01 = [[NSMutableDictionary alloc] init];
492 493 NSString * age = [NSString stringWithFormat:@"%@",dict[@"age"]];
493 494 [tempDict01 addString:@"年 龄" forKey:@"key"];
494 495 [tempDict01 addString:age forKey:@"value"];
495   - [tempArray01 addObject:tempDict01];
  496 + [tempA addObject:tempDict01];
496 497  
497 498 NSMutableDictionary * tempDict02 = [[NSMutableDictionary alloc] init];
498 499 NSString * name = [NSString stringWithFormat:@"%@",dict[@"name"]];
499 500 [tempDict02 addString:@"姓 名" forKey:@"key"];
500 501 [tempDict02 addString:name forKey:@"value"];
501   - [tempArray01 addObject:tempDict02];
  502 + [tempA addObject:tempDict02];
502 503  
503 504 NSMutableDictionary * tempDict03 = [[NSMutableDictionary alloc] init];
504 505 NSString * gender = [NSString stringWithFormat:@"%@",[dict[@"gender"] boolValue]?@"男":@"女"];
505 506 [tempDict03 addString:@"性 别" forKey:@"key"];
506 507 [tempDict03 addString:gender forKey:@"value"];
507   - [tempArray01 addObject:tempDict03];
  508 + [tempA addObject:tempDict03];
508 509  
509 510 NSMutableDictionary * tempDict04 = [[NSMutableDictionary alloc] init];
510 511 NSString * mobile = [NSString stringWithFormat:@"%@",dict[@"mobile"]];
511 512 [tempDict04 addString:@"联系方式" forKey:@"key"];
512 513 [tempDict04 addString:mobile forKey:@"value"];
513   - [tempArray01 addObject:tempDict04];
  514 + [tempA addObject:tempDict04];
  515 +
  516 + [tempArray01 addObject:tempA];
514 517 }
515   - [self.dataArray addObject:tempArray01];
  518 +
  519 + [self.dataArray addObjectsFromArray:tempArray01];
516 520 [self.dataArray addObject:tempArray];
517 521 }
518 522 - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
... ...
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.h
... ... @@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
59 59  
60 60 @property (nonatomic, assign) BOOL isAddUser;
61 61  
62   -+(CNLiveCommuntSignUpUserViewCell *)setTableView:(UITableView *)tableView isAddUser:(BOOL)isAddUser UserDict:(NSDictionary *)userDict;
  62 ++(CNLiveCommuntSignUpUserViewCell *)setTableView:(UITableView *)tableView selectArray:(NSArray *)selectArray isAddUser:(BOOL)isAddUser UserDict:(NSDictionary *)userDict;
63 63  
64 64 @end
65 65  
... ...
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
... ... @@ -170,12 +170,13 @@
170 170  
171 171 @implementation CNLiveCommuntSignUpUserViewCell
172 172  
173   -+(CNLiveCommuntSignUpUserViewCell *)setTableView:(UITableView *)tableView isAddUser:(BOOL)isAddUser UserDict:(nonnull NSDictionary *)userDict
  173 ++(CNLiveCommuntSignUpUserViewCell *)setTableView:(UITableView *)tableView selectArray:(NSArray *)selectArray isAddUser:(BOOL)isAddUser UserDict:(nonnull NSDictionary *)userDict
174 174 {
175 175 CNLiveCommuntSignUpUserViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"CNLiveCommuntSignUpViewCell"];
176 176 if (!cell) {
177 177 cell = [[CNLiveCommuntSignUpUserViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CNLiveCommuntSignUpViewCell"];
178 178 }
  179 + cell.selectArray = selectArray;
179 180 cell.userDict = userDict;
180 181 cell.isAddUser = isAddUser;
181 182 return cell;
... ... @@ -200,7 +201,6 @@
200 201 -(void)setSelectArray:(NSArray *)selectArray
201 202 {
202 203 _selectArray = selectArray;
203   -
204 204 }
205 205 -(void)setUserDict:(NSDictionary *)userDict
206 206 {
... ... @@ -208,6 +208,11 @@
208 208 _nameLabel.text = [userDict stringValueForKey:@"name" default:@""];
209 209 _sexAgeLabel.text = [NSString stringWithFormat:@"%@ %@岁",[[userDict stringValueForKey:@"gender" default:@""] isEqualToString:@"0"]?@"女":@"男",[userDict stringValueForKey:@"age" default:@""]];
210 210 _phoneLabel.text = [NSString stringWithFormat:@"联系电话:%@",[userDict stringValueForKey:@"mobile" default:@""]];
  211 + BOOL isHave = NO;
  212 + for (NSDictionary * userSubDict in self.selectArray) {
  213 + if ([userDict isEqual:userSubDict]) isHave = YES;
  214 + }
  215 + if (isHave) self.delectBtn.selected = YES;
211 216 }
212 217 -(void)setIsAddUser:(BOOL)isAddUser
213 218 {
... ... @@ -255,20 +260,6 @@
255 260 make.left.mas_equalTo(weakSelf.mainView).offset(10);
256 261 make.size.mas_equalTo(20);
257 262 }];
258   - [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
259   - make.top.mas_equalTo(weakSelf.mainView).offset(5);
260   - make.left.mas_equalTo(weakSelf.delectBtn.mas_right).offset(10);
261   - }];
262   - [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
263   - make.centerY.mas_equalTo(weakSelf.nameLabel);
264   - make.left.mas_equalTo(weakSelf.nameLabel.mas_right).offset(5);
265   - make.height.mas_equalTo(15);
266   - make.width.mas_equalTo(0.5);
267   - }];
268   - [self.sexAgeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
269   - make.centerY.mas_equalTo(weakSelf.nameLabel);
270   - make.left.mas_equalTo(weakSelf.lineLabel.mas_right).offset(5);
271   - }];
272 263 [self.phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
273 264 make.left.mas_equalTo(weakSelf.delectBtn.mas_right).offset(10);
274 265 make.top.mas_equalTo(weakSelf.nameLabel.mas_bottom).offset(5);
... ... @@ -278,6 +269,21 @@
278 269 make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-10);
279 270 make.size.mas_equalTo(20);
280 271 }];
  272 + [self.sexAgeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  273 + make.centerY.mas_equalTo(weakSelf.nameLabel);
  274 + make.right.mas_equalTo(weakSelf.editButton.mas_left).offset(-5);
  275 + }];
  276 + [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  277 + make.centerY.mas_equalTo(weakSelf.nameLabel);
  278 + make.right.mas_equalTo(weakSelf.sexAgeLabel.mas_left).offset(-5);
  279 + make.height.mas_equalTo(15);
  280 + make.width.mas_equalTo(0.5);
  281 + }];
  282 + [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  283 + make.top.mas_equalTo(weakSelf.mainView).offset(5);
  284 + make.left.mas_equalTo(weakSelf.delectBtn.mas_right).offset(10);
  285 + make.right.mas_equalTo(weakSelf.lineLabel.mas_left).offset(-5);
  286 + }];
281 287 }
282 288 #pragma mark =
283 289 -(UIView *)mainView
... ...
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSubView.m
... ... @@ -257,7 +257,7 @@
257 257 NSString * buttonName = @"";
258 258 UIColor * color = UIColorHex(#0091FF);
259 259 if ([recoredModel.amount integerValue] == 0) {
260   - buttonName = @"用户取消";
  260 + buttonName = @"已取消报名";
261 261 color = UIColorHex(#FD862E);
262 262 }else{
263 263 buttonName = @"退款成功";
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntEvaluaViewController.m
... ... @@ -190,26 +190,32 @@
190 190 }
191 191 -(void)submiteAction:(UIButton *)button
192 192 {
193   - __weak typeof(self) weakSelf = self;
194   - [self.view endEditing:YES];
195   - if (self.imageArray.count == 0) {
196   - [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:self.recordModel.idStr handworkId:self.recordModel.handworkId comment:self.evaluaView.text imgs:@"" isAnonymity:self.isAnonymity CompleterBlock:^{
197   - [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5];
198   - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
199   - [weakSelf.navigationController popViewControllerAnimated:YES];
200   - });
201   - }];
202   - }else{
  193 + self.evaluaView.text = [self.evaluaView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
  194 + if ([self.evaluaView.text isNotBlank]) {
203 195 __weak typeof(self) weakSelf = self;
204   - [self uploadImageWithCompleterBlock:^(NSString *imageUrl) {
205   - [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:weakSelf.recordModel.idStr handworkId:weakSelf.recordModel.handworkId comment:weakSelf.evaluaView.text imgs:imageUrl isAnonymity:weakSelf.isAnonymity CompleterBlock:^{
  196 + [self.view endEditing:YES];
  197 + if (self.imageArray.count == 0) {
  198 + [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:self.recordModel.idStr handworkId:self.recordModel.handworkId comment:self.evaluaView.text imgs:@"" isAnonymity:self.isAnonymity CompleterBlock:^{
206 199 [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5];
207 200 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
208 201 [weakSelf.navigationController popViewControllerAnimated:YES];
209 202 });
210 203 }];
211   - }];
  204 + }else{
  205 + __weak typeof(self) weakSelf = self;
  206 + [self uploadImageWithCompleterBlock:^(NSString *imageUrl) {
  207 + [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:weakSelf.recordModel.idStr handworkId:weakSelf.recordModel.handworkId comment:weakSelf.evaluaView.text imgs:imageUrl isAnonymity:weakSelf.isAnonymity CompleterBlock:^{
  208 + [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5];
  209 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  210 + [weakSelf.navigationController popViewControllerAnimated:YES];
  211 + });
  212 + }];
  213 + }];
  214 + }
  215 + }else{
  216 + [QMUITips showError:@"评论内容不能空" inView:self.view hideAfterDelay:1.5];
212 217 }
  218 +
213 219 }
214 220 -(void)selectMothodAction:(UIButton *)button
215 221 {
... ... @@ -302,14 +308,14 @@
302 308 PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:imageIds options:nil];
303 309 [result enumerateObjectsUsingBlock:^(PHAsset * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
304 310 dispatch_async_on_main_queue(^{
305   - [weakSelf.imageArray removeObject:weakSelf.cameraArray.firstObject];
306   - [weakSelf.assetsArray removeObject:weakSelf.assetsCameraArray.firstObject];
307   - [weakSelf.assetsCameraArray removeAllObjects];
308   - [weakSelf.cameraArray removeAllObjects];
309   - [weakSelf.assetsCameraArray addObject:obj];
310   - [weakSelf.cameraArray addObject:image];
311   - [weakSelf.imageArray addObjectsFromArray:weakSelf.cameraArray];
312   - [weakSelf.assetsArray addObjectsFromArray:weakSelf.assetsCameraArray];
  311 +// [weakSelf.imageArray removeObject:weakSelf.cameraArray.firstObject];
  312 +// [weakSelf.assetsArray removeObject:weakSelf.assetsCameraArray.firstObject];
  313 +// [weakSelf.assetsCameraArray removeAllObjects];
  314 +// [weakSelf.cameraArray removeAllObjects];
  315 +// [weakSelf.assetsCameraArray addObject:obj];
  316 +// [weakSelf.cameraArray addObject:image];
  317 + [weakSelf.imageArray addObjectsFromArray:@[image]];//weakSelf.cameraArray];
  318 + [weakSelf.assetsArray addObjectsFromArray:@[obj]];//weakSelf.assetsCameraArray];
313 319 [weakSelf setReloadFinishPickingPhotos];
314 320 });
315 321 }];
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntInformViewController.m
... ... @@ -59,10 +59,11 @@
59 59 self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
60 60  
61 61 weakself
62   - [QMUITips showLoadingInView:self.view];
  62 +
63 63 self.dataArray = [[NSMutableArray alloc] init];
64 64 NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
65 65 if ([nb_info isNotBlank]) {
  66 + [QMUITips showLoadingInView:self.view];
66 67 CNLiveCommuntyHomeListModel * listModel = [CNLiveCommuntyHomeListModel mj_objectWithKeyValues:nb_info];
67 68 [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenForNBHdId:listModel.propertyId CompleterBlock:^(NSArray * _Nonnull dataArray) {
68 69 [QMUITips hideAllTipsInView:weakSelf.view];
... ... @@ -179,7 +180,7 @@
179 180 if ([phone isNotBlank] && phone.length == 11) {
180 181 [paramDict addString:phone forKey:@"phone"];
181 182 }else{
182   - [QMUITips showWithText:@"联系电话填写错误"];
  183 + [QMUITips showWithText:phone.length == 0 ? @"联系电话不能为空" : @"联系电话填写错误"];
183 184 return;
184 185 }
185 186 }
... ... @@ -189,10 +190,15 @@
189 190 NSString * dayString = [timeString componentsSeparatedByString:@" "].firstObject;
190 191 NSString * startString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].firstObject;
191 192 NSString * endString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].lastObject;
192   - NSString * temp_start_time = [NSString stringWithFormat:@"%@ %@:00:00",dayString,startString];
193   - NSString * temp_end_time = [NSString stringWithFormat:@"%@ %@:00:00",dayString,endString];
194   - [paramDict addString:[temp_start_time isNotBlank]?temp_start_time:@"" forKey:@"beginTime"];
195   - [paramDict addString:[temp_end_time isNotBlank]?temp_end_time:@"" forKey:@"endTime"];
  193 + if ([startString isNotBlank] && [endString isNotBlank]) {
  194 + NSString * temp_start_time = [NSString stringWithFormat:@"%@ %@:00:00",dayString,startString];
  195 + NSString * temp_end_time = [NSString stringWithFormat:@"%@ %@:00:00",dayString,endString];
  196 + [paramDict addString:[temp_start_time isNotBlank]?temp_start_time:@"" forKey:@"beginTime"];
  197 + [paramDict addString:[temp_end_time isNotBlank]?temp_end_time:@"" forKey:@"endTime"];
  198 + }else{
  199 + [paramDict addString:@"" forKey:@"beginTime"];
  200 + [paramDict addString:@"" forKey:@"endTime"];
  201 + }
196 202 }
197 203 if (i == 5) [paramDict addString:[userCell.descTextView.text isNotBlank]?userCell.descTextView.text:@"" forKey:@"remark"];
198 204 }
... ... @@ -203,8 +209,8 @@
203 209 if ([key isEqualToString:@"address"]) [QMUITips showWithText:@"联系地址不能为空"];
204 210 if ([key isEqualToString:@"phone"]) [QMUITips showWithText:@"联系电话不能为空"];
205 211 if ([key isEqualToString:@"repairProject"]) [QMUITips showWithText:@"报修项目不能为空"];
206   - if ([key isEqualToString:@"beginTime"]) [QMUITips showWithText:@"上门时间不能为空"];
207   - if ([key isEqualToString:@"endTime"]) [QMUITips showWithText:@"上门时间不能为空"];
  212 + if ([key isEqualToString:@"beginTime"]) [QMUITips showWithText:@"请选择上门时间"];
  213 + if ([key isEqualToString:@"endTime"]) [QMUITips showWithText:@"请选择上门时间"];
208 214 if ([key isEqualToString:@"remark"]) [QMUITips showWithText:@"问题描述不能为空"];
209 215 return;
210 216 }
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntListViewController.m
... ... @@ -123,12 +123,24 @@
123 123 }
124 124 - (NSAttributedString *)buttonTitleForEmptyDataSet:(UIScrollView *)scrollView forState:(UIControlState)state
125 125 {
126   - if (self.showType == CNLiveCommuntListShowTypeRepair) {
127   - return [[NSAttributedString alloc] initWithString:@"我要报修" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:UIColorHex(#CD0302)}];
  126 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]];
  127 + NSString * idStr = [[nb_info mj_JSONObject] stringValueForKey:@"id" default:@""];
  128 + if (self.showType == CNLiveCommuntListShowTypeRepair && [idStr isNotBlank]) {
  129 + return [[NSAttributedString alloc] initWithString:@"我要报修" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:UIColorHex(#CD0302)}];
128 130 }else{
129 131 return nil;
130 132 }
131 133 }
  134 +- (void)emptyDataSet:(UIScrollView *)scrollView didTapButton:(UIButton *)button
  135 +{
  136 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]];
  137 + NSString * idStr = [[nb_info mj_JSONObject] stringValueForKey:@"id" default:@""];
  138 + if (self.showType == CNLiveCommuntListShowTypeRepair && [idStr isNotBlank]) {
  139 + NSLog(@"点击界面了");
  140 + CNLiveCommuntInformViewController * informView = [[CNLiveCommuntInformViewController alloc] initWithNBhdId:idStr];
  141 + [self.navigationController pushViewController:informView animated:YES];
  142 + }
  143 +}
132 144 - (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView
133 145 {
134 146 return 0;
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
... ... @@ -74,9 +74,9 @@
74 74 -(void)addUserAction:(UIButton *)button
75 75 {
76 76 __weak typeof(self) weakSelf = self;
77   - CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped CompleterBlock:^(NSArray * _Nonnull userArray) {
78   - [weakSelf.userArray removeAllObjects];
79   - [weakSelf.userArray addObjectsFromArray:userArray];
  77 + CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped selectArray:self.userArray CompleterBlock:^(NSArray * _Nonnull userArray) {
  78 +// [weakSelf.userArray removeAllObjects];
  79 +// [weakSelf.userArray addObjectsFromArray:userArray];
80 80 [weakSelf.tableView reloadData];
81 81 [weakSelf setupWithBottemView:weakSelf.userArray.count];
82 82 }];
... ... @@ -121,16 +121,7 @@
121 121 [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#DF0D23) range:[str.string rangeOfString:@"¥"]];
122 122 [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:9] range:[str.string rangeOfString:@"¥"]];
123 123  
124   - UILabel * priceLabel = [[UILabel alloc] init];
125   - priceLabel.textColor = UIColorHex(#DF0D23);
126   - priceLabel.font = [UIFont boldSystemFontOfSize:16];
127   - priceLabel.attributedText = str;
128   - priceLabel.hidden = unitPrice == 0.00;
129   - [bottemView addSubview:priceLabel];
130   - [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
131   - make.top.mas_equalTo(bottemView.mas_top).offset(7);
132   - make.left.mas_equalTo(bottemView).offset(10);
133   - }];
  124 +
134 125  
135 126 UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom];
136 127 [payButton setTitle:unitPrice == 0.00?@"立即报名":@"立即支付" forState:UIControlStateNormal];
... ... @@ -146,7 +137,7 @@
146 137 [payButton addTarget:self action:@selector(payResultAction) forControlEvents:UIControlEventTouchUpInside];
147 138 [bottemView addSubview:payButton];
148 139 [payButton mas_makeConstraints:^(MASConstraintMaker *make) {
149   - make.centerY.mas_equalTo(bottemView);
  140 + make.top.mas_equalTo(bottemView.mas_top).offset(7);
150 141 make.right.mas_equalTo(bottemView.mas_right).offset(-10);
151 142 make.height.mas_equalTo(36);
152 143 if (unitPrice == 0.00) {
... ... @@ -155,6 +146,17 @@
155 146 make.width.mas_equalTo(180);
156 147 }
157 148 }];
  149 +
  150 + UILabel * priceLabel = [[UILabel alloc] init];
  151 + priceLabel.textColor = UIColorHex(#DF0D23);
  152 + priceLabel.font = [UIFont boldSystemFontOfSize:16];
  153 + priceLabel.attributedText = str;
  154 + priceLabel.hidden = unitPrice == 0.00;
  155 + [bottemView addSubview:priceLabel];
  156 + [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  157 + make.centerY.mas_equalTo(payButton);
  158 + make.left.mas_equalTo(bottemView).offset(10);
  159 + }];
158 160 }
159 161 -(void)payResultAction
160 162 {
... ... @@ -166,7 +168,7 @@
166 168 CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId];
167 169 [weakSelf.navigationController pushViewController:resultVC animated:YES];
168 170 }else{
169   - [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:signUpModel.order.idStr price:[NSString stringWithFormat:@"%.2f",(weakSelf.userArray.count * [weakSelf.detailModel.unitPrice floatValue])] body:weakSelf.detailModel.name];
  171 + [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:[signUpModel.order.idStr isNotBlank]?signUpModel.order.idStr:@"" price:[NSString stringWithFormat:@"%.2f",(weakSelf.userArray.count * [weakSelf.detailModel.unitPrice floatValue])] body:[weakSelf.detailModel.name isNotBlank]?weakSelf.detailModel.name:@"网家家社区活动"];
170 172 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payResultSuccessNNotification:) name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil];
171 173 }
172 174 }];
... ... @@ -232,7 +234,7 @@
232 234 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
233 235 {
234 236 if (indexPath.section == 0) {
235   - CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView isAddUser:NO UserDict:self.userArray[indexPath.row]];
  237 + CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:@[] isAddUser:NO UserDict:self.userArray[indexPath.row]];
236 238 userView.delegate = self;
237 239 return userView;
238 240 }else{
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
... ... @@ -51,14 +51,16 @@
51 51 -(void)viewDidAppear:(BOOL)animated
52 52 {
53 53 [super viewDidAppear:animated];
54   - NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:self.navigationController.viewControllers];
55   - for (UIViewController * vc in self.navigationController.viewControllers) {
56   - if ([vc isKindOfClass:CNLiveCommuntInformViewController.class]) {
57   - [tempArray removeObject:vc];
58   - break;
  54 + if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder) {
  55 + NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:self.navigationController.viewControllers];
  56 + for (UIViewController * vc in self.navigationController.viewControllers) {
  57 + if ([vc isKindOfClass:CNLiveCommuntInformViewController.class]) {
  58 + [tempArray removeObject:vc];
  59 + break;
  60 + }
59 61 }
  62 + self.navigationController.viewControllers = tempArray;
60 63 }
61   - self.navigationController.viewControllers = tempArray;
62 64 }
63 65  
64 66 - (void)viewDidLoad {
... ... @@ -261,6 +263,14 @@
261 263 {
262 264 return [CNLiveCommuntTools cCommunt_setImageWithName:@"c_community_content_empty"];
263 265 }
  266 +- (NSAttributedString *)buttonTitleForEmptyDataSet:(UIScrollView *)scrollView forState:(UIControlState)state
  267 +{
  268 + return [[NSAttributedString alloc] initWithString:@"重试" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:UIColorHex(#CD0302)}];
  269 +}
  270 +- (void)emptyDataSet:(UIScrollView *)scrollView didTapButton:(UIButton *)button
  271 +{
  272 + [self reloadDataWithDataSource];
  273 +}
264 274 - (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView
265 275 {
266 276 return [UIColor whiteColor];
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyResultViewController.m
... ... @@ -56,7 +56,7 @@
56 56 [super viewDidLoad];
57 57 // Do any additional setup after loading the view.
58 58 self.view.backgroundColor = [UIColor whiteColor];
59   - self.title = self.isSuccess?@"支付成功":@"支付失败";
  59 + self.title = self.isSuccess?@"报名成功":@"报名失败";
60 60  
61 61 [self.view addSubview:self.statusButton];
62 62 [self.view addSubview:self.nameLabel];
... ... @@ -91,8 +91,8 @@
91 91 {
92 92 if (!_statusButton) {
93 93 _statusButton = [[QMUIButton alloc] init];
94   - [_statusButton setTitle:self.isSuccess?@"支付成功":@"支付失败" forState:UIControlStateNormal];
95   - [_statusButton setTitle:self.isSuccess?@"支付成功":@"支付失败" forState:UIControlStateHighlighted];
  94 + [_statusButton setTitle:self.isSuccess?@"报名成功":([self.msg isNotBlank]?@"报名失败":@"支付失败") forState:UIControlStateNormal];
  95 + [_statusButton setTitle:self.isSuccess?@"报名成功":([self.msg isNotBlank]?@"报名失败":@"支付失败") forState:UIControlStateHighlighted];
96 96 [_statusButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:self.isSuccess?@"c_communty_result_success":@"c_communty_result_failer"] forState:UIControlStateNormal];
97 97 [_statusButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:self.isSuccess?@"c_communty_result_success":@"c_communty_result_failer"] forState:UIControlStateHighlighted];
98 98 [_statusButton setTitleColor:UIColorBlack forState:UIControlStateNormal];
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserEditViewController.m
... ... @@ -125,6 +125,7 @@
125 125 if ([key isEqualToString:@"mobile"]) [QMUITips showWithText:@"联系方式不能为空"];
126 126 return;
127 127 }
  128 +
128 129 __weak typeof(self) weakSelf = self;
129 130 [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES isNew:self.userDict.allKeys.count == 0 CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) {
130 131 [weakSelf.navigationController popViewControllerAnimated:YES];
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserListViewController.h
... ... @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
13 13  
14 14 /// 初始化报名界面
15 15 /// @param completerBlock 返回
16   -- (instancetype)initWithStyle:(UITableViewStyle)style CompleterBlock:(void(^)(NSArray * userArray))completerBlock;
  16 +- (instancetype)initWithStyle:(UITableViewStyle)style selectArray:(NSMutableArray *)selectArray CompleterBlock:(void(^)(NSArray * userArray))completerBlock;
17 17  
18 18 @end
19 19  
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserListViewController.m
... ... @@ -10,6 +10,8 @@
10 10 @interface CNLiveCommuntyUserListViewController ()<CNLiveCommuntSignUpUserViewDelegate,DZNEmptyDataSetSource,DZNEmptyDataSetDelegate>
11 11 @property (nonatomic, strong) NSMutableArray *userArray;
12 12 @property (nonatomic, strong) NSMutableArray *selectArray;
  13 +@property (nonatomic, strong) UIButton * payButton;
  14 +@property (nonatomic, strong) UIView * bottemView;
13 15 @property (nonatomic, copy) void(^completerBlock)(NSArray * userArray);
14 16 @end
15 17  
... ... @@ -22,13 +24,16 @@
22 24 [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO isNew:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) {
23 25 weakSelf.userArray = [[NSMutableArray alloc] initWithArray:userArray];
24 26 [weakSelf.tableView reloadData];
  27 +
  28 + [weakSelf setupWithBottemView:weakSelf.selectArray.count > 0];
25 29 }];
26 30 }
27 31  
28   -- (instancetype)initWithStyle:(UITableViewStyle)style CompleterBlock:(void(^)(NSArray * userArray))completerBlock
  32 +- (instancetype)initWithStyle:(UITableViewStyle)style selectArray:(NSMutableArray *)selectArray CompleterBlock:(void(^)(NSArray * userArray))completerBlock
29 33 {
30 34 self = [super initWithStyle:style];
31 35 if (self) {
  36 + _selectArray = selectArray;
32 37 _completerBlock = completerBlock;
33 38 }
34 39 return self;
... ... @@ -39,8 +44,7 @@
39 44 // Do any additional setup after loading the view.
40 45 self.view.backgroundColor = UIColorHex(#F9F9F9);
41 46 self.title = @"添加参与人";
42   -
43   - self.selectArray = [[NSMutableArray alloc] init];
  47 +
44 48  
45 49 UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
46 50 submiteBtn.frame = CGRectMake(0, 0, 50, 14);
... ... @@ -58,35 +62,42 @@
58 62 }
59 63 -(void)setupWithBottemView:(BOOL)isShow
60 64 {
61   - __weak typeof(self) weakSelf = self;
62   - UIView * bottemView = [[UIView alloc] init];
63   - bottemView.hidden = !isShow;
64   - bottemView.backgroundColor = [UIColor whiteColor];
65   - [self.view addSubview:bottemView];
66   - [bottemView mas_makeConstraints:^(MASConstraintMaker *make) {
67   - make.left.right.bottom.mas_equalTo(weakSelf.view);
68   - make.height.mas_equalTo(50+kVerticalBottomSafeHeight);
69   - }];
70   -
71   - UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom];
72   - [payButton setTitle:@"确定" forState:UIControlStateNormal];
73   - [payButton setTitle:@"确定" forState:UIControlStateHighlighted];
74   - [payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
75   - [payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
76   - payButton.backgroundColor = UIColorHex(#CD0302);
77   - payButton.layer.masksToBounds = YES;
78   - payButton.layer.cornerRadius = 18;
79   - payButton.hidden = !isShow;
80   - payButton.titleLabel.font = [UIFont systemFontOfSize:16];
81   - payButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];
82   - [payButton addTarget:self action:@selector(doneAction:) forControlEvents:UIControlEventTouchUpInside];
83   - [bottemView addSubview:payButton];
84   - [payButton mas_makeConstraints:^(MASConstraintMaker *make) {
85   - make.top.mas_equalTo(bottemView.mas_top).offset(7);
86   - make.right.mas_equalTo(bottemView.mas_right).offset(-10);
87   - make.height.mas_equalTo(36);
88   - make.width.mas_equalTo(kScreenWidth - 30);
89   - }];
  65 + if (!self.bottemView && !self.payButton) {
  66 + __weak typeof(self) weakSelf = self;
  67 + UIView * bottemView = [[UIView alloc] init];
  68 + bottemView.backgroundColor = [UIColor whiteColor];
  69 + [self.view addSubview:bottemView];
  70 + bottemView.hidden = !isShow;
  71 + self.bottemView = bottemView;
  72 + [bottemView mas_makeConstraints:^(MASConstraintMaker *make) {
  73 + make.left.right.bottom.mas_equalTo(weakSelf.view);
  74 + make.height.mas_equalTo(50+kVerticalBottomSafeHeight);
  75 + }];
  76 +
  77 + UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom];
  78 + [payButton setTitle:@"确定" forState:UIControlStateNormal];
  79 + [payButton setTitle:@"确定" forState:UIControlStateHighlighted];
  80 + [payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  81 + [payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
  82 + payButton.backgroundColor = UIColorHex(#CD0302);
  83 + payButton.layer.masksToBounds = YES;
  84 + payButton.layer.cornerRadius = 18;
  85 + payButton.hidden = !isShow;
  86 + payButton.titleLabel.font = [UIFont systemFontOfSize:16];
  87 + payButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];
  88 + [payButton addTarget:self action:@selector(doneAction:) forControlEvents:UIControlEventTouchUpInside];
  89 + [bottemView addSubview:payButton];
  90 + self.payButton = payButton;
  91 + [payButton mas_makeConstraints:^(MASConstraintMaker *make) {
  92 + make.top.mas_equalTo(bottemView.mas_top).offset(7);
  93 + make.right.mas_equalTo(bottemView.mas_right).offset(-10);
  94 + make.height.mas_equalTo(36);
  95 + make.width.mas_equalTo(kScreenWidth - 30);
  96 + }];
  97 + }else{
  98 + self.bottemView.hidden = !isShow;
  99 + self.payButton.hidden = !isShow;
  100 + }
90 101 }
91 102 -(void)doneAction:(UIButton *)button
92 103 {
... ... @@ -133,6 +144,7 @@
133 144 if ([self.selectArray containsObject:subDict]) [self.selectArray removeObject:subDict];
134 145 }
135 146 [self setupWithBottemView:self.selectArray.count > 0];
  147 +
136 148 }
137 149 #pragma mark - DZNEmptyDataSetSource Methods
138 150 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
... ... @@ -173,7 +185,7 @@
173 185 }
174 186 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
175 187 {
176   - CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView isAddUser:YES UserDict:self.userArray[indexPath.row]];
  188 + CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:self.selectArray isAddUser:YES UserDict:self.userArray[indexPath.row]];
177 189 userView.delegate = self;
178 190 return userView;
179 191 }
... ...
CNLiveCommuntyModule/Classes/ViewModel/CNLiveCommuntViewModel.m
... ... @@ -138,7 +138,7 @@
138 138 NSMutableArray * tempArray = [CNLiveCommuntyActivityHomeListModel mj_objectArrayWithKeyValuesArray:[responseObject arrayForKey:@"list"]];
139 139 if (completerBlock) completerBlock(tempArray,[responseObject boolValueForKey:@"isLastPage" default:YES]);
140 140 }else{
141   - if (completerBlock) completerBlock(@[],YES);
  141 +// if (completerBlock) completerBlock(@[],YES);
142 142 }
143 143 }];
144 144 }];
... ... @@ -161,7 +161,7 @@
161 161 NSMutableArray * tempArray = [CNLiveCommuntyActivityRecordListModel mj_objectArrayWithKeyValuesArray:[responseObject arrayForKey:@"list"]];
162 162 if (completerBlock) completerBlock(tempArray,[responseObject boolValueForKey:@"isLastPage" default:YES]);
163 163 }else{
164   - if (completerBlock) completerBlock(@[],YES);
  164 +// if (completerBlock) completerBlock(@[],YES);
165 165 }
166 166 }];
167 167 }];
... ... @@ -183,7 +183,7 @@
183 183 NSMutableArray * tempArray = [CNLiveCommuntyActivityRepairListModel mj_objectArrayWithKeyValuesArray:[responseObject arrayForKey:@"list"]];
184 184 if (completerBlock) completerBlock(tempArray,[responseObject boolValueForKey:@"isLastPage" default:YES]);
185 185 }else{
186   - if (completerBlock) completerBlock(@[],YES);
  186 +// if (completerBlock) completerBlock(@[],YES);
187 187 }
188 188 }];
189 189 }];
... ... @@ -424,7 +424,7 @@
424 424 CNLiveCommuntyActivitySignUpModel * signUpModel = [CNLiveCommuntyActivitySignUpModel mj_objectWithKeyValues:responseObject];
425 425 if (completerBlock) completerBlock(signUpModel);
426 426 }else{
427   - if (completerBlock) completerBlock(nil);
  427 +// if (completerBlock) completerBlock(nil);
428 428 }
429 429 }];
430 430 }];
... ... @@ -464,7 +464,13 @@
464 464 }
465 465 if (isReplace) [tempArray addObject:userDict];
466 466 }else{
467   - [tempArray addObject:userDict];
  467 + BOOL isEqual_dict = NO;
  468 + for (NSDictionary * userSubDict in tempArray) {
  469 + NSMutableDictionary * d_01 = [[NSMutableDictionary alloc] initWithDictionary:userSubDict];
  470 + NSMutableDictionary * d_02 = [[NSMutableDictionary alloc] initWithDictionary:userDict];
  471 + isEqual_dict = [d_01 isEqual:d_02];
  472 + }
  473 + if (!isEqual_dict) [tempArray addObject:userDict];
468 474 }
469 475 NSString * user_info = [tempArray mj_JSONString];
470 476 [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey];
... ...
Example/CNLiveCommuntyModule/CNLIVEAppDelegate.m
... ... @@ -23,7 +23,7 @@
23 23 [IQKeyboardManager sharedManager].enable = YES;
24 24 [IQKeyboardManager sharedManager].enableAutoToolbar = YES;
25 25  
26   - [CNUserInfoManager manager].userInfoModel.uid = @"395098";//@"145680";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10458139";//@"10537318";//@"10499533";//@"11973842"
  26 + [CNUserInfoManager manager].userInfoModel.uid = @"10458139";//@"145680";//@"395098";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10537318";//@"10499533";//@"11973842"
27 27  
28 28 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
29 29 // [[NSUserDefaults standardUserDefaults] synchronize];
... ...
Example/CNLiveCommuntyModule/CNLIVEViewController.m
... ... @@ -42,7 +42,7 @@
42 42 {
43 43 if (!_dataArray) {
44 44 _dataArray = [[NSMutableArray alloc] initWithArray:@[
45   - @"有底部导航栏的界面",@"活动记录",@"报修记录",@"填写记录",@"活动评价",@"报名",@"订单详情-未接单",@"订单详情-已接单",@"145680",@"暂时点击无效",@"选择小区",@"主界面跳转"
  45 + @"有底部导航栏的界面",@"活动记录",@"报修记录",@"填写记录",@"活动评价",@"报名",@"订单详情-未接单",@"查看详情界面",[CNUserInfoManager manager].userInfoModel.uid,@"暂时点击无效",@"选择小区",@"主界面跳转"
46 46 ]];
47 47 }
48 48 return _dataArray;
... ... @@ -130,8 +130,9 @@
130 130  
131 131 }
132 132 if (indexPath.row == 3) {
133   - NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
134   - CNLiveCommuntInformViewController * informView = [[CNLiveCommuntInformViewController alloc] initWithNBhdId:nbhdId];
  133 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]];
  134 + NSDictionary * dict = [nb_info mj_JSONObject];
  135 + CNLiveCommuntInformViewController * informView = [[CNLiveCommuntInformViewController alloc] initWithNBhdId:[dict stringValueForKey:@"id" default:@""]];
135 136 [self.navigationController pushViewController:informView animated:YES];
136 137 }
137 138 if (indexPath.row == 4) {
... ... @@ -159,8 +160,8 @@
159 160 // [self.navigationController pushViewController:orderVC animated:YES];
160 161 // }
161 162 if (indexPath.row == 8) {
162   - [CNUserInfoManager manager].userInfoModel.uid = self.isChange ? @"11973842" : @"145680";
163   - [self.dataArray replaceObjectAtIndex:8 withObject:self.isChange ? @"11973842" : @"145680"];
  163 + [CNUserInfoManager manager].userInfoModel.uid = self.isChange ? @"11973842" : [CNUserInfoManager manager].userInfoModel.uid;
  164 + [self.dataArray replaceObjectAtIndex:8 withObject:self.isChange ? @"11973842" :[CNUserInfoManager manager].userInfoModel.uid];
164 165 self.isChange = !self.isChange;
165 166 NSMutableDictionary * mDict = [[NSMutableDictionary alloc] init];
166 167 [mDict setValue:[CNUserInfoManager manager].userInfoModel.uid forKey:@"loginSid"];
... ...