Commit 93e4020966ec1c228f0d0167c8cfd09348724f21

Authored by liushiyu
1 parent 86f6849e

0.0.5

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.4' 11 + s.version = '0.0.5'
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/Model/CNLiveCommuntyHomeModel.h
@@ -81,6 +81,8 @@ NS_ASSUME_NONNULL_BEGIN @@ -81,6 +81,8 @@ NS_ASSUME_NONNULL_BEGIN
81 @property (nonatomic, copy) NSString *paymentStatus; 81 @property (nonatomic, copy) NSString *paymentStatus;
82 /**活动状态 0草稿 1活动已发布 2活动已取消*/ 82 /**活动状态 0草稿 1活动已发布 2活动已取消*/
83 @property (nonatomic, copy) NSString *status; 83 @property (nonatomic, copy) NSString *status;
  84 +/**自己定义的 便于区分*/
  85 +@property (nonatomic, copy) NSString *index;
84 @property (nonatomic, copy) NSString *createUser; 86 @property (nonatomic, copy) NSString *createUser;
85 @property (nonatomic, copy) NSString *handworkName; 87 @property (nonatomic, copy) NSString *handworkName;
86 @property (nonatomic, copy) NSString *refundAmount; 88 @property (nonatomic, copy) NSString *refundAmount;
@@ -212,14 +214,31 @@ NS_ASSUME_NONNULL_BEGIN @@ -212,14 +214,31 @@ NS_ASSUME_NONNULL_BEGIN
212 @property (nonatomic, copy) NSString *signupEndTimeString; 214 @property (nonatomic, copy) NSString *signupEndTimeString;
213 @end 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 @interface CNLiveCommuntyActivitySignUpModel : NSObject 234 @interface CNLiveCommuntyActivitySignUpModel : NSObject
216 @property (nonatomic, copy) NSString * type; 235 @property (nonatomic, copy) NSString * type;
217 @property (nonatomic, copy) NSString * orderId; 236 @property (nonatomic, copy) NSString * orderId;
218 @property (nonatomic, copy) NSString * signsString; 237 @property (nonatomic, copy) NSString * signsString;
219 @property (nonatomic, strong) NSArray * signs; 238 @property (nonatomic, strong) NSArray * signs;
  239 +@property (nonatomic, strong) CNLiveCommuntyActivitySignUpOrderModel * order;
220 @end 240 @end
221 241
222 -  
223 @interface CNLiveCommuntyActivityUserDetailModel : NSObject 242 @interface CNLiveCommuntyActivityUserDetailModel : NSObject
224 @property (nonatomic, copy) NSString *gender; 243 @property (nonatomic, copy) NSString *gender;
225 @property (nonatomic, copy) NSString *age; 244 @property (nonatomic, copy) NSString *age;
CNLiveCommunitModule/Classes/Model/CNLiveCommuntyHomeModel.m
@@ -371,12 +371,39 @@ MJCodingImplementation @@ -371,12 +371,39 @@ MJCodingImplementation
371 371
372 @end 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 @implementation CNLiveCommuntyActivitySignUpModel 401 @implementation CNLiveCommuntyActivitySignUpModel
375 MJCodingImplementation 402 MJCodingImplementation
376 403
377 - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property 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 __block NSArray * array = (NSArray *)oldValue; 407 __block NSArray * array = (NSArray *)oldValue;
381 __block NSMutableString * signsMString = [[NSMutableString alloc] init]; 408 __block NSMutableString * signsMString = [[NSMutableString alloc] init];
382 [array enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 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,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
17 17
18 /// 显示收款弹框 18 /// 显示收款弹框
19 /// @param price 价格 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 /// @param completerBlock 确认回调 23 /// @param completerBlock 确认回调
CNLiveCommunitModule/Classes/View/CNLiveCommuntSignUpView.m
@@ -72,7 +72,7 @@ @@ -72,7 +72,7 @@
72 72
73 /// 显示收款弹框 73 /// 显示收款弹框
74 /// @param price 价格 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 UIView * tipView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth - 60, 300)]; 77 UIView * tipView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth - 60, 300)];
78 tipView.backgroundColor = [UIColor whiteColor]; 78 tipView.backgroundColor = [UIColor whiteColor];
@@ -91,6 +91,18 @@ @@ -91,6 +91,18 @@
91 make.top.mas_equalTo(tipView).offset(20); 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 UIImageView * qrView = [[UIImageView alloc] init]; 106 UIImageView * qrView = [[UIImageView alloc] init];
95 qrView.contentMode = UIViewContentModeScaleAspectFill; 107 qrView.contentMode = UIViewContentModeScaleAspectFill;
96 qrView.backgroundColor = [UIColor whiteColor]; 108 qrView.backgroundColor = [UIColor whiteColor];
@@ -105,13 +117,18 @@ @@ -105,13 +117,18 @@
105 QMUIModalPresentationViewController *modalViewController = [[QMUIModalPresentationViewController alloc] init]; 117 QMUIModalPresentationViewController *modalViewController = [[QMUIModalPresentationViewController alloc] init];
106 modalViewController.animationStyle = QMUIModalPresentationAnimationStyleFade; 118 modalViewController.animationStyle = QMUIModalPresentationAnimationStyleFade;
107 modalViewController.contentView = tipView; 119 modalViewController.contentView = tipView;
  120 + modalViewController.modal = YES;
108 [modalViewController showWithAnimated:YES completion:nil]; 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 return modalViewController; 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 + (UIImage *)communty_generateWithDefaultQRCodeData:(NSString *)data imageViewWidth:(CGFloat)imageViewWidth { 134 + (UIImage *)communty_generateWithDefaultQRCodeData:(NSString *)data imageViewWidth:(CGFloat)imageViewWidth {
@@ -553,7 +570,7 @@ @@ -553,7 +570,7 @@
553 [self.mainView addSubview:self.qrButton]; 570 [self.mainView addSubview:self.qrButton];
554 [self.mainView addSubview:self.payButton]; 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 return self; 575 return self;
559 } 576 }
@@ -633,7 +650,11 @@ @@ -633,7 +650,11 @@
633 NSString * p = [NSString stringWithFormat:@"%.0f",([self.amoutField.text floatValue]*100)]; 650 NSString * p = [NSString stringWithFormat:@"%.0f",([self.amoutField.text floatValue]*100)];
634 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { 651 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
635 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; 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 }else{ 659 }else{
639 [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ 660 [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{
@@ -642,7 +663,11 @@ @@ -642,7 +663,11 @@
642 weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); 663 weakSelf.amoutField.textColor = UIColorHex(#c8c8c8);
643 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { 664 [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
644 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; 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,15 +213,15 @@
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]:@"0.00";
216 - if ([recoredModel.status 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;
219 self.evalButton.layer.borderWidth = 1; 219 self.evalButton.layer.borderWidth = 1;
220 self.evalButton.layer.borderColor = UIColorHex(#FD862E).CGColor; 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 self.evalButton.hidden = NO; 222 self.evalButton.hidden = NO;
223 self.evalButton.userInteractionEnabled = YES; 223 self.evalButton.userInteractionEnabled = YES;
224 - }else if ([recoredModel.status isEqualToString:@"4"]) { 224 + }else if ([recoredModel.index isEqualToString:@"4"]) {
225 self.evalButton.hidden = NO; 225 self.evalButton.hidden = NO;
226 self.evalButton.userInteractionEnabled = NO; 226 self.evalButton.userInteractionEnabled = NO;
227 NSString * buttonName = @""; 227 NSString * buttonName = @"";
@@ -232,8 +232,8 @@ @@ -232,8 +232,8 @@
232 } 232 }
233 [self.evalButton setTitle:buttonName forState:UIControlStateNormal]; 233 [self.evalButton setTitle:buttonName forState:UIControlStateNormal];
234 [self.evalButton setTitleColor:color forState:UIControlStateNormal]; 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 self.evalButton.hidden = NO; 237 self.evalButton.hidden = NO;
238 self.evalButton.userInteractionEnabled = NO; 238 self.evalButton.userInteractionEnabled = NO;
239 [self.evalButton setTitle:@"活动已取消" forState:UIControlStateNormal]; 239 [self.evalButton setTitle:@"活动已取消" forState:UIControlStateNormal];
@@ -245,7 +245,7 @@ @@ -245,7 +245,7 @@
245 } 245 }
246 -(void)evalContentButton:(UIButton *)button 246 -(void)evalContentButton:(UIButton *)button
247 { 247 {
248 - if ([self.recoredModel.status isEqualToString:@"1"]) { 248 + if ([self.recoredModel.index isEqualToString:@"1"]) {
249 CNLiveCommuntEvaluaViewController * evaluaView = [[CNLiveCommuntEvaluaViewController alloc] initWithRecord:self.recoredModel]; 249 CNLiveCommuntEvaluaViewController * evaluaView = [[CNLiveCommuntEvaluaViewController alloc] initWithRecord:self.recoredModel];
250 [[self displayViewController].navigationController pushViewController:evaluaView animated:YES]; 250 [[self displayViewController].navigationController pushViewController:evaluaView animated:YES];
251 } 251 }
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntActiviViewController.m
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
43 - (void)viewDidLoad { 43 - (void)viewDidLoad {
44 [super viewDidLoad]; 44 [super viewDidLoad];
45 // Do any additional setup after loading the view. 45 // Do any additional setup after loading the view.
  46 + self.view.backgroundColor = [UIColor whiteColor];
46 UIViewController *subVC = [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithWebUrl:self.webUrl type:self.type]; 47 UIViewController *subVC = [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithWebUrl:self.webUrl type:self.type];
47 [self.view addSubview:subVC.view]; 48 [self.view addSubview:subVC.view];
48 [self addChildViewController:subVC]; 49 [self addChildViewController:subVC];
@@ -53,6 +54,10 @@ @@ -53,6 +54,10 @@
53 make.top.mas_equalTo(kNavigationBarHeight); 54 make.top.mas_equalTo(kNavigationBarHeight);
54 make.left.bottom.right.mas_equalTo(self.view); 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,17 +78,24 @@
73 [header addObserver:self forKeyPath:@"state" options:NSKeyValueObservingOptionNew context:nil]; 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 -(void)initNav 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 -(void)leftNavBtnAction 101 -(void)leftNavBtnAction
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntEvaluaViewController.m
@@ -91,8 +91,8 @@ @@ -91,8 +91,8 @@
91 UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 91 UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
92 submiteBtn.frame = CGRectMake(0, 0, 50, 14); 92 submiteBtn.frame = CGRectMake(0, 0, 50, 14);
93 [submiteBtn setTitle:@"提交" forState:UIControlStateNormal]; 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 submiteBtn.titleLabel.font = [UIFont systemFontOfSize:12]; 96 submiteBtn.titleLabel.font = [UIFont systemFontOfSize:12];
97 submiteBtn.layer.cornerRadius = 3; 97 submiteBtn.layer.cornerRadius = 3;
98 submiteBtn.layer.masksToBounds = YES; 98 submiteBtn.layer.masksToBounds = YES;
@@ -346,17 +346,22 @@ @@ -346,17 +346,22 @@
346 [self.assetsArray addObjectsFromArray:assets]; 346 [self.assetsArray addObjectsFromArray:assets];
347 [self setReloadFinishPickingPhotos]; 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 return YES; 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 -(void)setReloadFinishPickingPhotos 365 -(void)setReloadFinishPickingPhotos
361 { 366 {
362 if (self.imageArray.count == 0) { 367 if (self.imageArray.count == 0) {
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntInformViewController.m
@@ -83,7 +83,8 @@ @@ -83,7 +83,8 @@
83 } 83 }
84 -(void)rightMothodAction 84 -(void)rightMothodAction
85 { 85 {
86 - NSLog(@"报修记录"); 86 + CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init];
  87 + [[self displayViewController] dsPushViewController:repairView animated:YES];
87 } 88 }
88 -(NSMutableArray *)dataSource 89 -(NSMutableArray *)dataSource
89 { 90 {
@@ -187,6 +188,16 @@ @@ -187,6 +188,16 @@
187 __weak typeof(self) weakSelf = self; 188 __weak typeof(self) weakSelf = self;
188 [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenPushWithParamDict:paramDict nbhdId:self.nbhdId CompleterBlock:^(CNLiveCommuntyActivityMaintainsCreateModel * _Nonnull createModel) { 189 [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenPushWithParamDict:paramDict nbhdId:self.nbhdId CompleterBlock:^(CNLiveCommuntyActivityMaintainsCreateModel * _Nonnull createModel) {
189 if (createModel) { 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 CNLiveCommuntyOrderViewController * vc = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListYetOrder CreateModel:createModel]; 201 CNLiveCommuntyOrderViewController * vc = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListYetOrder CreateModel:createModel];
191 [weakSelf.navigationController pushViewController:vc animated:YES]; 202 [weakSelf.navigationController pushViewController:vc animated:YES];
192 203
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntListViewController.m
@@ -41,12 +41,16 @@ @@ -41,12 +41,16 @@
41 } 41 }
42 return self; 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 - (void)viewDidLoad { 49 - (void)viewDidLoad {
45 [super viewDidLoad]; 50 [super viewDidLoad];
46 // Do any additional setup after loading the view. 51 // Do any additional setup after loading the view.
47 self.view.backgroundColor = UIColorHex(#F9F9F9); 52 self.view.backgroundColor = UIColorHex(#F9F9F9);
48 self.dataArray = [[NSMutableArray alloc] init]; 53 self.dataArray = [[NSMutableArray alloc] init];
49 - [self loadDataSourceWithPage:1 nbhdId:self.nbhdId index:self.index CompleterBlock:NULL];  
50 [self addRefreshMainView]; 54 [self addRefreshMainView];
51 } 55 }
52 56
@@ -74,6 +78,7 @@ @@ -74,6 +78,7 @@
74 [weakSelf.tableView.mj_header endRefreshing]; 78 [weakSelf.tableView.mj_header endRefreshing];
75 [weakSelf.tableView.mj_footer endRefreshing]; 79 [weakSelf.tableView.mj_footer endRefreshing];
76 if (isLastPage) [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData]; 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,7 +162,7 @@
157 { 162 {
158 if (self.showType == CNLiveCommuntListShowTypeRecord) { 163 if (self.showType == CNLiveCommuntListShowTypeRecord) {
159 CNLiveCommuntyActivityRecordListModel * recordModel = self.dataArray[indexPath.row]; 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 return [CNLiveCommuntSubRecordTableView setTableView:tableView RecordModel:recordModel]; 166 return [CNLiveCommuntSubRecordTableView setTableView:tableView RecordModel:recordModel];
162 } 167 }
163 if (self.showType == CNLiveCommuntListShowTypeHome) { 168 if (self.showType == CNLiveCommuntListShowTypeHome) {
@@ -207,8 +212,9 @@ @@ -207,8 +212,9 @@
207 } 212 }
208 if (self.showType == CNLiveCommuntListShowTypeHome) { 213 if (self.showType == CNLiveCommuntListShowTypeHome) {
209 CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row]; 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,8 +116,8 @@
116 [searchBtn addTarget:self action:@selector(leftNavBtnAction) forControlEvents:UIControlEventTouchUpInside]; 116 [searchBtn addTarget:self action:@selector(leftNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
117 self.leftNavBtns = @[searchBtn]; 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 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]; 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 rightBtn.size = CGSizeMake(80, self.topNavViewHeight - kStatusHeight); 122 rightBtn.size = CGSizeMake(80, self.topNavViewHeight - kStatusHeight);
123 [rightBtn addTarget:self action:@selector(rightNavBtnAction) forControlEvents:UIControlEventTouchUpInside]; 123 [rightBtn addTarget:self action:@selector(rightNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
@@ -86,6 +86,10 @@ @@ -86,6 +86,10 @@
86 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 86 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
87 self.tableView.tableFooterView = [[UIView alloc] init]; 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 -(void)layoutTableView 93 -(void)layoutTableView
90 { 94 {
91 [super layoutTableView]; 95 [super layoutTableView];
@@ -157,10 +161,15 @@ @@ -157,10 +161,15 @@
157 [weakSelf.navigationController pushViewController:resultVC animated:YES]; 161 [weakSelf.navigationController pushViewController:resultVC animated:YES];
158 }else{ 162 }else{
159 [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:signUpModel.orderId price:weakSelf.detailModel.unitPrice body:weakSelf.detailModel.name]; 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 /// @param subDict 显示信息 174 /// @param subDict 显示信息
166 -(void)setCommuntPushAddWithDelectUserViewController:(NSDictionary *)subDict 175 -(void)setCommuntPushAddWithDelectUserViewController:(NSDictionary *)subDict
@@ -285,7 +294,7 @@ @@ -285,7 +294,7 @@
285 [addBtn setTitle:@"添加" forState:UIControlStateHighlighted]; 294 [addBtn setTitle:@"添加" forState:UIControlStateHighlighted];
286 [addBtn setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal]; 295 [addBtn setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal];
287 [addBtn setTitleColor:UIColorHex(#FD862E) forState:UIControlStateHighlighted]; 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 addBtn.layer.cornerRadius = 5; 298 addBtn.layer.cornerRadius = 5;
290 addBtn.layer.masksToBounds = YES; 299 addBtn.layer.masksToBounds = YES;
291 addBtn.spacingBetweenImageAndTitle = 3; 300 addBtn.spacingBetweenImageAndTitle = 3;
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultListViewController.m
@@ -26,7 +26,22 @@ @@ -26,7 +26,22 @@
26 } 26 }
27 return self; 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 - (void)viewDidLoad { 45 - (void)viewDidLoad {
31 [super viewDidLoad]; 46 [super viewDidLoad];
32 // Do any additional setup after loading the view. 47 // Do any additional setup after loading the view.
CNLiveCommunitModule/Classes/ViewModel/CNLiveCommuntViewModel.m
@@ -103,7 +103,7 @@ @@ -103,7 +103,7 @@
103 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 103 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
104 [CNLiveNetworking setupShowDataResult:NO]; 104 [CNLiveNetworking setupShowDataResult:NO];
105 [CNLiveNetworking setupShowResult:YES]; 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 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view]; 107 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
108 [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) { 108 [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
109 if (responseObject) { 109 if (responseObject) {
Example/CNLiveCommunitModule/CNLIVEViewController.m
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 #import <Masonry/Masonry.h> 24 #import <Masonry/Masonry.h>
25 #import <YYText/YYText.h> 25 #import <YYText/YYText.h>
26 #import "CNLiveCommuntViewModel.h" 26 #import "CNLiveCommuntViewModel.h"
  27 +#import "CNLiveCommuntSignUpView.h"
27 #import "CNLiveCommuntyResultListViewController.h" 28 #import "CNLiveCommuntyResultListViewController.h"
28 #import <CNLiveEnvironment/CNLiveEnvironment.h> 29 #import <CNLiveEnvironment/CNLiveEnvironment.h>
29 #import <CNLiveUserManagement/CNUserInfoManager.h> 30 #import <CNLiveUserManagement/CNUserInfoManager.h>
@@ -108,9 +109,12 @@ @@ -108,9 +109,12 @@
108 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod]; 109 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod];
109 } 110 }
110 if (indexPath.row == 1) { 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 if (indexPath.row == 2) { 119 if (indexPath.row == 2) {
116 CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init]; 120 CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init];
Example/CNLiveCommunitModule/CNLiveCommunitModuleImpl.m
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
8 8
9 #import "CNLiveCommunitModuleImpl.h" 9 #import "CNLiveCommunitModuleImpl.h"
10 #import "CNLIVEMainViewController.h" 10 #import "CNLIVEMainViewController.h"
  11 +#import "CNLiveCommuntSignUpViewController.h"
  12 +#import "CNLiveCommuntTools.h"
11 @implementation CNLiveCommunitModuleImpl 13 @implementation CNLiveCommunitModuleImpl
12 /// 获取主工程的WebView 14 /// 获取主工程的WebView
13 /// @param webUrl url 15 /// @param webUrl url
@@ -30,7 +32,9 @@ @@ -30,7 +32,9 @@
30 /// @param paramDict url 32 /// @param paramDict url
31 -(void)pushWebViewWithMainProjectWithParamDict:(NSDictionary *)paramDict 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 /// 获取主工程的视讯相关界面逻辑