Commit e97fc4033f3e922dc079a3adfdcf7392a0a2b642
1 parent
4889f46b
0.0.7
Showing
8 changed files
with
40 additions
and
15 deletions
CNLiveCommunitModule.podspec
CNLiveCommunitModule/Classes/View/CNLiveCommuntSubView.m
| ... | ... | @@ -250,7 +250,7 @@ |
| 250 | 250 | } |
| 251 | 251 | -(void)evalContentButton:(UIButton *)button |
| 252 | 252 | { |
| 253 | - if ([self.recoredModel.index isEqualToString:@"1"]) { | |
| 253 | + if ([self.recoredModel.index isEqualToString:@"3"]) { | |
| 254 | 254 | CNLiveCommuntEvaluaViewController * evaluaView = [[CNLiveCommuntEvaluaViewController alloc] initWithRecord:self.recoredModel]; |
| 255 | 255 | [[self displayViewController].navigationController pushViewController:evaluaView animated:YES]; |
| 256 | 256 | } | ... | ... |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntActiviViewController.m
| ... | ... | @@ -30,12 +30,14 @@ |
| 30 | 30 | } |
| 31 | 31 | - (void)dealloc |
| 32 | 32 | { |
| 33 | - UIViewController *vc = self.childViewControllers[0]; | |
| 34 | - if (([self searchProperties:[vc class] string:@"webView"] || [self searchProperties:[vc.superclass class] string:@"webView"])&&[vc valueForKey:@"webView"]&&[[vc valueForKey:@"webView"] isKindOfClass:[WKWebView class]]) { | |
| 35 | - WKWebView *webView = (WKWebView *)[vc valueForKey:@"webView"]; | |
| 36 | - if ([webView.scrollView valueForKey:@"mj_header"]) { | |
| 37 | - id header = [webView.scrollView valueForKey:@"mj_header"]; | |
| 38 | - [header removeObserver:self forKeyPath:@"state"]; | |
| 33 | + if (self.childViewControllers.count > 0) { | |
| 34 | + UIViewController *vc = self.childViewControllers[0]; | |
| 35 | + if (([self searchProperties:[vc class] string:@"webView"] || [self searchProperties:[vc.superclass class] string:@"webView"])&&[vc valueForKey:@"webView"]&&[[vc valueForKey:@"webView"] isKindOfClass:[WKWebView class]]) { | |
| 36 | + WKWebView *webView = (WKWebView *)[vc valueForKey:@"webView"]; | |
| 37 | + if ([webView.scrollView valueForKey:@"mj_header"]) { | |
| 38 | + id header = [webView.scrollView valueForKey:@"mj_header"]; | |
| 39 | + [header removeObserver:self forKeyPath:@"state"]; | |
| 40 | + } | |
| 39 | 41 | } |
| 40 | 42 | } |
| 41 | 43 | } | ... | ... |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntEvaluaViewController.m
| ... | ... | @@ -52,7 +52,10 @@ |
| 52 | 52 | } |
| 53 | 53 | return self; |
| 54 | 54 | } |
| 55 | - | |
| 55 | +-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event | |
| 56 | +{ | |
| 57 | + [self.view endEditing:YES]; | |
| 58 | +} | |
| 56 | 59 | - (void)viewDidLoad { |
| 57 | 60 | [super viewDidLoad]; |
| 58 | 61 | // Do any additional setup after loading the view. |
| ... | ... | @@ -188,6 +191,7 @@ |
| 188 | 191 | -(void)submiteAction:(UIButton *)button |
| 189 | 192 | { |
| 190 | 193 | __weak typeof(self) weakSelf = self; |
| 194 | + [self.view endEditing:YES]; | |
| 191 | 195 | if (self.imageArray.count == 0) { |
| 192 | 196 | [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:self.recordModel.idStr handworkId:self.recordModel.handworkId comment:self.evaluaView.text imgs:@"" isAnonymity:self.isAnonymity CompleterBlock:^{ |
| 193 | 197 | [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5]; |
| ... | ... | @@ -227,6 +231,7 @@ |
| 227 | 231 | { |
| 228 | 232 | if (self.imageArray.count >= index + 1) return; |
| 229 | 233 | __weak typeof(self) weakSelf = self; |
| 234 | + [self.view endEditing:YES]; | |
| 230 | 235 | [self.view createAlertViewTitleArray:@[@"拍摄",@"从手机相册选择"] subTitleArr:@[@"",@""] textColor:UIColorMake(40, 40, 40) subTitleColor:UIColorMake(152, 152, 152) font:UIFontMake(15) subFont:UIFontMake(12) actionBlock:^(UIButton *button, NSInteger didRow) { |
| 231 | 236 | switch (didRow) { |
| 232 | 237 | case 0: | ... | ... |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntServiceViewController.m
| ... | ... | @@ -42,7 +42,19 @@ |
| 42 | 42 | } |
| 43 | 43 | return self; |
| 44 | 44 | } |
| 45 | - | |
| 45 | +- (void)dealloc | |
| 46 | +{ | |
| 47 | + if (self.childViewControllers.count > 0) { | |
| 48 | + UIViewController *vc = self.childViewControllers[0]; | |
| 49 | + if (([self searchProperties:[vc class] string:@"collectionView"] || [self searchProperties:[vc.superclass class] string:@"collectionView"])&&[vc valueForKey:@"collectionView"]&&[[vc valueForKey:@"collectionView"] isKindOfClass:[UICollectionView class]]) { | |
| 50 | + UICollectionView *collectionView = (UICollectionView *)[vc valueForKey:@"collectionView"]; | |
| 51 | + if ([collectionView valueForKey:@"mj_header"]) { | |
| 52 | + id header = [collectionView valueForKey:@"mj_header"]; | |
| 53 | + [header removeObserver:self forKeyPath:@"state"]; | |
| 54 | + } | |
| 55 | + } | |
| 56 | + } | |
| 57 | +} | |
| 46 | 58 | - (void)viewDidLoad { |
| 47 | 59 | [super viewDidLoad]; |
| 48 | 60 | // Do any additional setup after loading the view. | ... | ... |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
| ... | ... | @@ -154,7 +154,7 @@ |
| 154 | 154 | { |
| 155 | 155 | __weak typeof(self) weakSelf = self; |
| 156 | 156 | [CNLiveCommuntViewModel requestWithCommuntySingUpOrderMentHandworkId:self.detailModel.idStr Ussers:self.userArray CompleterBlock:^(CNLiveCommuntyActivitySignUpModel * _Nonnull signUpModel) { |
| 157 | - float unitPrice = [weakSelf.detailModel.unitPrice floatValue]; | |
| 157 | + float unitPrice = [weakSelf.detailModel.unitPrice floatValue] * weakSelf.userArray.count; | |
| 158 | 158 | if (unitPrice == 0.00) { |
| 159 | 159 | NSString * handworkId = weakSelf.detailModel.idStr; |
| 160 | 160 | CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId]; | ... | ... |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyHomeListViewController.m
| ... | ... | @@ -128,6 +128,15 @@ |
| 128 | 128 | CNLiveCommuntyHomeListModel * listModel = self.dataSource[indexPath.row]; |
| 129 | 129 | if (listModel && [listModel.idStr isNotBlank]) { |
| 130 | 130 | |
| 131 | + NSMutableArray * tempArray01 = [[NSMutableArray alloc] initWithArray:self.navigationController.viewControllers]; | |
| 132 | + for (UIViewController * vc in self.navigationController.viewControllers) { | |
| 133 | + if ([vc isKindOfClass:CNLiveCommuntViewController.class]) { | |
| 134 | + [tempArray01 removeObject:vc]; | |
| 135 | + } | |
| 136 | + } | |
| 137 | + self.navigationController.viewControllers = tempArray01; | |
| 138 | + | |
| 139 | + | |
| 131 | 140 | [[NSUserDefaults standardUserDefaults] setObject:listModel.idStr forKey:kCNLiveCommuntyNBhdIdIdentifier]; |
| 132 | 141 | [[NSUserDefaults standardUserDefaults] synchronize]; |
| 133 | 142 | [[NSUserDefaults standardUserDefaults] setObject:listModel.name forKey:kCNLiveCommuntyNBhdNameIdentifier]; |
| ... | ... | @@ -140,9 +149,6 @@ |
| 140 | 149 | if ([vc isKindOfClass:CNLiveCommuntyHomeListViewController.class]) { |
| 141 | 150 | [tempArray removeObject:vc]; |
| 142 | 151 | } |
| 143 | - if ([vc isKindOfClass:CNLiveCommuntViewController.class]) { | |
| 144 | - [tempArray removeObject:vc]; | |
| 145 | - } | |
| 146 | 152 | } |
| 147 | 153 | self.navigationController.viewControllers = tempArray; |
| 148 | 154 | } | ... | ... |
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultListViewController.m
| ... | ... | @@ -68,7 +68,7 @@ |
| 68 | 68 | make.height.mas_equalTo(50+kVerticalBottomSafeHeight); |
| 69 | 69 | }]; |
| 70 | 70 | |
| 71 | - NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: %.2f元",(self.detailModel.signupVoList.count * [self.detailModel.unitPrice floatValue])/2]]; | |
| 71 | + NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: %.2f元",(self.detailModel.signupVoList.count * [self.detailModel.unitPrice floatValue])]]; | |
| 72 | 72 | [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#222833) range:[str.string rangeOfString:@"合计: "]]; |
| 73 | 73 | [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]]; |
| 74 | 74 | [str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]]; | ... | ... |