Commit a9d90cd72b8983340adf849c9969e29c7e9d302e
1 parent
4cebb17b
0.0.2
Showing
8 changed files
with
42 additions
and
20 deletions
CNLiveCommuntyModule.podspec
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
| ... | ... | @@ -231,6 +231,11 @@ MJCodingImplementation |
| 231 | 231 | [tempDict addString:obj forKey:@"value"]; |
| 232 | 232 | [self.infoArray addObject:tempDict]; |
| 233 | 233 | } |
| 234 | + if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"remark"]) {//问题描述 | |
| 235 | + [tempDict addString:@"问题描述" forKey:@"key"]; | |
| 236 | + [tempDict addString:obj forKey:@"value"]; | |
| 237 | + [self.infoArray addObject:tempDict]; | |
| 238 | + } | |
| 234 | 239 | if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"intentBeginTime"]) {//联系地址 |
| 235 | 240 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)]; |
| 236 | 241 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | ... | ... |
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
| ... | ... | @@ -493,7 +493,8 @@ |
| 493 | 493 | [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 494 | 494 | make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(10); |
| 495 | 495 | make.width.mas_equalTo(65); |
| 496 | - make.top.bottom.mas_equalTo(weakSelf.mainView); | |
| 496 | + make.height.mas_equalTo(30); | |
| 497 | + make.top.mas_equalTo(weakSelf.mainView.mas_top); | |
| 497 | 498 | }]; |
| 498 | 499 | [self.cententLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 499 | 500 | make.left.mas_equalTo(weakSelf.nameLabel.mas_right); |
| ... | ... | @@ -537,7 +538,7 @@ |
| 537 | 538 | _cententLabel.textColor = UIColorHex(#333333); |
| 538 | 539 | _cententLabel.backgroundColor = UIColorHex(#F9F9F9); |
| 539 | 540 | _cententLabel.lineBreakMode = NSLineBreakByCharWrapping; |
| 540 | - _cententLabel.numberOfLines = 1; | |
| 541 | + _cententLabel.numberOfLines = 0; | |
| 541 | 542 | _cententLabel.font = [UIFont systemFontOfSize:15]; |
| 542 | 543 | _cententLabel.font = [UIFont boldSystemFontOfSize:15]; |
| 543 | 544 | ... | ... |
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSubView.m
| ... | ... | @@ -212,7 +212,7 @@ |
| 212 | 212 | self.dateLabel.text = recoredModel.createTimeString; |
| 213 | 213 | self.nameLabel.text = recoredModel.handworkName; |
| 214 | 214 | self.descLabel.text = [NSString stringWithFormat:@"%@ %@",recoredModel.name,recoredModel.mobile]; |
| 215 | - self.priceLabel.text = [recoredModel.amount isNotBlank]?[NSString stringWithFormat:@"%@.00",recoredModel.amount]:@"0.00"; | |
| 215 | + self.priceLabel.text = [recoredModel.amount isNotBlank]?[NSString stringWithFormat:@"%@.00",recoredModel.amount]:@""; | |
| 216 | 216 | if ([recoredModel.index isEqualToString:@"3"]) { |
| 217 | 217 | self.evalButton.layer.cornerRadius = 10; |
| 218 | 218 | self.evalButton.layer.masksToBounds = YES; |
| ... | ... | @@ -583,7 +583,10 @@ |
| 583 | 583 | -(void)setSubDict:(NSDictionary *)subDict |
| 584 | 584 | { |
| 585 | 585 | _subDict = subDict; |
| 586 | - self.nameLabel.text = [subDict stringValueForKey:@"name" default:@""]; | |
| 586 | + NSMutableAttributedString * nameString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"*%@",[subDict stringValueForKey:@"name" default:@""]]]; | |
| 587 | + [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#CD0302) range:[nameString.string rangeOfString:@"*"]]; | |
| 588 | + [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#333333) range:[nameString.string rangeOfString:[subDict stringValueForKey:@"name" default:@""]]]; | |
| 589 | + self.nameLabel.attributedText = nameString; | |
| 587 | 590 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"联系电话"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; |
| 588 | 591 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"年龄"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; |
| 589 | 592 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"联系方式"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; |
| ... | ... | @@ -649,7 +652,7 @@ |
| 649 | 652 | __weak typeof(self) weakSelf = self; |
| 650 | 653 | [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 651 | 654 | make.top.left.mas_equalTo(weakSelf.contentView).offset(15); |
| 652 | - make.width.mas_equalTo(70); | |
| 655 | + make.width.mas_equalTo(75); | |
| 653 | 656 | }]; |
| 654 | 657 | [self.contentField mas_makeConstraints:^(MASConstraintMaker *make) { |
| 655 | 658 | make.centerY.mas_equalTo(weakSelf.contentView); |
| ... | ... | @@ -797,7 +800,6 @@ |
| 797 | 800 | _nameLabel.lineBreakMode = NSLineBreakByTruncatingTail; |
| 798 | 801 | _nameLabel.numberOfLines = 1; |
| 799 | 802 | _nameLabel.font = [UIFont systemFontOfSize:16]; |
| 800 | - _nameLabel.text = @"联系人"; | |
| 801 | 803 | } |
| 802 | 804 | return _nameLabel; |
| 803 | 805 | } | ... | ... |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntInformViewController.m
| ... | ... | @@ -162,7 +162,7 @@ |
| 162 | 162 | if (i == 1) [paramDict addString:[userCell.contentField.text isNotBlank]?userCell.contentField.text:@"" forKey:@"address"]; |
| 163 | 163 | if (i == 2) { |
| 164 | 164 | NSString * phone = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; |
| 165 | - if ([phone isNotBlank]) { | |
| 165 | + if ([phone isNotBlank] && phone.length == 11) { | |
| 166 | 166 | [paramDict addString:phone forKey:@"phone"]; |
| 167 | 167 | }else{ |
| 168 | 168 | [QMUITips showWithText:@"联系电话填写错误"]; | ... | ... |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
| ... | ... | @@ -332,19 +332,33 @@ |
| 332 | 332 | if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder |
| 333 | 333 | || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder |
| 334 | 334 | || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { |
| 335 | - return 30; | |
| 335 | + NSDictionary * subDict = self.createMdoel.infoArray[indexPath.row]; | |
| 336 | + CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height; | |
| 337 | + return height > 30 ? height : 30; | |
| 336 | 338 | } |
| 337 | 339 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder |
| 338 | 340 | || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder) { |
| 339 | - if (indexPath.section == 0) return 30; | |
| 341 | + if (indexPath.section == 0) { | |
| 342 | + NSDictionary * subDict = self.createMdoel.infoArray[indexPath.row]; | |
| 343 | + CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height; | |
| 344 | + return height > 30 ? height : 30; | |
| 345 | + } | |
| 340 | 346 | if (indexPath.section == 1) return 70; |
| 341 | 347 | } |
| 342 | 348 | if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) { |
| 343 | - if (indexPath.section == 0) return 30; | |
| 349 | + if (indexPath.section == 0) { | |
| 350 | + NSDictionary * subDict = self.createMdoel.infoArray[indexPath.row]; | |
| 351 | + CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height; | |
| 352 | + return height > 30 ? height : 30; | |
| 353 | + } | |
| 344 | 354 | if (indexPath.section == 1) return 130; |
| 345 | 355 | } |
| 346 | 356 | if (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder) { |
| 347 | - if (indexPath.section == 0) return 30; | |
| 357 | + if (indexPath.section == 0) { | |
| 358 | + NSDictionary * subDict = self.createMdoel.infoArray[indexPath.row]; | |
| 359 | + CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height; | |
| 360 | + return height > 30 ? height : 30; | |
| 361 | + } | |
| 348 | 362 | if (indexPath.section == 1) return 60; |
| 349 | 363 | if (indexPath.section == 2) return 70; |
| 350 | 364 | } | ... | ... |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserEditViewController.m
| ... | ... | @@ -106,11 +106,11 @@ |
| 106 | 106 | } |
| 107 | 107 | if (i == 3) { |
| 108 | 108 | NSString * phone = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; |
| 109 | - if (![phone isNotBlank] || phone.length < 6) { | |
| 109 | + if (![phone isNotBlank] || phone.length == 11) { | |
| 110 | + [paramDict addString:phone forKey:@"mobile"]; | |
| 111 | + }else{ | |
| 110 | 112 | [QMUITips showWithText:@"联系电话填写错误"]; |
| 111 | 113 | return; |
| 112 | - }else{ | |
| 113 | - [paramDict addString:phone forKey:@"mobile"]; | |
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | } | ... | ... |
Example/CNLiveCommuntyModule/CNLIVEViewController.m
| ... | ... | @@ -114,11 +114,11 @@ |
| 114 | 114 | [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod]; |
| 115 | 115 | } |
| 116 | 116 | if (indexPath.row == 1) { |
| 117 | -// NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; | |
| 118 | -// CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId]; | |
| 119 | -// [self.navigationController pushViewController:recordVC animated:YES]; | |
| 120 | - [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; | |
| 121 | - [[NSUserDefaults standardUserDefaults] synchronize]; | |
| 117 | + NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; | |
| 118 | + CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId]; | |
| 119 | + [self.navigationController pushViewController:recordVC animated:YES]; | |
| 120 | +// [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; | |
| 121 | +// [[NSUserDefaults standardUserDefaults] synchronize]; | |
| 122 | 122 | } |
| 123 | 123 | if (indexPath.row == 2) { |
| 124 | 124 | CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init]; | ... | ... |