Commit 93e4020966ec1c228f0d0167c8cfd09348724f21

Authored by liushiyu
1 parent 86f6849e

0.0.5

CNLiveCommunitModule.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveCommunitModule'
11   - s.version = '0.0.4'
  11 + s.version = '0.0.5'
12 12 s.summary = 'A short description of CNLiveCommunitModule.'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveCommunitModule/Classes/Model/CNLiveCommuntyHomeModel.h
... ... @@ -81,6 +81,8 @@ NS_ASSUME_NONNULL_BEGIN
81 81 @property (nonatomic, copy) NSString *paymentStatus;
82 82 /**活动状态 0草稿 1活动已发布 2活动已取消*/
83 83 @property (nonatomic, copy) NSString *status;
  84 +/**自己定义的 便于区分*/
  85 +@property (nonatomic, copy) NSString *index;
84 86 @property (nonatomic, copy) NSString *createUser;
85 87 @property (nonatomic, copy) NSString *handworkName;
86 88 @property (nonatomic, copy) NSString *refundAmount;
... ... @@ -212,14 +214,31 @@ NS_ASSUME_NONNULL_BEGIN
212 214 @property (nonatomic, copy) NSString *signupEndTimeString;
213 215 @end
214 216  
  217 +@interface CNLiveCommuntyActivitySignUpOrderModel : NSObject
  218 +@property (nonatomic, copy) NSString *status;
  219 +@property (nonatomic, copy) NSString *refundableBalance;
  220 +@property (nonatomic, copy) NSString *idStr;
  221 +@property (nonatomic, copy) NSString *transId;
  222 +@property (nonatomic, copy) NSString *totalFee;
  223 +@property (nonatomic, copy) NSString *updatorId;
  224 +@property (nonatomic, copy) NSString *type;
  225 +@property (nonatomic, copy) NSString *payType;
  226 +@property (nonatomic, strong) NSNumber *createTime;
  227 +@property (nonatomic, strong) NSNumber *updateTime;
  228 +
  229 +@property (nonatomic, copy) NSString *createTimeString;
  230 +@property (nonatomic, copy) NSString *updateTimeString;
  231 +@end
  232 +
  233 +
215 234 @interface CNLiveCommuntyActivitySignUpModel : NSObject
216 235 @property (nonatomic, copy) NSString * type;
217 236 @property (nonatomic, copy) NSString * orderId;
218 237 @property (nonatomic, copy) NSString * signsString;
219 238 @property (nonatomic, strong) NSArray * signs;
  239 +@property (nonatomic, strong) CNLiveCommuntyActivitySignUpOrderModel * order;
220 240 @end
221 241  
222   -
223 242 @interface CNLiveCommuntyActivityUserDetailModel : NSObject
224 243 @property (nonatomic, copy) NSString *gender;
225 244 @property (nonatomic, copy) NSString *age;
... ...
CNLiveCommunitModule/Classes/Model/CNLiveCommuntyHomeModel.m
... ... @@ -371,12 +371,39 @@ MJCodingImplementation
371 371  
372 372 @end
373 373  
  374 +@implementation CNLiveCommuntyActivitySignUpOrderModel
  375 +
  376 +MJCodingImplementation
  377 ++ (NSDictionary *)mj_replacedKeyFromPropertyName
  378 +{
  379 + return @{@"idStr":@"id"};
  380 +}
  381 +
  382 +- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
  383 +{
  384 + oldValue = [NSString stringWithFormat:@"%@",oldValue];
  385 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) {
  386 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  387 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  388 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  389 + self.createTimeString = [dateFormatter stringFromDate:detaildate];
  390 + }
  391 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"updateTime"]) {
  392 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  393 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  394 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  395 + self.updateTimeString = [dateFormatter stringFromDate:detaildate];
  396 + }
  397 + return oldValue;
  398 +}
  399 +@end
  400 +
374 401 @implementation CNLiveCommuntyActivitySignUpModel
375 402 MJCodingImplementation
376 403  
377 404 - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
378 405 {
379   - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"signs"]) {
  406 + if (oldValue != nil && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"signs"]) {
380 407 __block NSArray * array = (NSArray *)oldValue;
381 408 __block NSMutableString * signsMString = [[NSMutableString alloc] init];
382 409 [array enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
... ...
CNLiveCommunitModule/Classes/View/CNLiveCommuntSignUpView.h
... ... @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
17 17  
18 18 /// 显示收款弹框
19 19 /// @param price 价格
20   -+(QMUIModalPresentationViewController *)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl;
  20 ++(QMUIModalPresentationViewController *)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl CompleterBlock:(void(^)(void))completerBlock;
21 21  
22 22 /// 显示双选项弹框
23 23 /// @param completerBlock 确认回调
... ...
CNLiveCommunitModule/Classes/View/CNLiveCommuntSignUpView.m
... ... @@ -72,7 +72,7 @@
72 72  
73 73 /// 显示收款弹框
74 74 /// @param price 价格
75   -+(QMUIModalPresentationViewController *)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl
  75 ++(QMUIModalPresentationViewController *)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl CompleterBlock:(void(^)(void))completerBlock
76 76 {
77 77 UIView * tipView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth - 60, 300)];
78 78 tipView.backgroundColor = [UIColor whiteColor];
... ... @@ -91,6 +91,18 @@
91 91 make.top.mas_equalTo(tipView).offset(20);
92 92 }];
93 93  
  94 + UIButton * closeButton = [UIButton buttonWithType:UIButtonTypeCustom];
  95 + [closeButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_community_content_close"] forState:UIControlStateNormal];
  96 + [closeButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_community_content_close"] forState:UIControlStateHighlighted];
  97 + [closeButton setBackgroundColor:[UIColor whiteColor]];
  98 + [tipView addSubview:closeButton];
  99 + [closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
  100 + make.right.mas_equalTo(tipView).offset(-10);
  101 + make.top.mas_equalTo(tipView).offset(10);
  102 + make.size.mas_equalTo(30);
  103 + }];
  104 +
  105 +
94 106 UIImageView * qrView = [[UIImageView alloc] init];
95 107 qrView.contentMode = UIViewContentModeScaleAspectFill;
96 108 qrView.backgroundColor = [UIColor whiteColor];
... ... @@ -105,13 +117,18 @@
105 117 QMUIModalPresentationViewController *modalViewController = [[QMUIModalPresentationViewController alloc] init];
106 118 modalViewController.animationStyle = QMUIModalPresentationAnimationStyleFade;
107 119 modalViewController.contentView = tipView;
  120 + modalViewController.modal = YES;
108 121 [modalViewController showWithAnimated:YES completion:nil];
109 122  
  123 + __weak typeof(modalViewController) weakModalViewController = modalViewController;
  124 + [closeButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) {
  125 + [weakModalViewController hideWithAnimated:YES completion:^(BOOL finished) {
  126 + if (finished && completerBlock) completerBlock();
  127 + }];
  128 + }];
  129 +
110 130 return modalViewController;
111   -// __weak typeof(modalViewController) weakModalViewController = modalViewController;
112   -// [payButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) {
113   -// [weakModalViewController hideWithAnimated:YES completion:NULL];
114   -// }];
  131 +
115 132 }
116 133  
117 134 + (UIImage *)communty_generateWithDefaultQRCodeData:(NSString *)data imageViewWidth:(CGFloat)imageViewWidth {
... ... @@ -553,7 +570,7 @@
553 570 [self.mainView addSubview:self.qrButton];
554 571 [self.mainView addSubview:self.payButton];
555 572  
556   - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hiddenModalViewNotification:) name:kCNLiveHiddenModalViewWithQrNotification object:nil];
  573 +// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hiddenModalViewNotification:) name:kCNLiveHiddenModalViewWithQrNotification object:nil];
557 574 }
558 575 return self;
559 576 }
... ... @@ -633,7 +650,11 @@
633 650 NSString * p = [NSString stringWithFormat:@"%.0f",([self.amoutField.text floatValue]*100)];
634 651 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
635 652 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]];
636   - weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl];
  653 + weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl CompleterBlock:^{
  654 + NSLog(@"移除监听通知");
  655 + [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
  656 + }];
  657 + [[NSNotificationCenter defaultCenter] addObserver:weakSelf selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
637 658 }];
638 659 }else{
639 660 [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{
... ... @@ -642,7 +663,11 @@
642 663 weakSelf.amoutField.textColor = UIColorHex(#c8c8c8);
643 664 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
644 665 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]];
645   - weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl];
  666 + weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl CompleterBlock:^{
  667 + NSLog(@"移除监听通知");
  668 + [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
  669 + }];
  670 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil];
646 671 }];
647 672 }];
648 673 }
... ...
CNLiveCommunitModule/Classes/View/CNLiveCommuntSubView.m
... ... @@ -213,15 +213,15 @@
213 213 self.nameLabel.text = recoredModel.handworkName;
214 214 self.descLabel.text = [NSString stringWithFormat:@"%@ %@",recoredModel.name,recoredModel.mobile];
215 215 self.priceLabel.text = [recoredModel.amount isNotBlank]?[NSString stringWithFormat:@"%@.00",recoredModel.amount]:@"0.00";
216   - if ([recoredModel.status isEqualToString:@"3"]) {
  216 + if ([recoredModel.index isEqualToString:@"3"]) {
217 217 self.evalButton.layer.cornerRadius = 10;
218 218 self.evalButton.layer.masksToBounds = YES;
219 219 self.evalButton.layer.borderWidth = 1;
220 220 self.evalButton.layer.borderColor = UIColorHex(#FD862E).CGColor;
221   - [self.evalButton setBackgroundImage:[UIImage imageWithColor:UIColorHex(#FFFD862E)] forState:UIControlStateNormal];
  221 + [self.evalButton setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:253/255.0 green:134/255.0 blue:46/255.0 alpha:0.08]] forState:UIControlStateNormal];
222 222 self.evalButton.hidden = NO;
223 223 self.evalButton.userInteractionEnabled = YES;
224   - }else if ([recoredModel.status isEqualToString:@"4"]) {
  224 + }else if ([recoredModel.index isEqualToString:@"4"]) {
225 225 self.evalButton.hidden = NO;
226 226 self.evalButton.userInteractionEnabled = NO;
227 227 NSString * buttonName = @"";
... ... @@ -232,8 +232,8 @@
232 232 }
233 233 [self.evalButton setTitle:buttonName forState:UIControlStateNormal];
234 234 [self.evalButton setTitleColor:color forState:UIControlStateNormal];
235   - }else if ([recoredModel.status isEqualToString:@"0"]
236   - || [recoredModel.status isEqualToString:@"1"]) {
  235 + }else if ([recoredModel.index isEqualToString:@"0"]
  236 + || [recoredModel.index isEqualToString:@"1"]) {
237 237 self.evalButton.hidden = NO;
238 238 self.evalButton.userInteractionEnabled = NO;
239 239 [self.evalButton setTitle:@"活动已取消" forState:UIControlStateNormal];
... ... @@ -245,7 +245,7 @@
245 245 }
246 246 -(void)evalContentButton:(UIButton *)button
247 247 {
248   - if ([self.recoredModel.status isEqualToString:@"1"]) {
  248 + if ([self.recoredModel.index isEqualToString:@"1"]) {
249 249 CNLiveCommuntEvaluaViewController * evaluaView = [[CNLiveCommuntEvaluaViewController alloc] initWithRecord:self.recoredModel];
250 250 [[self displayViewController].navigationController pushViewController:evaluaView animated:YES];
251 251 }
... ...
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntActiviViewController.m
... ... @@ -43,6 +43,7 @@
43 43 - (void)viewDidLoad {
44 44 [super viewDidLoad];
45 45 // Do any additional setup after loading the view.
  46 + self.view.backgroundColor = [UIColor whiteColor];
46 47 UIViewController *subVC = [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithWebUrl:self.webUrl type:self.type];
47 48 [self.view addSubview:subVC.view];
48 49 [self addChildViewController:subVC];
... ... @@ -53,6 +54,10 @@
53 54 make.top.mas_equalTo(kNavigationBarHeight);
54 55 make.left.bottom.right.mas_equalTo(self.view);
55 56 }];
  57 + }else{
  58 + [subVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
  59 + make.edges.mas_equalTo(self.view);
  60 + }];
56 61 }
57 62  
58 63  
... ... @@ -73,17 +78,24 @@
73 78 [header addObserver:self forKeyPath:@"state" options:NSKeyValueObservingOptionNew context:nil];
74 79 }
75 80 }
76   - if (self.isRootVC) [self initNav];
  81 + [self initNav];
77 82 }
78 83  
79 84 -(void)initNav
80 85 {
81   - self.topNavView.backgroundColor = [UIColor whiteColor];
82   - self.topLine.backgroundColor = [UIColor whiteColor];
  86 + if (self.isRootVC) {
  87 + self.topNavView.backgroundColor = [UIColor whiteColor];
  88 + self.topLine.backgroundColor = [UIColor whiteColor];
  89 +
  90 + DSNavButton * searchBtn = [[DSNavButton alloc] initWithImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_communit_back"]];
  91 + [searchBtn addTarget:self action:@selector(leftNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
  92 + self.leftNavBtns = @[searchBtn];
  93 + }else{
  94 + self.topNavView.backgroundColor = [UIColor whiteColor];
  95 + self.topLine.backgroundColor = [UIColor whiteColor];
  96 + self.leftNavBtns = @[];
  97 + }
83 98  
84   - DSNavButton * searchBtn = [[DSNavButton alloc] initWithImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_communit_back"]];
85   - [searchBtn addTarget:self action:@selector(leftNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
86   - self.leftNavBtns = @[searchBtn];
87 99 }
88 100  
89 101 -(void)leftNavBtnAction
... ...
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntEvaluaViewController.m
... ... @@ -91,8 +91,8 @@
91 91 UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
92 92 submiteBtn.frame = CGRectMake(0, 0, 50, 14);
93 93 [submiteBtn setTitle:@"提交" forState:UIControlStateNormal];
94   - [submiteBtn setTitleColor:UIColorHex(#999999) forState:UIControlStateNormal];
95   - submiteBtn.backgroundColor = UIColorHex(#F2F2F2);
  94 + [submiteBtn setTitleColor:UIColorWhite forState:UIControlStateNormal];
  95 + submiteBtn.backgroundColor = UIColorHex(#CD0302);//UIColorHex(#F2F2F2);
96 96 submiteBtn.titleLabel.font = [UIFont systemFontOfSize:12];
97 97 submiteBtn.layer.cornerRadius = 3;
98 98 submiteBtn.layer.masksToBounds = YES;
... ... @@ -346,17 +346,22 @@
346 346 [self.assetsArray addObjectsFromArray:assets];
347 347 [self setReloadFinishPickingPhotos];
348 348 }
349   -- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
  349 +-(BOOL)textViewShouldReturn:(QMUITextView *)textView
350 350 {
351   - if (text.length > 0) {
352   - [self.submiteBtn setTitleColor:UIColorWhite forState:UIControlStateNormal];
353   - self.submiteBtn.backgroundColor = UIColorHex(#CD0302);
354   - }else{
355   - [self.submiteBtn setTitleColor:UIColorHex(#999999) forState:UIControlStateNormal];
356   - self.submiteBtn.backgroundColor = UIColorHex(#F2F2F2);
357   - }
  351 + [textView resignFirstResponder];
358 352 return YES;
359 353 }
  354 +//- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
  355 +//{
  356 +// if (text.length > 0) {
  357 +// [self.submiteBtn setTitleColor:UIColorWhite forState:UIControlStateNormal];
  358 +// self.submiteBtn.backgroundColor = UIColorHex(#CD0302);
  359 +// }else{
  360 +// [self.submiteBtn setTitleColor:UIColorHex(#999999) forState:UIControlStateNormal];
  361 +// self.submiteBtn.backgroundColor = UIColorHex(#F2F2F2);
  362 +// }
  363 +// return YES;
  364 +//}
360 365 -(void)setReloadFinishPickingPhotos
361 366 {
362 367 if (self.imageArray.count == 0) {
... ...
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntInformViewController.m
... ... @@ -83,7 +83,8 @@
83 83 }
84 84 -(void)rightMothodAction
85 85 {
86   - NSLog(@"报修记录");
  86 + CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init];
  87 + [[self displayViewController] dsPushViewController:repairView animated:YES];
87 88 }
88 89 -(NSMutableArray *)dataSource
89 90 {
... ... @@ -187,6 +188,16 @@
187 188 __weak typeof(self) weakSelf = self;
188 189 [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenPushWithParamDict:paramDict nbhdId:self.nbhdId CompleterBlock:^(CNLiveCommuntyActivityMaintainsCreateModel * _Nonnull createModel) {
189 190 if (createModel) {
  191 +
  192 + NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:weakSelf.navigationController.viewControllers];
  193 + for (UIViewController * vc in weakSelf.navigationController.viewControllers) {
  194 + if ([vc isKindOfClass:CNLiveCommuntInformViewController.class]) {
  195 + [tempArray removeObject:vc];
  196 + break;
  197 + }
  198 + }
  199 + self.navigationController.viewControllers = tempArray;
  200 +
190 201 CNLiveCommuntyOrderViewController * vc = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListYetOrder CreateModel:createModel];
191 202 [weakSelf.navigationController pushViewController:vc animated:YES];
192 203  
... ...
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntListViewController.m
... ... @@ -41,12 +41,16 @@
41 41 }
42 42 return self;
43 43 }
  44 +-(void)viewDidAppear:(BOOL)animated
  45 +{
  46 + [super viewDidAppear:animated];
  47 + [self loadDataSourceWithPage:1 nbhdId:self.nbhdId index:self.index CompleterBlock:NULL];
  48 +}
44 49 - (void)viewDidLoad {
45 50 [super viewDidLoad];
46 51 // Do any additional setup after loading the view.
47 52 self.view.backgroundColor = UIColorHex(#F9F9F9);
48 53 self.dataArray = [[NSMutableArray alloc] init];
49   - [self loadDataSourceWithPage:1 nbhdId:self.nbhdId index:self.index CompleterBlock:NULL];
50 54 [self addRefreshMainView];
51 55 }
52 56  
... ... @@ -74,6 +78,7 @@
74 78 [weakSelf.tableView.mj_header endRefreshing];
75 79 [weakSelf.tableView.mj_footer endRefreshing];
76 80 if (isLastPage) [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
  81 + if (page == 1 && weakSelf.dataArray.count == 0 && weakSelf.tableView.mj_footer) weakSelf.tableView.mj_footer = nil;
77 82 }];
78 83 }
79 84  
... ... @@ -157,7 +162,7 @@
157 162 {
158 163 if (self.showType == CNLiveCommuntListShowTypeRecord) {
159 164 CNLiveCommuntyActivityRecordListModel * recordModel = self.dataArray[indexPath.row];
160   - recordModel.status = [NSString stringWithFormat:@"%ld",(long)self.index];
  165 + recordModel.index = [NSString stringWithFormat:@"%ld",(long)self.index];
161 166 return [CNLiveCommuntSubRecordTableView setTableView:tableView RecordModel:recordModel];
162 167 }
163 168 if (self.showType == CNLiveCommuntListShowTypeHome) {
... ... @@ -207,8 +212,9 @@
207 212 }
208 213 if (self.showType == CNLiveCommuntListShowTypeHome) {
209 214 CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row];
210   - CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:listModel.idStr];
211   - [self.navigationController pushViewController:signUpView animated:YES];
  215 + [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithParamDict:[listModel mj_JSONObject]];
  216 +// CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:listModel.idStr];
  217 +// [self.navigationController pushViewController:signUpView animated:YES];
212 218 }
213 219 }
214 220  
... ...
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntServiceViewController.m
... ... @@ -116,8 +116,8 @@
116 116 [searchBtn addTarget:self action:@selector(leftNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
117 117 self.leftNavBtns = @[searchBtn];
118 118  
119   - if (self.isShowLocation) {
120   - NSString * name = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:kCNLiveCommuntyNBhdNameIdentifier];
  119 + NSString * name = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:kCNLiveCommuntyNBhdNameIdentifier];
  120 + if (self.isShowLocation && [name isNotBlank]) {
121 121 DSNavButton * rightBtn = [[DSNavButton alloc] initWithImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_community_service_location"] imageSize:CGSizeMake(15, 15) title:name font:[UIFont systemFontOfSize:10] titleColor:UIColorHex(#333333) imagePosition:DSImagePositionLeft];
122 122 rightBtn.size = CGSizeMake(80, self.topNavViewHeight - kStatusHeight);
123 123 [rightBtn addTarget:self action:@selector(rightNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
... ...
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
... ... @@ -86,6 +86,10 @@
86 86 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
87 87 self.tableView.tableFooterView = [[UIView alloc] init];
88 88 }
  89 +-(void)dealloc
  90 +{
  91 + [[NSNotificationCenter defaultCenter] removeObserver:self name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil];
  92 +}
89 93 -(void)layoutTableView
90 94 {
91 95 [super layoutTableView];
... ... @@ -157,10 +161,15 @@
157 161 [weakSelf.navigationController pushViewController:resultVC animated:YES];
158 162 }else{
159 163 [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:signUpModel.orderId price:weakSelf.detailModel.unitPrice body:weakSelf.detailModel.name];
  164 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payResultSuccessNNotification:) name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil];
160 165 }
161 166 }];
162 167 }
163   -
  168 +-(void)payResultSuccessNNotification:(NSNotification *)note
  169 +{
  170 + NSDictionary * paramDict = (NSDictionary *)note.userInfo;
  171 + NSLog(@"支付成功之后返回数据=>%@ json==>%@",paramDict,[paramDict mj_JSONString]);
  172 +}
164 173 /// 跳转删除人员
165 174 /// @param subDict 显示信息
166 175 -(void)setCommuntPushAddWithDelectUserViewController:(NSDictionary *)subDict
... ... @@ -285,7 +294,7 @@
285 294 [addBtn setTitle:@"添加" forState:UIControlStateHighlighted];
286 295 [addBtn setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal];
287 296 [addBtn setTitleColor:UIColorHex(#FD862E) forState:UIControlStateHighlighted];
288   - [addBtn setBackgroundColor:UIColorHex(#FD862E14)];
  297 + addBtn.backgroundColor = [UIColor colorWithRed:253/255.0 green:234/255.0 blue:46/255.0 alpha:0.08];
289 298 addBtn.layer.cornerRadius = 5;
290 299 addBtn.layer.masksToBounds = YES;
291 300 addBtn.spacingBetweenImageAndTitle = 3;
... ...
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultListViewController.m
... ... @@ -26,7 +26,22 @@
26 26 }
27 27 return self;
28 28 }
29   -
  29 +-(void)viewDidAppear:(BOOL)animated
  30 +{
  31 + [super viewDidAppear:animated];
  32 + NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:self.navigationController.viewControllers];
  33 + for (UIViewController * vc in self.navigationController.viewControllers) {
  34 + if ([vc isKindOfClass:CNLiveCommuntyResultViewController.class]) {
  35 + [tempArray removeObject:vc];
  36 + break;
  37 + }
  38 + if ([vc isKindOfClass:NSClassFromString(@"CNLiveCommuntSignUpViewController")]) {
  39 + [tempArray removeObject:vc];
  40 + break;
  41 + }
  42 + }
  43 + self.navigationController.viewControllers = tempArray;
  44 +}
30 45 - (void)viewDidLoad {
31 46 [super viewDidLoad];
32 47 // Do any additional setup after loading the view.
... ...
CNLiveCommunitModule/Classes/ViewModel/CNLiveCommuntViewModel.m
... ... @@ -103,7 +103,7 @@
103 103 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
104 104 [CNLiveNetworking setupShowDataResult:NO];
105 105 [CNLiveNetworking setupShowResult:YES];
106   - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNCCommuntNBhdListContentURL Param:@{} CacheType:CNLiveNetworkCacheTypeCacheNetwork CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  106 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNCCommuntNBhdListContentURL Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
107 107 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
108 108 [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
109 109 if (responseObject) {
... ...
Example/CNLiveCommunitModule/CNLIVEViewController.m
... ... @@ -24,6 +24,7 @@
24 24 #import <Masonry/Masonry.h>
25 25 #import <YYText/YYText.h>
26 26 #import "CNLiveCommuntViewModel.h"
  27 +#import "CNLiveCommuntSignUpView.h"
27 28 #import "CNLiveCommuntyResultListViewController.h"
28 29 #import <CNLiveEnvironment/CNLiveEnvironment.h>
29 30 #import <CNLiveUserManagement/CNUserInfoManager.h>
... ... @@ -108,9 +109,12 @@
108 109 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod];
109 110 }
110 111 if (indexPath.row == 1) {
111   - NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
112   - CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId];
113   - [self.navigationController pushViewController:recordVC animated:YES];
  112 +// NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
  113 +// CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId];
  114 +// [self.navigationController pushViewController:recordVC animated:YES];
  115 + [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:@"0.01" PayUrl:@"https://www.baidu.com" CompleterBlock:^{
  116 + NSLog(@"隐藏了");
  117 + }];
114 118 }
115 119 if (indexPath.row == 2) {
116 120 CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init];
... ...
Example/CNLiveCommunitModule/CNLiveCommunitModuleImpl.m
... ... @@ -8,6 +8,8 @@
8 8  
9 9 #import "CNLiveCommunitModuleImpl.h"
10 10 #import "CNLIVEMainViewController.h"
  11 +#import "CNLiveCommuntSignUpViewController.h"
  12 +#import "CNLiveCommuntTools.h"
11 13 @implementation CNLiveCommunitModuleImpl
12 14 /// 获取主工程的WebView
13 15 /// @param webUrl url
... ... @@ -30,7 +32,9 @@
30 32 /// @param paramDict url
31 33 -(void)pushWebViewWithMainProjectWithParamDict:(NSDictionary *)paramDict
32 34 {
33   -
  35 + NSString * idStr = [paramDict objectForKey:@"id"];
  36 + CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:idStr];
  37 + [[CNLiveCommuntTools cCommunt_currentViewController].navigationController pushViewController:signUpView animated:YES];
34 38 }
35 39  
36 40 /// 获取主工程的视讯相关界面逻辑
... ...