Commit 480e4d116a22ffed02c7c719fd3baf21d5c95599

Authored by liushiyu
1 parent 73d7e51d

0.0.9

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.8'
  11 + s.version = '0.0.9'
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,6 +59,7 @@
59 59  
60 60  
61 61 static NSString *const kCNLiveCommuntyNBhdInfoIdentifier = @"kCNLiveCommuntyNBhdInfoIdentifier";
  62 +static NSString *const kCNLiveCommuntySaveChangeUserInfoNotification = @"kCNLiveCommuntySaveChangeUserInfoNotification";
62 63  
63 64 #define isDemo [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] isEqualToString:@"org.cocoapods.demo.CNLiveCommuntyModule-Example"]
64 65 #endif /* CNLiveCommunitHeader_h */
... ...
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.h
... ... @@ -148,8 +148,6 @@ NS_ASSUME_NONNULL_BEGIN
148 148 @property (nonatomic, copy) NSString *userId;
149 149 @property (nonatomic, copy) NSString *repairId;
150 150 @property (nonatomic, copy) NSString *payType;
151   -@property (nonatomic, strong) NSNumber *intentEndTime;
152   -@property (nonatomic, copy) NSString *intentEndTimeString;
153 151 @property (nonatomic, copy) NSString *status;
154 152 @property (nonatomic, copy) NSString *repairProject;
155 153 @property (nonatomic, copy) NSString *idStr;
... ... @@ -162,6 +160,8 @@ NS_ASSUME_NONNULL_BEGIN
162 160 @property (nonatomic, copy) NSString *mobile;
163 161 @property (nonatomic, strong) NSNumber *intentBeginTime;
164 162 @property (nonatomic, copy) NSString *intentBeginTimeString;
  163 +@property (nonatomic, strong) NSNumber *intentEndTime;
  164 +@property (nonatomic, copy) NSString *intentEndTimeString;
165 165 @property (nonatomic, strong) NSNumber *cancleTime;
166 166 @property (nonatomic, copy) NSString *cancleTimeString;
167 167 @property (nonatomic, strong) NSNumber *createTime;
... ...
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
... ... @@ -239,15 +239,19 @@ MJCodingImplementation
239 239 }
240 240 if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"remark"]) {//问题描述
241 241 [tempDict addString:@"问题描述" forKey:@"key"];
242   - [tempDict addString:obj forKey:@"value"];
  242 + [tempDict addString:[obj isEqualToString:@"<null>"]?@"":obj forKey:@"value"];
243 243 [self.infoArray addObject:tempDict];
244 244 }
245 245 if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"intentBeginTime"]) {//联系地址
246 246 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)];
247 247 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
248 248 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  249 + NSString * startIntentString = [dateFormatter stringFromDate:detaildate];
  250 + NSDateFormatter *endFormatter = [[NSDateFormatter alloc] init];
  251 + [endFormatter setDateFormat:@"HH"];
  252 + NSString * endIntentString = [endFormatter stringFromDate:detaildate];
249 253 [tempDict addString:@"预约时间" forKey:@"key"];
250   - [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"];
  254 + [tempDict addString:[NSString stringWithFormat:@"%@~%ld:00",startIntentString,[endIntentString integerValue]+2] forKey:@"value"];
251 255 [self.infoArray addObject:tempDict];
252 256 }
253 257 if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"createTime"] && [status isEqualToString:@"0"]) {
... ... @@ -295,39 +299,40 @@ MJCodingImplementation
295 299 }
296 300 - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
297 301 {
298   - oldValue = [NSString stringWithFormat:@"%@",oldValue];
  302 + BOOL isNULL = [oldValue isKindOfClass:NSNull.class] || oldValue == nil;
  303 + oldValue = [NSString stringWithFormat:@"%@",isNULL?@"":oldValue];
299 304  
300   - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"createTime"]) {
  305 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) {
301 306 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
302 307 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
303 308 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
304 309 self.createTimeString = [dateFormatter stringFromDate:detaildate];
305 310 }
306   - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"repairTime"]) {
  311 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"repairTime"]) {
307 312 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
308 313 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
309 314 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
310 315 self.repairTimeString = [dateFormatter stringFromDate:detaildate];
311 316 }
312   - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"payTime"]) {
  317 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"payTime"]) {
313 318 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
314 319 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
315 320 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
316 321 self.payTimeString = [dateFormatter stringFromDate:detaildate];
317 322 }
318   - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"intentEndTime"]) {
  323 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"intentEndTime"]) {
319 324 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
320 325 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
321 326 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
322 327 self.intentEndTimeString = [dateFormatter stringFromDate:detaildate];
323 328 }
324   - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"intentBeginTime"]) {
  329 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"intentBeginTime"]) {
325 330 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
326 331 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
327 332 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
328 333 self.intentBeginTimeString = [dateFormatter stringFromDate:detaildate];
329 334 }
330   - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"cancleTime"]) {
  335 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"cancleTime"]) {
331 336 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
332 337 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
333 338 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
... ... @@ -348,33 +353,34 @@ MJCodingImplementation
348 353 }
349 354 - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
350 355 {
351   - oldValue = [NSString stringWithFormat:@"%@",oldValue];
  356 + BOOL isNULL = [oldValue isKindOfClass:NSNull.class] || oldValue == nil;
  357 + oldValue = [NSString stringWithFormat:@"%@",isNULL?@"":oldValue];
352 358  
353   - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"createTime"]) {
  359 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) {
354 360 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
355 361 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
356 362 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
357 363 self.createTimeString = [dateFormatter stringFromDate:detaildate];
358 364 }
359   - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"endTime"]) {
  365 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"endTime"]) {
360 366 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
361 367 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
362 368 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
363 369 self.endTimeString = [dateFormatter stringFromDate:detaildate];
364 370 }
365   - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"startTime"]) {
  371 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"startTime"]) {
366 372 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
367 373 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
368 374 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
369 375 self.startTimeString = [dateFormatter stringFromDate:detaildate];
370 376 }
371   - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"updateTime"]) {
  377 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"updateTime"]) {
372 378 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
373 379 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
374 380 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
375 381 self.updateTimeString = [dateFormatter stringFromDate:detaildate];
376 382 }
377   - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"signupEndTime"]) {
  383 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"signupEndTime"]) {
378 384 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
379 385 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
380 386 [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
... ... @@ -398,7 +404,9 @@ MJCodingImplementation
398 404  
399 405 - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
400 406 {
401   - oldValue = [NSString stringWithFormat:@"%@",oldValue];
  407 + BOOL isNULL = [oldValue isKindOfClass:NSNull.class] || oldValue == nil;
  408 + oldValue = [NSString stringWithFormat:@"%@",isNULL?@"":oldValue];
  409 +
402 410 if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) {
403 411 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
404 412 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
... ...
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.h
... ... @@ -48,6 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
48 48 @property (nonatomic, strong) UIButton * delectBtn;
49 49 @property (nonatomic, strong) UILabel * nameLabel;
50 50 @property (nonatomic, strong) UILabel * lineLabel;
  51 +@property (nonatomic, strong) UILabel * bottemLineLabel;
51 52 @property (nonatomic, strong) UILabel * sexAgeLabel;
52 53 @property (nonatomic, strong) UILabel * phoneLabel;
53 54 @property (nonatomic, strong) UIButton * editButton;
... ...
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
... ... @@ -195,6 +195,7 @@
195 195 [self.mainView addSubview:self.phoneLabel];
196 196 [self.mainView addSubview:self.delectBtn];
197 197 [self.mainView addSubview:self.editButton];
  198 + [self.mainView addSubview:self.bottemLineLabel];
198 199 }
199 200 return self;
200 201 }
... ... @@ -276,7 +277,7 @@
276 277 [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
277 278 make.centerY.mas_equalTo(weakSelf.nameLabel);
278 279 make.right.mas_equalTo(weakSelf.sexAgeLabel.mas_left).offset(-5);
279   - make.height.mas_equalTo(15);
  280 + make.height.mas_equalTo(10);
280 281 make.width.mas_equalTo(0.5);
281 282 }];
282 283 [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
... ... @@ -284,6 +285,12 @@
284 285 make.left.mas_equalTo(weakSelf.delectBtn.mas_right).offset(10);
285 286 make.right.mas_equalTo(weakSelf.lineLabel.mas_left).offset(-5);
286 287 }];
  288 + [self.bottemLineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  289 + make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(5);
  290 + make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-5);
  291 + make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-1);
  292 + make.height.mas_equalTo(1);
  293 + }];
287 294 }
288 295 #pragma mark =
289 296 -(UIView *)mainView
... ... @@ -311,10 +318,18 @@
311 318 if (!_lineLabel) {
312 319 _lineLabel = [[UILabel alloc] init];
313 320 _lineLabel.backgroundColor = UIColorHex(#C8C8C8);
314   - _lineLabel.hidden = YES;
  321 + _lineLabel.hidden = NO;
315 322 }
316 323 return _lineLabel;
317 324 }
  325 +-(UILabel *)bottemLineLabel
  326 +{
  327 + if (!_bottemLineLabel) {
  328 + _bottemLineLabel = [[UILabel alloc] init];
  329 + _bottemLineLabel.backgroundColor = UIColorHex(#F1F2F6);
  330 + }
  331 + return _bottemLineLabel;
  332 +}
318 333 -(UILabel *)sexAgeLabel
319 334 {
320 335 if (!_sexAgeLabel) {
... ... @@ -334,8 +349,8 @@
334 349 _phoneLabel.textColor = UIColorHex(#8A8A8A);
335 350 _phoneLabel.lineBreakMode = NSLineBreakByTruncatingTail;
336 351 _phoneLabel.numberOfLines = 1;
337   - _phoneLabel.font = [UIFont systemFontOfSize:11];
338   - _phoneLabel.font = [UIFont boldSystemFontOfSize:11];
  352 + _phoneLabel.font = [UIFont systemFontOfSize:13];
  353 + _phoneLabel.font = [UIFont boldSystemFontOfSize:13];
339 354 }
340 355 return _phoneLabel;
341 356 }
... ... @@ -639,12 +654,13 @@
639 654 [QMUITips showError:@"数字输入错误" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2];
640 655 return;
641 656 }
642   -
  657 + self.amoutField.text = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]];
643 658 if ([self.amoutField.text floatValue] >= 999999.99) {
644 659 if (![self.amoutField.text isEqualToString:@"1000000.0"]
645 660 && ![self.amoutField.text isEqualToString:@"1000000"]
646 661 && ![self.amoutField.text isEqualToString:@"1000000.00"]) {
647 662 [QMUITips showWithText:@"最高限额1000000元" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2];
  663 + self.amoutField.text = @"1000000.00";
648 664 return;
649 665 }
650 666 }
... ... @@ -655,7 +671,7 @@
655 671 __weak typeof(self) weakSelf = self;
656 672 if ([self.createModel.totalFee isNotBlank]
657 673 && [self.createModel.totalFee integerValue] > 0) {
658   - NSString * p = [NSString stringWithFormat:@"%.0f",([self.amoutField.text floatValue]*100)];
  674 + NSString * p = [NSString stringWithFormat:@"%ld",([self.amoutField.text integerValue]*100)];
659 675 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
660 676 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]];
661 677 weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl CompleterBlock:^{
... ... @@ -663,10 +679,11 @@
663 679 [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
664 680 }];
665 681 [[NSNotificationCenter defaultCenter] addObserver:weakSelf selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
  682 + if (weakSelf.reloadBlock) weakSelf.reloadBlock();
666 683 }];
667 684 }else{
668 685 [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{
669   - NSString * p = [NSString stringWithFormat:@"%.0f",([weakSelf.amoutField.text floatValue]*100)];
  686 + NSString * p = [NSString stringWithFormat:@"%ld",([weakSelf.amoutField.text integerValue]*100)];
670 687 weakSelf.amoutField.enabled = NO;
671 688 weakSelf.amoutField.textColor = UIColorHex(#c8c8c8);
672 689 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
... ... @@ -676,6 +693,7 @@
676 693 [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
677 694 }];
678 695 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
  696 + if (weakSelf.reloadBlock) weakSelf.reloadBlock();
679 697 }];
680 698 }];
681 699 }
... ... @@ -690,7 +708,7 @@
690 708 [QMUITips showError:@"数字输入错误" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2];
691 709 return;
692 710 }
693   -
  711 + self.amoutField.text = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]];
694 712 if ([self.amoutField.text floatValue] >= 999999.99) {
695 713 if (![self.amoutField.text isEqualToString:@"1000000.0"]
696 714 && ![self.amoutField.text isEqualToString:@"1000000"]
... ... @@ -705,7 +723,7 @@
705 723 }
706 724 __weak typeof(self) weakSelf = self;
707 725 [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{
708   - NSString * p = [NSString stringWithFormat:@"%.0f",([weakSelf.amoutField.text floatValue]*100)];
  726 + NSString * p = [NSString stringWithFormat:@"%ld",([self.amoutField.text integerValue]*100)];
709 727 weakSelf.amoutField.enabled = NO;
710 728 weakSelf.amoutField.textColor = UIColorHex(#c8c8c8);
711 729 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
... ... @@ -729,9 +747,9 @@
729 747 - (BOOL)textFieldShouldEndEditing:(UITextField *)textField
730 748 {
731 749 if ([textField.text isNotBlank] && textField.text.length > 10) {
732   - [QMUITips showWithText:@"最长10位!超出部分会在输入完成时自动删除" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2];
  750 + [QMUITips showWithText:@"最高限额1000000.00元" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2];
733 751 //如果是表情的话 这里容易截断显示
734   - textField.text = [textField.text substringToIndex:10];
  752 + textField.text = @"1000000.00";
735 753 }
736 754 return YES;
737 755 }
... ... @@ -778,7 +796,6 @@
778 796 _amoutField.font = [UIFont systemFontOfSize:14.0f];
779 797 _amoutField.textColor = UIColorHex(#333333);
780 798 _amoutField.clearButtonMode = UITextFieldViewModeWhileEditing;
781   - _amoutField.clearsOnBeginEditing = YES;
782 799 _amoutField.keyboardType = UIKeyboardTypeDefault;
783 800 _amoutField.textAlignment = NSTextAlignmentLeft;
784 801 _amoutField.keyboardType = UIKeyboardTypeDecimalPad;
... ...
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSubView.m
... ... @@ -337,7 +337,6 @@
337 337 [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
338 338 make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-10);
339 339 make.left.mas_equalTo(weakSelf.imgView.mas_right).offset(10);
340   - make.right.mas_equalTo(weakSelf.evalButton.mas_right).offset(-10);
341 340 }];
342 341 }
343 342 #pragma mark -
... ... @@ -630,10 +629,15 @@
630 629 -(void)setSubDict:(NSDictionary *)subDict
631 630 {
632 631 _subDict = subDict;
633   - NSMutableAttributedString * nameString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"*%@",[subDict stringValueForKey:@"name" default:@""]]];
634   - [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#CD0302) range:[nameString.string rangeOfString:@"*"]];
635   - [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#333333) range:[nameString.string rangeOfString:[subDict stringValueForKey:@"name" default:@""]]];
636   - self.nameLabel.attributedText = nameString;
  632 + NSString * name = [subDict stringValueForKey:@"name" default:@""];
  633 + if (![name isEqualToString:@"问题描述"]) {
  634 + NSMutableAttributedString * nameString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"*%@",[subDict stringValueForKey:@"name" default:@""]]];
  635 + [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#CD0302) range:[nameString.string rangeOfString:@"*"]];
  636 + [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#333333) range:[nameString.string rangeOfString:[subDict stringValueForKey:@"name" default:@""]]];
  637 + self.nameLabel.attributedText = nameString;
  638 + }else{
  639 + self.nameLabel.text = name;
  640 + }
637 641 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*联系电话"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault;
638 642 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*年龄"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault;
639 643 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*联系方式"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault;
... ... @@ -855,12 +859,12 @@
855 859 if (!_contentField) {
856 860 _contentField = [[UITextField alloc] init];
857 861 _contentField.backgroundColor = [UIColor whiteColor];
858   - _contentField.font = [UIFont systemFontOfSize:14.0f];
  862 + _contentField.font = [UIFont systemFontOfSize:16.0f];
859 863 _contentField.textColor = UIColorHex(#333333);
860 864 _contentField.clearButtonMode = UITextFieldViewModeWhileEditing;
861 865 _contentField.textAlignment = NSTextAlignmentRight;
862 866 _contentField.adjustsFontSizeToFitWidth = YES;
863   - _contentField.minimumFontSize = 12;
  867 + _contentField.minimumFontSize = 13;
864 868 _contentField.returnKeyType = UIReturnKeyNext;
865 869 _contentField.hidden = YES;
866 870 _contentField.delegate = self;
... ... @@ -877,7 +881,7 @@
877 881 _descTextView.placeholderColor = UIColorHex(#C8C8C8);
878 882 _descTextView.placeholder = @"您遇到什么问题,请留言";
879 883 _descTextView.textColor = UIColorHex(#333333);
880   - _descTextView.font = [UIFont systemFontOfSize:14.0f];
  884 + _descTextView.font = [UIFont systemFontOfSize:16.0f];
881 885 _descTextView.returnKeyType = UIReturnKeyDone;
882 886 _descTextView.maximumTextLength = 100;
883 887 _descTextView.textContainerInset = UIEdgeInsetsMake(2.5, 2.5, 2.5, 2.5);
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntInformViewController.m
... ... @@ -103,8 +103,8 @@
103 103 @{@"name":@"联系人",@"placeholder":@"请输入姓名",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO},
104 104 @{@"name":@"联系地址",@"placeholder":@"请输入联系地址",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO},
105 105 @{@"name":@"联系电话",@"placeholder":@"请输入联系电话",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO},
106   - @{@"name":@"报修项目",@"placeholder":@"请输入报修项目",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO},
107   - @{@"name":@"上门时间",@"placeholder":@"请输入上门时间",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO},
  106 + @{@"name":@"报修项目",@"placeholder":@"请选择报修项目",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO},
  107 + @{@"name":@"上门时间",@"placeholder":@"请选择上门时间",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO},
108 108 @{@"name":@"问题描述",@"placeholder":@"您遇到什么问题,请留言",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@YES,@"isImage":@NO,@"isChick":@NO},
109 109 // @{@"name":@"",@"placeholder":@"",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@YES,@"isChick":@NO},
110 110 ]];
... ... @@ -191,8 +191,8 @@
191 191 NSString * startString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].firstObject;
192 192 NSString * endString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].lastObject;
193 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];
  194 + NSString * temp_start_time = [NSString stringWithFormat:@"%@ %@:00",dayString,startString];
  195 + NSString * temp_end_time = [NSString stringWithFormat:@"%@ %@:00",dayString,endString];
196 196 [paramDict addString:[temp_start_time isNotBlank]?temp_start_time:@"" forKey:@"beginTime"];
197 197 [paramDict addString:[temp_end_time isNotBlank]?temp_end_time:@"" forKey:@"endTime"];
198 198 }else{
... ... @@ -205,14 +205,15 @@
205 205 if ([[paramDict allValues] containsObject:@""]) {
206 206 NSInteger index = [[paramDict allValues] indexOfObject:@""];
207 207 NSString * key = [[paramDict allKeys] objectAtIndex:index];
208   - if ([key isEqualToString:@"userName"]) [QMUITips showWithText:@"联系人不能为空"];
209   - if ([key isEqualToString:@"address"]) [QMUITips showWithText:@"联系地址不能为空"];
210   - if ([key isEqualToString:@"phone"]) [QMUITips showWithText:@"联系电话不能为空"];
211   - if ([key isEqualToString:@"repairProject"]) [QMUITips showWithText:@"报修项目不能为空"];
212   - if ([key isEqualToString:@"beginTime"]) [QMUITips showWithText:@"请选择上门时间"];
213   - if ([key isEqualToString:@"endTime"]) [QMUITips showWithText:@"请选择上门时间"];
214   - if ([key isEqualToString:@"remark"]) [QMUITips showWithText:@"问题描述不能为空"];
215   - return;
  208 + if (![key isEqualToString:@"remark"]) {
  209 + if ([key isEqualToString:@"userName"]) [QMUITips showWithText:@"联系人不能为空"];
  210 + if ([key isEqualToString:@"address"]) [QMUITips showWithText:@"联系地址不能为空"];
  211 + if ([key isEqualToString:@"phone"]) [QMUITips showWithText:@"联系电话不能为空"];
  212 + if ([key isEqualToString:@"repairProject"]) [QMUITips showWithText:@"报修项目不能为空"];
  213 + if ([key isEqualToString:@"beginTime"]) [QMUITips showWithText:@"请选择上门时间"];
  214 + if ([key isEqualToString:@"endTime"]) [QMUITips showWithText:@"请选择上门时间"];
  215 + return;
  216 + }
216 217 }
217 218 __weak typeof(self) weakSelf = self;
218 219 [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenPushWithParamDict:paramDict nbhdId:self.nbhdId CompleterBlock:^(CNLiveCommuntyActivityMaintainsCreateModel * _Nonnull createModel) {
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntListViewController.m
... ... @@ -12,6 +12,7 @@
12 12 @property (nonatomic, assign) CNLiveCommuntListShowType showType;
13 13 @property (nonatomic, strong) CNLiveRefreshFooter * footerView;
14 14 @property (nonatomic, strong) NSMutableArray * dataArray;
  15 +@property (nonatomic, strong) NSIndexPath * selectIndexPath;
15 16 @property (nonatomic, copy) NSString * nbhdId;
16 17 @property (nonatomic, assign) NSInteger index;
17 18 @property (nonatomic, assign) NSInteger page;
... ... @@ -44,6 +45,7 @@
44 45 -(void)viewDidAppear:(BOOL)animated
45 46 {
46 47 [super viewDidAppear:animated];
  48 + self.page = 1;
47 49 [self loadDataSourceWithPage:1 nbhdId:self.nbhdId index:self.index CompleterBlock:NULL];
48 50 }
49 51 - (void)viewDidLoad {
... ... @@ -79,6 +81,11 @@
79 81 [weakSelf.tableView.mj_footer endRefreshing];
80 82 if (isLastPage) [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
81 83 if (page == 1 && weakSelf.dataArray.count == 0 && weakSelf.tableView.mj_footer) weakSelf.tableView.mj_footer = nil;
  84 + if (weakSelf.selectIndexPath) {
  85 + BOOL isEnough = weakSelf.dataArray.count <= weakSelf.selectIndexPath.row;
  86 + if (!isEnough) weakSelf.selectIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
  87 + [weakSelf.tableView scrollToRowAtIndexPath:weakSelf.selectIndexPath atScrollPosition:isEnough?UITableViewScrollPositionNone:UITableViewScrollPositionTop animated:NO];
  88 + }
82 89 }];
83 90 }
84 91  
... ... @@ -104,6 +111,10 @@
104 111 [super layoutTableView];
105 112  
106 113 }
  114 +-(void)dealloc
  115 +{
  116 + self.selectIndexPath = nil;
  117 +}
107 118 #pragma mark - DZNEmptyDataSetSource Methods
108 119 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
109 120 {
... ... @@ -208,6 +219,7 @@
208 219 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
209 220 {
210 221 if (self.showType == CNLiveCommuntListShowTypeRepair) {
  222 + self.selectIndexPath = indexPath;
211 223 CNLiveCommuntyActivityRepairListModel * repairModel = self.dataArray[indexPath.row];
212 224 if (self.index == 3) {
213 225 CNLiveCommuntyOrderViewController * orderView = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListCompletOrder MaintenId:repairModel.idStr];
... ... @@ -221,10 +233,12 @@
221 233 }
222 234 }
223 235 if (self.showType == CNLiveCommuntListShowTypeRecord) {
  236 + self.selectIndexPath = indexPath;
224 237 CNLiveCommuntyActivityRecordListModel * repairModel = self.dataArray[indexPath.row];
225 238 [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:repairModel.handworkId];
226 239 }
227 240 if (self.showType == CNLiveCommuntListShowTypeHome) {
  241 + self.selectIndexPath = indexPath;
228 242 CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row];
229 243 [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:listModel.idStr];
230 244 }
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
... ... @@ -27,7 +27,18 @@
27 27 }
28 28 return self;
29 29 }
30   -
  30 +//-(void)viewDidAppear:(BOOL)animated
  31 +//{
  32 +// [super viewDidAppear:animated];
  33 +// __weak typeof(self) weakSelf = self;
  34 +// [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO isNew:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) {
  35 +// for (NSDictionary * userDict in userArray) {
  36 +//// [weakSelf.userArray addObjectsFromArray:userArray];
  37 +//// [weakSelf.tableView reloadData];
  38 +//// [weakSelf setupWithBottemView:weakSelf.userArray.count];
  39 +// }
  40 +// }];
  41 +//}
31 42 - (void)viewDidLoad {
32 43 [super viewDidLoad];
33 44 // Do any additional setup after loading the view.
... ... @@ -45,8 +56,23 @@
45 56 [[weakSelf displayViewController] dsPopViewControllerAnimated:YES];
46 57 }
47 58 }];
  59 +
  60 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleChangeAction:) name:kCNLiveCommuntySaveChangeUserInfoNotification object:nil];
48 61  
49 62 }
  63 +-(void)handleChangeAction:(NSNotification *)note
  64 +{
  65 + NSDictionary * paramDict = (NSDictionary *)note.object;
  66 + NSString * idStr = [paramDict stringValueForKey:@"id" default:@""];
  67 + for (NSDictionary * subDict in self.userArray) {
  68 + NSString * idStr_temp = [subDict stringValueForKey:@"id" default:@""];
  69 + if ([idStr_temp isEqualToString:idStr]) {
  70 + [self.userArray replaceObjectAtIndex:[self.userArray indexOfObject:subDict] withObject:paramDict];
  71 + [self.tableView reloadData];
  72 + return;
  73 + }
  74 + }
  75 +}
50 76 -(void)addTopNavigationWithView
51 77 {
52 78 if ([self.detailModel.mobile isNotBlank]) {
... ... @@ -74,14 +100,17 @@
74 100 -(void)addUserAction:(UIButton *)button
75 101 {
76 102 __weak typeof(self) weakSelf = self;
77   - CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped selectArray:self.userArray CompleterBlock:^(NSArray * _Nonnull userArray) {
78   -// [weakSelf.userArray removeAllObjects];
79   -// [weakSelf.userArray addObjectsFromArray:userArray];
  103 + NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:self.userArray];
  104 + CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped selectArray:tempArray CompleterBlock:^(NSArray * _Nonnull userArray) {
  105 + [weakSelf.userArray removeAllObjects];
  106 + [weakSelf.userArray addObjectsFromArray:userArray];
  107 + weakSelf.userArray = [[[weakSelf.userArray reverseObjectEnumerator] allObjects] mutableCopy];
80 108 [weakSelf.tableView reloadData];
81 109 [weakSelf setupWithBottemView:weakSelf.userArray.count];
82 110 }];
83 111 [self.navigationController pushViewController:userVC animated:YES];
84 112 }
  113 +
85 114 - (void)initTableView
86 115 {
87 116 [super initTableView];
... ... @@ -95,6 +124,7 @@
95 124 }
96 125 -(void)dealloc
97 126 {
  127 + [[NSNotificationCenter defaultCenter] removeObserver:self name:kCNLiveCommuntySaveChangeUserInfoNotification object:nil];
98 128 [[NSNotificationCenter defaultCenter] removeObserver:self name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil];
99 129 }
100 130 -(void)layoutTableView
... ... @@ -236,6 +266,7 @@
236 266 if (indexPath.section == 0) {
237 267 CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:@[] isAddUser:NO UserDict:self.userArray[indexPath.row]];
238 268 userView.delegate = self;
  269 + userView.bottemLineLabel.hidden = (indexPath.row == self.userArray.count - 1);
239 270 return userView;
240 271 }else{
241 272 __weak typeof(self) weakSelf = self;
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntViewController.m
... ... @@ -42,7 +42,7 @@
42 42 // Do any additional setup after loading the view.
43 43 self.selectColor = [UIColor colorWithHexString:@"0xCD0302"];
44 44 self.normalColor = [UIColor colorWithHexString:@"0x979797"];
45   -
  45 + self.hidesBottomBarWhenPushed = YES;
46 46 self.tabBar.backgroundColor = UIColorHex(#f9f9f9);
47 47  
48 48 __weak typeof(self) weakSelf = self;
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
... ... @@ -79,6 +79,7 @@
79 79 if (createModel) {
80 80 weakSelf.createMdoel = createModel;
81 81 if (weakSelf.isChat) weakSelf.showType = weakSelf.createMdoel.showType;
  82 + if ([weakSelf.createMdoel.repairId isNotBlank] && ![weakSelf.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) weakSelf.showType = CNLiveCommuntyOrderShowTypeChatYetOrder;
82 83 [weakSelf setupWithBottemView];
83 84 [weakSelf setupWithNaviView];
84 85 [weakSelf.tableView reloadData];
... ... @@ -89,8 +90,7 @@
89 90 -(void)setupWithNaviView
90 91 {
91 92 if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder
92   - || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder
93   - || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
  93 + || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) {
94 94 NSString * name = @"";
95 95 UIColor * titleColor = [UIColor whiteColor];
96 96 if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder
... ... @@ -98,11 +98,21 @@
98 98 name = @"咨询电话";
99 99 titleColor = UIColorHex(#0091FF);
100 100 }
101   - if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder
  101 + if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder
102 102 && [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
103 103 name = @"取消订单";
104 104 titleColor = UIColorHex(#F5A623FF);
105 105 }
  106 + if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder
  107 + && [self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
  108 + name = @"取消订单";
  109 + titleColor = UIColorHex(#F5A623FF);
  110 + }
  111 + if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder
  112 + && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
  113 + return;
  114 + }
  115 + if ([self.createMdoel.totalFee isNotBlank] && [self.createMdoel.totalFee integerValue] > 0) return;
106 116 UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
107 117 submiteBtn.frame = CGRectMake(0, 0, 50, 14);
108 118 [submiteBtn setTitle:name forState:UIControlStateNormal];
... ... @@ -157,9 +167,17 @@
157 167 make.height.mas_equalTo(36);
158 168 }];
159 169 }
  170 + if ([self.createMdoel.repairId isNotBlank] && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
  171 + payString = @"已接单";
  172 + self.payButton.backgroundColor = UIColorHex(#D7D7D7);
  173 + self.payButton.userInteractionEnabled = NO;
  174 + }else{
  175 + self.payButton.userInteractionEnabled = YES;
  176 + }
160 177 [self.payButton setTitle:payString forState:UIControlStateNormal];
161 178 [self.payButton setTitle:payString forState:UIControlStateHighlighted];
162 179  
  180 +
163 181 if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder && [self.createMdoel.totalFee isNotBlank] && [self.createMdoel.totalFee integerValue] > 0) {
164 182 self.payButton.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder;
165 183 self.bottemView.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder;
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserEditViewController.m
... ... @@ -96,7 +96,15 @@
96 96 NSMutableDictionary * paramDict = [[NSMutableDictionary alloc] initWithDictionary:self.userDict];
97 97 for (int i = 0; i < self.dataSource.count; i ++) {
98 98 CNLiveCommuntSubInputTableView * userCell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
99   - if (i == 0) [paramDict addString:[userCell.contentField.text isNotBlank]?userCell.contentField.text:@"" forKey:@"name"];
  99 + if (i == 0) {
  100 + NSString * name = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@"";
  101 + if ([name isNotBlank]) {
  102 + [paramDict addString:name forKey:@"name"];
  103 + }else{
  104 + [QMUITips showWithText:@"联系人不能为空"];
  105 + return;
  106 + }
  107 + }
100 108 if (i == 1) [paramDict addString:[userCell.sex isEqualToString:@"女"]?@"0":@"1" forKey:@"gender"];
101 109 if (i == 2) {
102 110 NSString * age = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@"";
... ... @@ -128,6 +136,7 @@
128 136  
129 137 __weak typeof(self) weakSelf = self;
130 138 [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES isNew:self.userDict.allKeys.count == 0 CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) {
  139 + [[NSNotificationCenter defaultCenter] postNotificationName:kCNLiveCommuntySaveChangeUserInfoNotification object:paramDict];
131 140 [weakSelf.navigationController popViewControllerAnimated:YES];
132 141 }];
133 142 }
... ...
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserListViewController.m
... ... @@ -24,7 +24,6 @@
24 24 [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO isNew:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) {
25 25 weakSelf.userArray = [[NSMutableArray alloc] initWithArray:userArray];
26 26 [weakSelf.tableView reloadData];
27   -
28 27 [weakSelf setupWithBottemView:weakSelf.selectArray.count > 0];
29 28 }];
30 29 }
... ... @@ -55,6 +54,7 @@
55 54 [submiteBtn addTarget:self action:@selector(rightBarButtonAction:) forControlEvents:UIControlEventTouchUpInside];
56 55 self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:submiteBtn];
57 56 }
  57 +
58 58 -(void)rightBarButtonAction:(UIButton *)button
59 59 {
60 60 CNLiveCommuntyUserEditViewController * editVC = [[CNLiveCommuntyUserEditViewController alloc] initWithUser:@{}];
... ... @@ -186,6 +186,7 @@
186 186 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
187 187 {
188 188 CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:self.selectArray isAddUser:YES UserDict:self.userArray[indexPath.row]];
  189 + userView.bottemLineLabel.hidden = (indexPath.row == self.userArray.count - 1);
189 190 userView.delegate = self;
190 191 return userView;
191 192 }
... ...
CNLiveCommuntyModule/Classes/ViewModel/CNLiveCommuntViewModel.m
... ... @@ -254,10 +254,10 @@
254 254 NSMutableArray * tArray = [[NSMutableArray alloc] init];
255 255 NSInteger start = i == 0 ? (components_h.hour-(components_h.hour%2)) : 0;
256 256 for (int i = 0; i < 12; i++) {
257   - [tArray addObject:[NSString stringWithFormat:@"%02ld~%02ld",start,start+2]];
  257 + [tArray addObject:[NSString stringWithFormat:@"%02ld:00~%02ld:00",start,start+2]];
258 258 start += 2;
259 259 }
260   - if (i == 0) [tArray removeObjectsInRange:NSMakeRange([tArray indexOfObject:@"22~24"]+1, tArray.count - [tArray indexOfObject:@"22~24"] - 1)];
  260 + if (i == 0) [tArray removeObjectsInRange:NSMakeRange([tArray indexOfObject:@"22:00~24:00"]+1, tArray.count - [tArray indexOfObject:@"22:00~24:00"] - 1)];
261 261  
262 262 NSTimeInterval secondsPerDay = i * 24*60*60;
263 263 NSDate *curDate = [NSDate dateWithTimeInterval:secondsPerDay sinceDate:[NSDate date]];
... ... @@ -377,7 +377,7 @@
377 377 [CNLiveNetworking setupShowDataResult:NO];
378 378 [CNLiveNetworking setupShowResult:YES];
379 379 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntPayMentTotalFeeOrderContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
380   - [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view.viewController.view];
  380 + [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
381 381 [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
382 382 if (responseObject) {
383 383 NSString * timestamp = [CNLiveCommuntViewModel getNowTimestamp];
... ... @@ -437,11 +437,37 @@
437 437 /// @param completerBlock 返回结果
438 438 +(void)requestWithCommuntySaveInfoUsersMentUserDict:(NSDictionary *)userDict isSave:(BOOL)isSave isNew:(BOOL)isNew CompleterBlock:(void(^)(NSArray * userArray, BOOL isSave))completerBlock
439 439 {
440   - NSString * cacheKey = [NSString stringWithFormat:@"%@/kCNLiveCommuntySaveInfoUsersMentKey04",[CNUserInfoManager manager].userInfoModel.uid];
  440 + NSString * cacheKey = [NSString stringWithFormat:@"%@/kCNLiveCommuntySaveInfoUsersMentKey06",[CNUserInfoManager manager].userInfoModel.uid];
441 441 if (isSave) {
442 442 if ([userDict allKeys].count > 0 && [userDict allValues].count > 0) {
443 443 NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]];
444 444 NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:[save_string mj_JSONObject]];
  445 + if (![userDict containsObjectForKey:@"id"] && isNew) {
  446 + NSString *timeSp = [NSString stringWithFormat:@"%ld",(long)[[NSDate date] timeIntervalSince1970]];
  447 + NSMutableDictionary * tempDict = [[NSMutableDictionary alloc] initWithDictionary:userDict];
  448 + [tempDict addString:timeSp forKey:@"id"];
  449 + [tempArray addObject:tempDict];
  450 + NSString * user_info = [tempArray mj_JSONString];
  451 + [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey];
  452 + if (completerBlock) completerBlock(@[],isSave);
  453 + }else{
  454 + NSString * idStr = [userDict stringValueForKey:@"id" default:@""];
  455 + NSMutableArray * tempArray01 = [[NSMutableArray alloc] initWithArray:tempArray];
  456 + for (NSDictionary * subDict in tempArray) {
  457 + NSString * idStr_temp = [subDict stringValueForKey:@"id" default:@""];
  458 + if ([idStr isEqualToString:idStr_temp]) {
  459 + [tempArray01 replaceObjectAtIndex:[tempArray indexOfObject:subDict] withObject:userDict];
  460 + break;
  461 + }
  462 + }
  463 + tempArray = tempArray01;
  464 + NSString * user_info = [tempArray mj_JSONString];
  465 + [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey];
  466 + if (completerBlock) completerBlock(@[],isSave);
  467 + }
  468 +
  469 +
  470 + /*
445 471 if (!isNew) {
446 472 BOOL isReplace = YES;
447 473 NSString * i_nameString = [userDict stringValueForKey:@"name" default:@""];
... ... @@ -472,9 +498,8 @@
472 498 }
473 499 if (!isEqual_dict) [tempArray addObject:userDict];
474 500 }
475   - NSString * user_info = [tempArray mj_JSONString];
476   - [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey];
477   - if (completerBlock) completerBlock(@[],isSave);
  501 + */
  502 +
478 503 }
479 504 }else{
480 505 NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]];
... ...
Example/CNLiveCommuntyModule.xcodeproj/project.pbxproj
... ... @@ -25,6 +25,7 @@
25 25 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
26 26 791464F727C4843600D58C68 /* CNLIVEMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 791464F427C4843600D58C68 /* CNLIVEMainViewController.m */; };
27 27 791464F827C4843600D58C68 /* CNLiveCommunitModuleImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 791464F627C4843600D58C68 /* CNLiveCommunitModuleImpl.m */; };
  28 + 7947273527D0693B002BE846 /* CNLIVETabberViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7947273427D0693B002BE846 /* CNLIVETabberViewController.m */; };
28 29 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
29 30 /* End PBXBuildFile section */
30 31  
... ... @@ -67,6 +68,8 @@
67 68 791464F427C4843600D58C68 /* CNLIVEMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLIVEMainViewController.m; sourceTree = "<group>"; };
68 69 791464F527C4843600D58C68 /* CNLiveCommunitModuleImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveCommunitModuleImpl.h; sourceTree = "<group>"; };
69 70 791464F627C4843600D58C68 /* CNLiveCommunitModuleImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveCommunitModuleImpl.m; sourceTree = "<group>"; };
  71 + 7947273327D0693B002BE846 /* CNLIVETabberViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVETabberViewController.h; sourceTree = "<group>"; };
  72 + 7947273427D0693B002BE846 /* CNLIVETabberViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVETabberViewController.m; sourceTree = "<group>"; };
70 73 79EA711F7A32917A3445172F /* Pods_CNLiveCommuntyModule_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveCommuntyModule_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
71 74 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
72 75 A3F1027952916F49DBC7AEB2 /* Pods-CNLiveCommuntyModule_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveCommuntyModule_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveCommuntyModule_Tests/Pods-CNLiveCommuntyModule_Tests.release.xcconfig"; sourceTree = "<group>"; };
... ... @@ -154,6 +157,8 @@
154 157 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
155 158 6003F5A5195388D20070C39A /* CNLIVEViewController.h */,
156 159 6003F5A6195388D20070C39A /* CNLIVEViewController.m */,
  160 + 7947273327D0693B002BE846 /* CNLIVETabberViewController.h */,
  161 + 7947273427D0693B002BE846 /* CNLIVETabberViewController.m */,
157 162 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */,
158 163 6003F5A8195388D20070C39A /* Images.xcassets */,
159 164 791464F527C4843600D58C68 /* CNLiveCommunitModuleImpl.h */,
... ... @@ -479,6 +484,7 @@
479 484 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */,
480 485 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */,
481 486 791464F727C4843600D58C68 /* CNLIVEMainViewController.m in Sources */,
  487 + 7947273527D0693B002BE846 /* CNLIVETabberViewController.m in Sources */,
482 488 6003F59A195388D20070C39A /* main.m in Sources */,
483 489 791464F827C4843600D58C68 /* CNLiveCommunitModuleImpl.m in Sources */,
484 490 );
... ...
Example/CNLiveCommuntyModule/CNLIVEAppDelegate.m
... ... @@ -14,6 +14,7 @@
14 14 #import "CNLIVEViewController.h"
15 15 #import <IQKeyboardManager/IQKeyboardManager.h>
16 16 #import "CNLiveCommuntViewController.h"
  17 +#import "CNLIVETabberViewController.h"
17 18 @implementation CNLIVEAppDelegate
18 19  
19 20 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
... ... @@ -23,13 +24,13 @@
23 24 [IQKeyboardManager sharedManager].enable = YES;
24 25 [IQKeyboardManager sharedManager].enableAutoToolbar = YES;
25 26  
26   - [CNUserInfoManager manager].userInfoModel.uid = @"10458139";//@"145680";//@"395098";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10537318";//@"10499533";//@"11973842"
  27 + [CNUserInfoManager manager].userInfoModel.uid = @"10458139";//@"145680";//@"395098";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10537318";//@"10499533";//@"11973842";//@"1342671"
27 28  
28 29 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
29 30 // [[NSUserDefaults standardUserDefaults] synchronize];
30 31  
31 32 [self setParamNet];
32   - UINavigationController *navCtrl = [[QMUINavigationController alloc] initWithRootViewController:[[CNLIVEViewController alloc] init]];
  33 + UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[[CNLIVETabberViewController alloc] init]];
33 34  
34 35 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
35 36 self.window.rootViewController = navCtrl;
... ...
Example/CNLiveCommuntyModule/CNLIVETabberViewController.h 0 → 100644
  1 +//
  2 +// CNLIVETabberViewController.h
  3 +// CNLiveCommuntyModule_Example
  4 +//
  5 +// Created by open on 2022/3/3.
  6 +// Copyright © 2022 woshiliushiyu. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +NS_ASSUME_NONNULL_BEGIN
  12 +
  13 +@interface CNLIVETabberViewController : UITabBarController
  14 +
  15 +@end
  16 +
  17 +NS_ASSUME_NONNULL_END
... ...
Example/CNLiveCommuntyModule/CNLIVETabberViewController.m 0 → 100644
  1 +//
  2 +// CNLIVETabberViewController.m
  3 +// CNLiveCommuntyModule_Example
  4 +//
  5 +// Created by open on 2022/3/3.
  6 +// Copyright © 2022 woshiliushiyu. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLIVETabberViewController.h"
  10 +#import "CNLIVEViewController.h"
  11 +@interface CNLIVETabberViewController ()
  12 +
  13 +@end
  14 +
  15 +@implementation CNLIVETabberViewController
  16 +
  17 +- (void)viewWillAppear:(BOOL)animated{
  18 + [super viewWillAppear:animated];
  19 + [self.navigationController.navigationBar setHidden:YES];
  20 +}
  21 +
  22 +- (void)viewDidLoad {
  23 + [super viewDidLoad];
  24 + // Do any additional setup after loading the view.
  25 + [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第一个"];
  26 + [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第二个"];
  27 + [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第三个"];
  28 +}
  29 +-(void)addChildVC:(UIViewController *)VC withTitle:(NSString *)title{
  30 +
  31 + VC.title = title;
  32 + UINavigationController *mainVC = [[UINavigationController alloc]initWithRootViewController:VC];
  33 +
  34 + [self addChildViewController:mainVC];
  35 +
  36 +}
  37 +
  38 +@end
... ...
Example/CNLiveCommuntyModule/CNLiveCommuntyModule-Info.plist
... ... @@ -5,7 +5,7 @@
5 5 <key>CFBundleDevelopmentRegion</key>
6 6 <string>en</string>
7 7 <key>CFBundleDisplayName</key>
8   - <string>${PRODUCT_NAME}</string>
  8 + <string>社区</string>
9 9 <key>CFBundleExecutable</key>
10 10 <string>${EXECUTABLE_NAME}</string>
11 11 <key>CFBundleIdentifier</key>
... ... @@ -24,6 +24,35 @@
24 24 <string>1.0</string>
25 25 <key>LSRequiresIPhoneOS</key>
26 26 <true/>
  27 + <key>NSAppTransportSecurity</key>
  28 + <dict>
  29 + <key>NSAllowsArbitraryLoads</key>
  30 + <true/>
  31 + </dict>
  32 + <key>NSBluetoothAlwaysUsageDescription</key>
  33 + <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string>
  34 + <key>NSBluetoothPeripheralUsageDescription</key>
  35 + <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string>
  36 + <key>NSCalendarsUsageDescription</key>
  37 + <string>需要允许访问日历才能使用服务号功能</string>
  38 + <key>NSCameraUsageDescription</key>
  39 + <string>需要允许开启相机才能在发布生活圈或聊天时使用录制视频和拍照功能</string>
  40 + <key>NSContactsUsageDescription</key>
  41 + <string>需要允许访问通讯录才能获取手机联系人中的网家家用户</string>
  42 + <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
  43 + <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string>
  44 + <key>NSLocationAlwaysUsageDescription</key>
  45 + <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string>
  46 + <key>NSLocationWhenInUseUsageDescription</key>
  47 + <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string>
  48 + <key>NSMicrophoneUsageDescription</key>
  49 + <string>需要允许开启麦克风才能使用录制视频和语音等服务</string>
  50 + <key>NSMotionUsageDescription</key>
  51 + <string>需要允许访问运动与健身才能在亲情群健康步数、走路活动或者参加线上跑步赛事时记录您的步数信息</string>
  52 + <key>NSPhotoLibraryAddUsageDescription</key>
  53 + <string>需要允许打开相册才能访问相册照片和保存照片</string>
  54 + <key>NSPhotoLibraryUsageDescription</key>
  55 + <string>需要允许打开相册才能访问相册照片和保存照片</string>
27 56 <key>UILaunchStoryboardName</key>
28 57 <string>LaunchScreen</string>
29 58 <key>UIMainStoryboardFile</key>
... ... @@ -32,35 +61,6 @@
32 61 <array>
33 62 <string>armv7</string>
34 63 </array>
35   - <key>NSAppTransportSecurity</key>
36   - <dict>
37   - <key>NSAllowsArbitraryLoads</key>
38   - <true/>
39   - </dict>
40   - <key>NSBluetoothAlwaysUsageDescription</key>
41   - <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string>
42   - <key>NSBluetoothPeripheralUsageDescription</key>
43   - <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string>
44   - <key>NSCalendarsUsageDescription</key>
45   - <string>需要允许访问日历才能使用服务号功能</string>
46   - <key>NSCameraUsageDescription</key>
47   - <string>需要允许开启相机才能在发布生活圈或聊天时使用录制视频和拍照功能</string>
48   - <key>NSContactsUsageDescription</key>
49   - <string>需要允许访问通讯录才能获取手机联系人中的网家家用户</string>
50   - <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
51   - <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string>
52   - <key>NSLocationAlwaysUsageDescription</key>
53   - <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string>
54   - <key>NSLocationWhenInUseUsageDescription</key>
55   - <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string>
56   - <key>NSMicrophoneUsageDescription</key>
57   - <string>需要允许开启麦克风才能使用录制视频和语音等服务</string>
58   - <key>NSMotionUsageDescription</key>
59   - <string>需要允许访问运动与健身才能在亲情群健康步数、走路活动或者参加线上跑步赛事时记录您的步数信息</string>
60   - <key>NSPhotoLibraryAddUsageDescription</key>
61   - <string>需要允许打开相册才能访问相册照片和保存照片</string>
62   - <key>NSPhotoLibraryUsageDescription</key>
63   - <string>需要允许打开相册才能访问相册照片和保存照片</string>
64 64 <key>UISupportedInterfaceOrientations</key>
65 65 <array>
66 66 <string>UIInterfaceOrientationPortrait</string>
... ...