Commit e97fc4033f3e922dc079a3adfdcf7392a0a2b642

Authored by liushiyu
1 parent 4889f46b

0.0.7

CNLiveCommunitModule.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 = 'CNLiveCommunitModule' 10 s.name = 'CNLiveCommunitModule'
11 - s.version = '0.0.6' 11 + s.version = '0.0.7'
12 s.summary = 'A short description of CNLiveCommunitModule.' 12 s.summary = 'A short description of CNLiveCommunitModule.'
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.
CNLiveCommunitModule/Classes/View/CNLiveCommuntSubView.m
@@ -250,7 +250,7 @@ @@ -250,7 +250,7 @@
250 } 250 }
251 -(void)evalContentButton:(UIButton *)button 251 -(void)evalContentButton:(UIButton *)button
252 { 252 {
253 - if ([self.recoredModel.index isEqualToString:@"1"]) { 253 + if ([self.recoredModel.index isEqualToString:@"3"]) {
254 CNLiveCommuntEvaluaViewController * evaluaView = [[CNLiveCommuntEvaluaViewController alloc] initWithRecord:self.recoredModel]; 254 CNLiveCommuntEvaluaViewController * evaluaView = [[CNLiveCommuntEvaluaViewController alloc] initWithRecord:self.recoredModel];
255 [[self displayViewController].navigationController pushViewController:evaluaView animated:YES]; 255 [[self displayViewController].navigationController pushViewController:evaluaView animated:YES];
256 } 256 }
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntActiviViewController.m
@@ -30,12 +30,14 @@ @@ -30,12 +30,14 @@
30 } 30 }
31 - (void)dealloc 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,7 +52,10 @@
52 } 52 }
53 return self; 53 return self;
54 } 54 }
55 - 55 +-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
  56 +{
  57 + [self.view endEditing:YES];
  58 +}
56 - (void)viewDidLoad { 59 - (void)viewDidLoad {
57 [super viewDidLoad]; 60 [super viewDidLoad];
58 // Do any additional setup after loading the view. 61 // Do any additional setup after loading the view.
@@ -188,6 +191,7 @@ @@ -188,6 +191,7 @@
188 -(void)submiteAction:(UIButton *)button 191 -(void)submiteAction:(UIButton *)button
189 { 192 {
190 __weak typeof(self) weakSelf = self; 193 __weak typeof(self) weakSelf = self;
  194 + [self.view endEditing:YES];
191 if (self.imageArray.count == 0) { 195 if (self.imageArray.count == 0) {
192 [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:self.recordModel.idStr handworkId:self.recordModel.handworkId comment:self.evaluaView.text imgs:@"" isAnonymity:self.isAnonymity CompleterBlock:^{ 196 [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:self.recordModel.idStr handworkId:self.recordModel.handworkId comment:self.evaluaView.text imgs:@"" isAnonymity:self.isAnonymity CompleterBlock:^{
193 [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5]; 197 [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5];
@@ -227,6 +231,7 @@ @@ -227,6 +231,7 @@
227 { 231 {
228 if (self.imageArray.count >= index + 1) return; 232 if (self.imageArray.count >= index + 1) return;
229 __weak typeof(self) weakSelf = self; 233 __weak typeof(self) weakSelf = self;
  234 + [self.view endEditing:YES];
230 [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) { 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 switch (didRow) { 236 switch (didRow) {
232 case 0: 237 case 0:
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntServiceViewController.m
@@ -42,7 +42,19 @@ @@ -42,7 +42,19 @@
42 } 42 }
43 return self; 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 - (void)viewDidLoad { 58 - (void)viewDidLoad {
47 [super viewDidLoad]; 59 [super viewDidLoad];
48 // Do any additional setup after loading the view. 60 // Do any additional setup after loading the view.
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
@@ -154,7 +154,7 @@ @@ -154,7 +154,7 @@
154 { 154 {
155 __weak typeof(self) weakSelf = self; 155 __weak typeof(self) weakSelf = self;
156 [CNLiveCommuntViewModel requestWithCommuntySingUpOrderMentHandworkId:self.detailModel.idStr Ussers:self.userArray CompleterBlock:^(CNLiveCommuntyActivitySignUpModel * _Nonnull signUpModel) { 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 if (unitPrice == 0.00) { 158 if (unitPrice == 0.00) {
159 NSString * handworkId = weakSelf.detailModel.idStr; 159 NSString * handworkId = weakSelf.detailModel.idStr;
160 CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId]; 160 CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId];
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyHomeListViewController.m
@@ -128,6 +128,15 @@ @@ -128,6 +128,15 @@
128 CNLiveCommuntyHomeListModel * listModel = self.dataSource[indexPath.row]; 128 CNLiveCommuntyHomeListModel * listModel = self.dataSource[indexPath.row];
129 if (listModel && [listModel.idStr isNotBlank]) { 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 [[NSUserDefaults standardUserDefaults] setObject:listModel.idStr forKey:kCNLiveCommuntyNBhdIdIdentifier]; 140 [[NSUserDefaults standardUserDefaults] setObject:listModel.idStr forKey:kCNLiveCommuntyNBhdIdIdentifier];
132 [[NSUserDefaults standardUserDefaults] synchronize]; 141 [[NSUserDefaults standardUserDefaults] synchronize];
133 [[NSUserDefaults standardUserDefaults] setObject:listModel.name forKey:kCNLiveCommuntyNBhdNameIdentifier]; 142 [[NSUserDefaults standardUserDefaults] setObject:listModel.name forKey:kCNLiveCommuntyNBhdNameIdentifier];
@@ -140,9 +149,6 @@ @@ -140,9 +149,6 @@
140 if ([vc isKindOfClass:CNLiveCommuntyHomeListViewController.class]) { 149 if ([vc isKindOfClass:CNLiveCommuntyHomeListViewController.class]) {
141 [tempArray removeObject:vc]; 150 [tempArray removeObject:vc];
142 } 151 }
143 - if ([vc isKindOfClass:CNLiveCommuntViewController.class]) {  
144 - [tempArray removeObject:vc];  
145 - }  
146 } 152 }
147 self.navigationController.viewControllers = tempArray; 153 self.navigationController.viewControllers = tempArray;
148 } 154 }
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultListViewController.m
@@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
68 make.height.mas_equalTo(50+kVerticalBottomSafeHeight); 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 [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#222833) range:[str.string rangeOfString:@"合计: "]]; 72 [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#222833) range:[str.string rangeOfString:@"合计: "]];
73 [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]]; 73 [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]];
74 [str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]]; 74 [str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]];