Commit a9d90cd72b8983340adf849c9969e29c7e9d302e

Authored by liushiyu
1 parent 4cebb17b

0.0.2

CNLiveCommuntyModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveCommuntyModule' 10 s.name = 'CNLiveCommuntyModule'
11 - s.version = '0.0.1' 11 + s.version = '0.0.2'
12 s.summary = 'A short description of CNLiveCommuntyModule.' 12 s.summary = 'A short description of CNLiveCommuntyModule.'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
@@ -231,6 +231,11 @@ MJCodingImplementation @@ -231,6 +231,11 @@ MJCodingImplementation
231 [tempDict addString:obj forKey:@"value"]; 231 [tempDict addString:obj forKey:@"value"];
232 [self.infoArray addObject:tempDict]; 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 if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"intentBeginTime"]) {//联系地址 239 if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"intentBeginTime"]) {//联系地址
235 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)]; 240 NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)];
236 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 241 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
@@ -493,7 +493,8 @@ @@ -493,7 +493,8 @@
493 [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { 493 [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
494 make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(10); 494 make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(10);
495 make.width.mas_equalTo(65); 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 [self.cententLabel mas_makeConstraints:^(MASConstraintMaker *make) { 499 [self.cententLabel mas_makeConstraints:^(MASConstraintMaker *make) {
499 make.left.mas_equalTo(weakSelf.nameLabel.mas_right); 500 make.left.mas_equalTo(weakSelf.nameLabel.mas_right);
@@ -537,7 +538,7 @@ @@ -537,7 +538,7 @@
537 _cententLabel.textColor = UIColorHex(#333333); 538 _cententLabel.textColor = UIColorHex(#333333);
538 _cententLabel.backgroundColor = UIColorHex(#F9F9F9); 539 _cententLabel.backgroundColor = UIColorHex(#F9F9F9);
539 _cententLabel.lineBreakMode = NSLineBreakByCharWrapping; 540 _cententLabel.lineBreakMode = NSLineBreakByCharWrapping;
540 - _cententLabel.numberOfLines = 1; 541 + _cententLabel.numberOfLines = 0;
541 _cententLabel.font = [UIFont systemFontOfSize:15]; 542 _cententLabel.font = [UIFont systemFontOfSize:15];
542 _cententLabel.font = [UIFont boldSystemFontOfSize:15]; 543 _cententLabel.font = [UIFont boldSystemFontOfSize:15];
543 544
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSubView.m
@@ -212,7 +212,7 @@ @@ -212,7 +212,7 @@
212 self.dateLabel.text = recoredModel.createTimeString; 212 self.dateLabel.text = recoredModel.createTimeString;
213 self.nameLabel.text = recoredModel.handworkName; 213 self.nameLabel.text = recoredModel.handworkName;
214 self.descLabel.text = [NSString stringWithFormat:@"%@ %@",recoredModel.name,recoredModel.mobile]; 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 if ([recoredModel.index isEqualToString:@"3"]) { 216 if ([recoredModel.index isEqualToString:@"3"]) {
217 self.evalButton.layer.cornerRadius = 10; 217 self.evalButton.layer.cornerRadius = 10;
218 self.evalButton.layer.masksToBounds = YES; 218 self.evalButton.layer.masksToBounds = YES;
@@ -583,7 +583,10 @@ @@ -583,7 +583,10 @@
583 -(void)setSubDict:(NSDictionary *)subDict 583 -(void)setSubDict:(NSDictionary *)subDict
584 { 584 {
585 _subDict = subDict; 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 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"联系电话"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; 590 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"联系电话"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault;
588 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"年龄"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; 591 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"年龄"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault;
589 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"联系方式"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; 592 self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"联系方式"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault;
@@ -649,7 +652,7 @@ @@ -649,7 +652,7 @@
649 __weak typeof(self) weakSelf = self; 652 __weak typeof(self) weakSelf = self;
650 [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { 653 [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
651 make.top.left.mas_equalTo(weakSelf.contentView).offset(15); 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 [self.contentField mas_makeConstraints:^(MASConstraintMaker *make) { 657 [self.contentField mas_makeConstraints:^(MASConstraintMaker *make) {
655 make.centerY.mas_equalTo(weakSelf.contentView); 658 make.centerY.mas_equalTo(weakSelf.contentView);
@@ -797,7 +800,6 @@ @@ -797,7 +800,6 @@
797 _nameLabel.lineBreakMode = NSLineBreakByTruncatingTail; 800 _nameLabel.lineBreakMode = NSLineBreakByTruncatingTail;
798 _nameLabel.numberOfLines = 1; 801 _nameLabel.numberOfLines = 1;
799 _nameLabel.font = [UIFont systemFontOfSize:16]; 802 _nameLabel.font = [UIFont systemFontOfSize:16];
800 - _nameLabel.text = @"联系人";  
801 } 803 }
802 return _nameLabel; 804 return _nameLabel;
803 } 805 }
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntInformViewController.m
@@ -162,7 +162,7 @@ @@ -162,7 +162,7 @@
162 if (i == 1) [paramDict addString:[userCell.contentField.text isNotBlank]?userCell.contentField.text:@"" forKey:@"address"]; 162 if (i == 1) [paramDict addString:[userCell.contentField.text isNotBlank]?userCell.contentField.text:@"" forKey:@"address"];
163 if (i == 2) { 163 if (i == 2) {
164 NSString * phone = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; 164 NSString * phone = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@"";
165 - if ([phone isNotBlank]) { 165 + if ([phone isNotBlank] && phone.length == 11) {
166 [paramDict addString:phone forKey:@"phone"]; 166 [paramDict addString:phone forKey:@"phone"];
167 }else{ 167 }else{
168 [QMUITips showWithText:@"联系电话填写错误"]; 168 [QMUITips showWithText:@"联系电话填写错误"];
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
@@ -332,19 +332,33 @@ @@ -332,19 +332,33 @@
332 if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder 332 if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder
333 || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder 333 || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder
334 || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { 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 if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder 339 if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder
338 || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder) { 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 if (indexPath.section == 1) return 70; 346 if (indexPath.section == 1) return 70;
341 } 347 }
342 if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) { 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 if (indexPath.section == 1) return 130; 354 if (indexPath.section == 1) return 130;
345 } 355 }
346 if (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder) { 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 if (indexPath.section == 1) return 60; 362 if (indexPath.section == 1) return 60;
349 if (indexPath.section == 2) return 70; 363 if (indexPath.section == 2) return 70;
350 } 364 }
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserEditViewController.m
@@ -106,11 +106,11 @@ @@ -106,11 +106,11 @@
106 } 106 }
107 if (i == 3) { 107 if (i == 3) {
108 NSString * phone = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; 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 [QMUITips showWithText:@"联系电话填写错误"]; 112 [QMUITips showWithText:@"联系电话填写错误"];
111 return; 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,11 +114,11 @@
114 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod]; 114 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod];
115 } 115 }
116 if (indexPath.row == 1) { 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 if (indexPath.row == 2) { 123 if (indexPath.row == 2) {
124 CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init]; 124 CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init];