Commit 7c71307b39f757cd07fc470ec957b009be8dd7c0

Authored by liushiyu
1 parent a9d90cd7

0.0.3

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.2' 11 + s.version = '0.0.3'
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/Assets/CNLiveCommuntyModule.bundle/c_communty_activity_cancel@2x.png 0 → 100644

5.92 KB

CNLiveCommuntyModule/Assets/CNLiveCommuntyModule.bundle/c_communty_activity_cancel@3x.png 0 → 100644

11.5 KB

CNLiveCommuntyModule/Classes/Core/CNLiveCommunitHeader.h
@@ -58,7 +58,5 @@ @@ -58,7 +58,5 @@
58 58
59 59
60 60
61 -static NSString *const kCNLiveCommuntyNBhdIdIdentifier = @"kCNLiveCommuntyNBhdIdIdentifier";  
62 -static NSString *const kCNLiveCommuntyNBhdNameIdentifier = @"kCNLiveCommuntyNBhdNameIdentifier";  
63 -static NSString *const kCNLiveCommuntyNBhdPhoneIdentifier = @"kCNLiveCommuntyNBhdPhoneIdentifier"; 61 +static NSString *const kCNLiveCommuntyNBhdInfoIdentifier = @"kCNLiveCommuntyNBhdInfoIdentifier";
64 #endif /* CNLiveCommunitHeader_h */ 62 #endif /* CNLiveCommunitHeader_h */
CNLiveCommuntyModule/Classes/Core/CNLiveCommuntyModule.m
@@ -36,9 +36,10 @@ @@ -36,9 +36,10 @@
36 /// 跳转社区组件的主界面(如果已经选择过了就会直接进去,没有则需要进行重新选择) 36 /// 跳转社区组件的主界面(如果已经选择过了就会直接进去,没有则需要进行重新选择)
37 -(void)pushCommuntyHomeViewMethod 37 -(void)pushCommuntyHomeViewMethod
38 { 38 {
39 - NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:kCNLiveCommuntyNBhdIdIdentifier];  
40 - if ([nbhdId isNotBlank]) {  
41 - CNLiveCommuntViewController * homeVC = [[CNLiveCommuntViewController alloc] initWithNBhdId:nbhdId]; 39 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
  40 + if ([nb_info isNotBlank]) {
  41 + CNLiveCommuntyHomeListModel * listModel = [CNLiveCommuntyHomeListModel mj_objectWithKeyValues:nb_info];
  42 + CNLiveCommuntViewController * homeVC = [[CNLiveCommuntViewController alloc] initWithNBhdId:listModel.idStr];
42 homeVC.hidesBottomBarWhenPushed = YES; 43 homeVC.hidesBottomBarWhenPushed = YES;
43 [[CNLiveCommuntTools cCommunt_currentViewController].navigationController pushViewController:homeVC animated:YES]; 44 [[CNLiveCommuntTools cCommunt_currentViewController].navigationController pushViewController:homeVC animated:YES];
44 }else{ 45 }else{
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.h
@@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
81 /**0未缴费 1已缴费*/ 81 /**0未缴费 1已缴费*/
82 @property (nonatomic, copy) NSString *paymentStatus; 82 @property (nonatomic, copy) NSString *paymentStatus;
83 /**活动状态 0草稿 1活动已发布 2活动已取消*/ 83 /**活动状态 0草稿 1活动已发布 2活动已取消*/
84 -@property (nonatomic, copy) NSString *status; 84 +@property (nonatomic, copy) NSString *handworkStatus;
85 /**自己定义的 便于区分*/ 85 /**自己定义的 便于区分*/
86 @property (nonatomic, copy) NSString *index; 86 @property (nonatomic, copy) NSString *index;
87 @property (nonatomic, copy) NSString *createUser; 87 @property (nonatomic, copy) NSString *createUser;
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
@@ -126,8 +126,13 @@ MJCodingImplementation @@ -126,8 +126,13 @@ MJCodingImplementation
126 self.imgUrl = oldValue; 126 self.imgUrl = oldValue;
127 } 127 }
128 } 128 }
129 - if ([oldValue isNotBlank] && [property.name isEqualToString:@"amount"]) {  
130 - oldValue = [NSString stringWithFormat:@"%.2f",[oldValue floatValue]/100]; 129 + if ([property.name isEqualToString:@"amount"]) {
  130 + oldValue = [NSString stringWithFormat:@"%@",oldValue];
  131 + if ([oldValue isEqualToString:@"0"]) {
  132 + oldValue = @"";
  133 + }else{
  134 + oldValue = [NSString stringWithFormat:@"%.2f",[oldValue floatValue]/100];
  135 + }
131 } 136 }
132 return oldValue; 137 return oldValue;
133 } 138 }
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSubView.m
@@ -211,41 +211,93 @@ @@ -211,41 +211,93 @@
211 [self.imgView sd_setImageWithURL:[NSURL URLWithString:recoredModel.imgUrl] placeholderImage:[UIImage imageWithColor:UIColorHex(#f9f9f9)]]; 211 [self.imgView sd_setImageWithURL:[NSURL URLWithString:recoredModel.imgUrl] placeholderImage:[UIImage imageWithColor:UIColorHex(#f9f9f9)]];
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];  
215 - self.priceLabel.text = [recoredModel.amount isNotBlank]?[NSString stringWithFormat:@"%@.00",recoredModel.amount]:@""; 214 + self.descLabel.text = [NSString stringWithFormat:@"%@ %@",recoredModel.name,[recoredModel.mobile isNotBlank]?recoredModel.mobile:@""];
  215 + self.priceLabel.text = [recoredModel.amount isNotBlank]?[NSString stringWithFormat:@"%@",recoredModel.amount]:@"";
216 if ([recoredModel.index isEqualToString:@"3"]) { 216 if ([recoredModel.index isEqualToString:@"3"]) {
217 - self.evalButton.layer.cornerRadius = 10;  
218 - self.evalButton.layer.masksToBounds = YES;  
219 - self.evalButton.layer.borderWidth = 1;  
220 - self.evalButton.layer.borderColor = UIColorHex(#FD862E).CGColor;  
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;  
223 - self.evalButton.userInteractionEnabled = YES; 217 + if ([recoredModel.refundStatus isEqualToString:@"2"]) {//退费中
  218 + self.evalButton.hidden = NO;
  219 + self.evalButton.userInteractionEnabled = NO;
  220 + [self.evalButton setTitle:@"退款中" forState:UIControlStateNormal];
  221 + [self.evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal];
  222 + [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) {
  223 + make.bottom.right.mas_equalTo(self.mainView).offset(-10);
  224 + make.height.mas_equalTo(20);
  225 + make.width.mas_equalTo(90);
  226 + }];
  227 + }else{
  228 + if ([recoredModel.handworkStatus isEqualToString:@"2"]) {//活动已取消
  229 + self.evalButton.hidden = NO;
  230 + self.evalButton.userInteractionEnabled = NO;
  231 + [self.evalButton setTitle:nil forState:UIControlStateNormal];
  232 + [self.evalButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_communty_activity_cancel"] forState:UIControlStateNormal];
  233 + self.evalButton.imageView.contentMode = UIViewContentModeScaleAspectFill;
  234 + __weak typeof(self) weakSelf = self;
  235 + [self.evalButton mas_updateConstraints:^(MASConstraintMaker *make) {
  236 + make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom);
  237 + make.right.mas_equalTo(weakSelf.mainView.mas_right);
  238 + }];
  239 + }else{
  240 + self.evalButton.layer.cornerRadius = 10;
  241 + self.evalButton.layer.masksToBounds = YES;
  242 + self.evalButton.layer.borderWidth = 1;
  243 + self.evalButton.layer.borderColor = UIColorHex(#FD862E).CGColor;
  244 + [self.evalButton setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:253/255.0 green:134/255.0 blue:46/255.0 alpha:0.08]] forState:UIControlStateNormal];
  245 + self.evalButton.hidden = NO;
  246 + self.evalButton.userInteractionEnabled = YES;
  247 + [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) {
  248 + make.bottom.right.mas_equalTo(self.mainView).offset(-10);
  249 + make.height.mas_equalTo(20);
  250 + make.width.mas_equalTo(90);
  251 + }];
  252 + }
  253 + }
224 }else if ([recoredModel.index isEqualToString:@"4"]) { 254 }else if ([recoredModel.index isEqualToString:@"4"]) {
225 self.evalButton.hidden = NO; 255 self.evalButton.hidden = NO;
226 self.evalButton.userInteractionEnabled = NO; 256 self.evalButton.userInteractionEnabled = NO;
227 NSString * buttonName = @""; 257 NSString * buttonName = @"";
228 UIColor * color = UIColorHex(#0091FF); 258 UIColor * color = UIColorHex(#0091FF);
229 - if ([recoredModel.refundStatus isEqualToString:@"4"]) {  
230 - buttonName = @"退费失败"; 259 + if ([recoredModel.amount integerValue] == 0) {
  260 + buttonName = @"用户取消";
231 color = UIColorHex(#FD862E); 261 color = UIColorHex(#FD862E);
  262 + }else{
  263 + buttonName = @"退款成功";
  264 + color = UIColorHex(#0091FF);
232 } 265 }
233 [self.evalButton setTitle:buttonName forState:UIControlStateNormal]; 266 [self.evalButton setTitle:buttonName forState:UIControlStateNormal];
234 [self.evalButton setTitleColor:color forState:UIControlStateNormal]; 267 [self.evalButton setTitleColor:color forState:UIControlStateNormal];
235 - }else if ([recoredModel.index isEqualToString:@"0"]  
236 - || [recoredModel.index isEqualToString:@"1"]) {  
237 - if ([recoredModel.status isEqualToString:@"2"]) { 268 + [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) {
  269 + make.bottom.right.mas_equalTo(self.mainView).offset(-10);
  270 + make.height.mas_equalTo(20);
  271 + make.width.mas_equalTo(90);
  272 + }];
  273 + }else{
  274 + if ([recoredModel.refundStatus isEqualToString:@"2"]) {//退费中
238 self.evalButton.hidden = NO; 275 self.evalButton.hidden = NO;
239 self.evalButton.userInteractionEnabled = NO; 276 self.evalButton.userInteractionEnabled = NO;
240 - [self.evalButton setTitle:@"活动已取消" forState:UIControlStateNormal]; 277 + [self.evalButton setTitle:@"退款中" forState:UIControlStateNormal];
241 [self.evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal]; 278 [self.evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal];
  279 + [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) {
  280 + make.bottom.right.mas_equalTo(self.mainView).offset(-10);
  281 + make.height.mas_equalTo(20);
  282 + make.width.mas_equalTo(90);
  283 + }];
242 }else{ 284 }else{
243 - self.evalButton.userInteractionEnabled = NO;  
244 - self.evalButton.hidden = YES; 285 + if ([recoredModel.handworkStatus isEqualToString:@"2"]) {//活动已取消
  286 + self.evalButton.hidden = NO;
  287 + self.evalButton.userInteractionEnabled = NO;
  288 + [self.evalButton setTitle:nil forState:UIControlStateNormal];
  289 + [self.evalButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_communty_activity_cancel"] forState:UIControlStateNormal];
  290 + self.evalButton.imageView.contentMode = UIViewContentModeScaleAspectFill;
  291 + __weak typeof(self) weakSelf = self;
  292 + [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) {
  293 + make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom);
  294 + make.right.mas_equalTo(weakSelf.mainView.mas_right);
  295 + }];
  296 + }else{
  297 + self.evalButton.userInteractionEnabled = NO;
  298 + self.evalButton.hidden = YES;
  299 + }
245 } 300 }
246 - }else{  
247 - self.evalButton.userInteractionEnabled = NO;  
248 - self.evalButton.hidden = YES;  
249 } 301 }
250 } 302 }
251 -(void)evalContentButton:(UIButton *)button 303 -(void)evalContentButton:(UIButton *)button
@@ -282,11 +334,6 @@ @@ -282,11 +334,6 @@
282 make.left.mas_equalTo(weakSelf.imgView.mas_right).offset(10); 334 make.left.mas_equalTo(weakSelf.imgView.mas_right).offset(10);
283 make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-10); 335 make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-10);
284 }]; 336 }];
285 - [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) {  
286 - make.bottom.right.mas_equalTo(weakSelf.mainView).offset(-10);  
287 - make.height.mas_equalTo(20);  
288 - make.width.mas_equalTo([weakSelf.recoredModel.status isEqualToString:@"3"]?50:90);  
289 - }];  
290 [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) { 337 [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
291 make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-10); 338 make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-10);
292 make.left.mas_equalTo(weakSelf.imgView.mas_right).offset(10); 339 make.left.mas_equalTo(weakSelf.imgView.mas_right).offset(10);
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntActiviRecordViewController.m
@@ -89,7 +89,7 @@ static NSInteger const kCNLiveSectionTitleHeight = 44;//标题显示 @@ -89,7 +89,7 @@ static NSInteger const kCNLiveSectionTitleHeight = 44;//标题显示
89 -(NSMutableArray<NSString *> *)titleArray 89 -(NSMutableArray<NSString *> *)titleArray
90 { 90 {
91 if (!_titleArray) { 91 if (!_titleArray) {
92 - _titleArray = @[@"未开始",@"进行中",@"已结束",@"待评价",@"退款"].mutableCopy; 92 + _titleArray = @[@"未开始",@"进行中",@"已结束",@"待评价",@"已取消"].mutableCopy;
93 } 93 }
94 return _titleArray; 94 return _titleArray;
95 } 95 }
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntInformViewController.m
@@ -61,10 +61,14 @@ @@ -61,10 +61,14 @@
61 weakself 61 weakself
62 [QMUITips showLoadingInView:self.view]; 62 [QMUITips showLoadingInView:self.view];
63 self.dataArray = [[NSMutableArray alloc] init]; 63 self.dataArray = [[NSMutableArray alloc] init];
64 - [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenForNBHdId:@"0" CompleterBlock:^(NSArray * _Nonnull dataArray) {  
65 - [QMUITips hideAllTipsInView:weakSelf.view];  
66 - [weakSelf.dataArray addObjectsFromArray:dataArray];  
67 - }]; 64 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
  65 + if ([nb_info isNotBlank]) {
  66 + CNLiveCommuntyHomeListModel * listModel = [CNLiveCommuntyHomeListModel mj_objectWithKeyValues:nb_info];
  67 + [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenForNBHdId:listModel.propertyId CompleterBlock:^(NSArray * _Nonnull dataArray) {
  68 + [QMUITips hideAllTipsInView:weakSelf.view];
  69 + [weakSelf.dataArray addObjectsFromArray:dataArray];
  70 + }];
  71 + }
68 } 72 }
69 -(void)initTableView 73 -(void)initTableView
70 { 74 {
@@ -103,42 +107,45 @@ @@ -103,42 +107,45 @@
103 } 107 }
104 -(UIView *)setTableViewFooterView 108 -(UIView *)setTableViewFooterView
105 { 109 {
106 - NSString * phone = [[NSUserDefaults standardUserDefaults] objectForKey:kCNLiveCommuntyNBhdPhoneIdentifier]; 110 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
107 111
108 - UIView * footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, [phone isNotBlank]?90:70)]; 112 + UIView * footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, [nb_info isNotBlank]?90:70)];
109 footerView.backgroundColor = [UIColor whiteColor]; 113 footerView.backgroundColor = [UIColor whiteColor];
110 114
111 - YYLabel * phoneLabel = [[YYLabel alloc] initWithFrame:CGRectMake(0, 5, kScreenWidth, 20)];  
112 - phoneLabel.textColor = UIColorHex(#B4B4B4);  
113 - phoneLabel.textAlignment = NSTextAlignmentCenter;  
114 - phoneLabel.textVerticalAlignment = YYTextVerticalAlignmentCenter;  
115 - phoneLabel.numberOfLines = 0;  
116 - phoneLabel.hidden = ![phone isNotBlank];  
117 - phoneLabel.backgroundColor = [UIColor whiteColor];  
118 -  
119 - NSString * string = [NSString stringWithFormat:@"您也可以拨打物业电话 %@",phone];  
120 - NSMutableAttributedString *textAttributedString = [[NSMutableAttributedString alloc] initWithString:string];  
121 - textAttributedString.yy_font = [UIFont systemFontOfSize:10];  
122 - textAttributedString.yy_color = UIColorHex(#B4B4B4);  
123 - textAttributedString.yy_alignment = NSTextAlignmentCenter;  
124 - [textAttributedString yy_setTextHighlightRange:[string rangeOfString:phone]  
125 - color:[UIColor qmui_colorWithHexString:@"0091FF"]  
126 - backgroundColor:[UIColor qmui_colorWithHexString:@"0091FF"]  
127 - tapAction:^(UIView *containerView, NSAttributedString *text, NSRange range, CGRect rect){  
128 - UIAlertController * alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];  
129 - [alert addAction:[UIAlertAction actionWithTitle:phone style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {  
130 - NSMutableString* str = [[NSMutableString alloc] initWithFormat:@"tel:%@",phone];  
131 - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str] options:@{} completionHandler:NULL];  
132 - }]];  
133 - [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:NULL]];  
134 - [[self displayViewController] presentViewController:alert animated:YES completion:nil];  
135 - }];  
136 - phoneLabel.attributedText = textAttributedString;  
137 - [footerView addSubview:phoneLabel];  
138 -  
139 - UILabel * lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 30, kScreenWidth - 20, 0.5)];  
140 - lineLabel.backgroundColor = UIColorHex(#E6E6E6);  
141 - [footerView addSubview:lineLabel]; 115 + if ([nb_info isNotBlank]) {
  116 + CNLiveCommuntyHomeListModel * listModel = [CNLiveCommuntyHomeListModel mj_objectWithKeyValues:nb_info];
  117 + YYLabel * phoneLabel = [[YYLabel alloc] initWithFrame:CGRectMake(0, 5, kScreenWidth, 20)];
  118 + phoneLabel.textColor = UIColorHex(#B4B4B4);
  119 + phoneLabel.textAlignment = NSTextAlignmentCenter;
  120 + phoneLabel.textVerticalAlignment = YYTextVerticalAlignmentCenter;
  121 + phoneLabel.numberOfLines = 0;
  122 + phoneLabel.hidden = ![listModel.propertyPhone isNotBlank];
  123 + phoneLabel.backgroundColor = [UIColor whiteColor];
  124 +
  125 + NSString * string = [NSString stringWithFormat:@"您也可以拨打物业电话 %@",listModel.propertyPhone];
  126 + NSMutableAttributedString *textAttributedString = [[NSMutableAttributedString alloc] initWithString:string];
  127 + textAttributedString.yy_font = [UIFont systemFontOfSize:10];
  128 + textAttributedString.yy_color = UIColorHex(#B4B4B4);
  129 + textAttributedString.yy_alignment = NSTextAlignmentCenter;
  130 + [textAttributedString yy_setTextHighlightRange:[string rangeOfString:listModel.propertyPhone]
  131 + color:[UIColor qmui_colorWithHexString:@"0091FF"]
  132 + backgroundColor:[UIColor qmui_colorWithHexString:@"0091FF"]
  133 + tapAction:^(UIView *containerView, NSAttributedString *text, NSRange range, CGRect rect){
  134 + UIAlertController * alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
  135 + [alert addAction:[UIAlertAction actionWithTitle:listModel.propertyPhone style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  136 + NSMutableString* str = [[NSMutableString alloc] initWithFormat:@"tel:%@",listModel.propertyPhone];
  137 + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str] options:@{} completionHandler:NULL];
  138 + }]];
  139 + [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:NULL]];
  140 + [[self displayViewController] presentViewController:alert animated:YES completion:nil];
  141 + }];
  142 + phoneLabel.attributedText = textAttributedString;
  143 + [footerView addSubview:phoneLabel];
  144 +
  145 + UILabel * lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 30, kScreenWidth - 20, 0.5)];
  146 + lineLabel.backgroundColor = UIColorHex(#E6E6E6);
  147 + [footerView addSubview:lineLabel];
  148 + }
142 149
143 UIButton * submitBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 150 UIButton * submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
144 submitBtn.backgroundColor = UIColorHex(#CD0302); 151 submitBtn.backgroundColor = UIColorHex(#CD0302);
@@ -246,14 +253,25 @@ @@ -246,14 +253,25 @@
246 { 253 {
247 MJWeakSelf 254 MJWeakSelf
248 if (indexPath.row == 3) { 255 if (indexPath.row == 3) {
249 - [CNLiveCommuntSubAlertTableView showAlertViewDataSource:self.dataArray isTime:NO CompleterBlock:^(NSString * _Nonnull idStr, NSString * _Nonnull content) {  
250 - CNLiveCommuntSubInputTableView * inpView = [tableView cellForRowAtIndexPath:indexPath];  
251 - inpView.moreButton.titleLabel.font = [UIFont systemFontOfSize:15];  
252 - inpView.moreButton.titleLabel.font = [UIFont boldSystemFontOfSize:15];  
253 - [inpView.moreButton setTitle:content forState:UIControlStateNormal];  
254 - [inpView.moreButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];  
255 - weakSelf.project = idStr;  
256 - }]; 256 + if (self.dataArray.count > 0) {
  257 + [CNLiveCommuntSubAlertTableView showAlertViewDataSource:self.dataArray isTime:NO CompleterBlock:^(NSString * _Nonnull idStr, NSString * _Nonnull content) {
  258 + CNLiveCommuntSubInputTableView * inpView = [tableView cellForRowAtIndexPath:indexPath];
  259 + inpView.moreButton.titleLabel.font = [UIFont systemFontOfSize:15];
  260 + inpView.moreButton.titleLabel.font = [UIFont boldSystemFontOfSize:15];
  261 + [inpView.moreButton setTitle:content forState:UIControlStateNormal];
  262 + [inpView.moreButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];
  263 + weakSelf.project = idStr;
  264 + }];
  265 + }else{
  266 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
  267 + if ([nb_info isNotBlank]) {
  268 + CNLiveCommuntyHomeListModel * listModel = [CNLiveCommuntyHomeListModel mj_objectWithKeyValues:nb_info];
  269 + [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenForNBHdId:listModel.propertyId CompleterBlock:^(NSArray * _Nonnull dataArray) {
  270 + [QMUITips hideAllTipsInView:weakSelf.view];
  271 + [weakSelf.dataArray addObjectsFromArray:dataArray];
  272 + }];
  273 + }
  274 + }
257 } 275 }
258 if (indexPath.row == 4) { 276 if (indexPath.row == 4) {
259 [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenForTimeInterval:7 CompleterBlock:^(NSArray * _Nonnull dataArray) { 277 [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenForTimeInterval:7 CompleterBlock:^(NSArray * _Nonnull dataArray) {
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntServiceViewController.m
@@ -128,9 +128,10 @@ @@ -128,9 +128,10 @@
128 [searchBtn addTarget:self action:@selector(leftNavBtnAction) forControlEvents:UIControlEventTouchUpInside]; 128 [searchBtn addTarget:self action:@selector(leftNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
129 self.leftNavBtns = @[searchBtn]; 129 self.leftNavBtns = @[searchBtn];
130 130
131 - NSString * name = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:kCNLiveCommuntyNBhdNameIdentifier];  
132 - if (self.isShowLocation && [name isNotBlank]) {  
133 - 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]; 131 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
  132 + if (self.isShowLocation && [nb_info isNotBlank]) {
  133 + CNLiveCommuntyHomeListModel * listModel = [CNLiveCommuntyHomeListModel mj_objectWithKeyValues:nb_info];
  134 + DSNavButton * rightBtn = [[DSNavButton alloc] initWithImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_community_service_location"] imageSize:CGSizeMake(15, 15) title:listModel.name font:[UIFont systemFontOfSize:10] titleColor:UIColorHex(#333333) imagePosition:DSImagePositionLeft];
134 rightBtn.size = CGSizeMake(80, self.topNavViewHeight - kStatusHeight); 135 rightBtn.size = CGSizeMake(80, self.topNavViewHeight - kStatusHeight);
135 [rightBtn addTarget:self action:@selector(rightNavBtnAction) forControlEvents:UIControlEventTouchUpInside]; 136 [rightBtn addTarget:self action:@selector(rightNavBtnAction) forControlEvents:UIControlEventTouchUpInside];
136 self.rightNavBtns = @[rightBtn]; 137 self.rightNavBtns = @[rightBtn];
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
@@ -41,6 +41,8 @@ @@ -41,6 +41,8 @@
41 weakSelf.detailModel = detailModel; 41 weakSelf.detailModel = detailModel;
42 [weakSelf addTopNavigationWithView]; 42 [weakSelf addTopNavigationWithView];
43 [weakSelf.tableView reloadData]; 43 [weakSelf.tableView reloadData];
  44 + }else{
  45 + [[weakSelf displayViewController] dsPopViewControllerAnimated:YES];
44 } 46 }
45 }]; 47 }];
46 48
@@ -214,7 +216,11 @@ @@ -214,7 +216,11 @@
214 #pragma mark = 216 #pragma mark =
215 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 217 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
216 { 218 {
217 - return [self.detailModel.processDesc isNotBlank]?2:1; 219 + if (self.detailModel) {
  220 + return [self.detailModel.processDesc isNotBlank]?2:1;
  221 + }
  222 + return 0;
  223 +
218 } 224 }
219 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 225 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
220 { 226 {
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyHomeListViewController.m
@@ -136,12 +136,7 @@ @@ -136,12 +136,7 @@
136 } 136 }
137 self.navigationController.viewControllers = tempArray01; 137 self.navigationController.viewControllers = tempArray01;
138 138
139 -  
140 - [[NSUserDefaults standardUserDefaults] setObject:listModel.idStr forKey:kCNLiveCommuntyNBhdIdIdentifier];  
141 - [[NSUserDefaults standardUserDefaults] synchronize];  
142 - [[NSUserDefaults standardUserDefaults] setObject:listModel.name forKey:kCNLiveCommuntyNBhdNameIdentifier];  
143 - [[NSUserDefaults standardUserDefaults] synchronize];  
144 - [[NSUserDefaults standardUserDefaults] setObject:listModel.propertyPhone forKey:kCNLiveCommuntyNBhdPhoneIdentifier]; 139 + [[NSUserDefaults standardUserDefaults] setObject:[listModel mj_JSONString] forKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
145 [[NSUserDefaults standardUserDefaults] synchronize]; 140 [[NSUserDefaults standardUserDefaults] synchronize];
146 CNLiveCommuntViewController * homeView = [[CNLiveCommuntViewController alloc] initWithNBhdId:listModel.idStr]; 141 CNLiveCommuntViewController * homeView = [[CNLiveCommuntViewController alloc] initWithNBhdId:listModel.idStr];
147 [self.navigationController pushViewController:homeView animated:YES]; 142 [self.navigationController pushViewController:homeView animated:YES];
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
@@ -78,11 +78,13 @@ @@ -78,11 +78,13 @@
78 || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { 78 || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
79 NSString * name = @""; 79 NSString * name = @"";
80 UIColor * titleColor = [UIColor whiteColor]; 80 UIColor * titleColor = [UIColor whiteColor];
81 - if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder && ![self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { 81 + if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder
  82 + && ![self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
82 name = @"咨询电话"; 83 name = @"咨询电话";
83 titleColor = UIColorHex(#0091FF); 84 titleColor = UIColorHex(#0091FF);
84 } 85 }
85 - if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { 86 + if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder
  87 + || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
86 name = @"取消订单"; 88 name = @"取消订单";
87 titleColor = UIColorHex(#F5A623FF); 89 titleColor = UIColorHex(#F5A623FF);
88 } 90 }
Example/CNLiveCommuntyModule/CNLIVEAppDelegate.m
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 [IQKeyboardManager sharedManager].enable = YES; 23 [IQKeyboardManager sharedManager].enable = YES;
24 [IQKeyboardManager sharedManager].enableAutoToolbar = YES; 24 [IQKeyboardManager sharedManager].enableAutoToolbar = YES;
25 25
26 - [CNUserInfoManager manager].userInfoModel.uid = @"145680";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10458139";//@"10537318";//@"10499533";//@"11973842" 26 + [CNUserInfoManager manager].userInfoModel.uid = @"395098";//@"145680";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10458139";//@"10537318";//@"10499533";//@"11973842"
27 27
28 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; 28 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
29 // [[NSUserDefaults standardUserDefaults] synchronize]; 29 // [[NSUserDefaults standardUserDefaults] synchronize];
Example/CNLiveCommuntyModule/CNLIVEViewController.m
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 #import <JXCategoryView/JXCategoryView.h> 22 #import <JXCategoryView/JXCategoryView.h>
23 #import <JXPagingView/JXPagerView.h> 23 #import <JXPagingView/JXPagerView.h>
24 #import <Masonry/Masonry.h> 24 #import <Masonry/Masonry.h>
  25 +#import <MJExtension/MJExtension.h>
25 #import <YYText/YYText.h> 26 #import <YYText/YYText.h>
26 #import "CNLiveCommuntViewModel.h" 27 #import "CNLiveCommuntViewModel.h"
27 #import "CNLiveCommuntSignUpView.h" 28 #import "CNLiveCommuntSignUpView.h"
@@ -114,8 +115,9 @@ @@ -114,8 +115,9 @@
114 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod]; 115 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod];
115 } 116 }
116 if (indexPath.row == 1) { 117 if (indexPath.row == 1) {
117 - NSString * nbhdId = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"kCNLiveCommuntyNBhdIdIdentifier"];  
118 - CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId]; 118 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]];
  119 + NSDictionary * dict = [nb_info mj_JSONObject];
  120 + CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:[dict stringValueForKey:@"id" default:@""]];
119 [self.navigationController pushViewController:recordVC animated:YES]; 121 [self.navigationController pushViewController:recordVC animated:YES];
120 // [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; 122 // [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
121 // [[NSUserDefaults standardUserDefaults] synchronize]; 123 // [[NSUserDefaults standardUserDefaults] synchronize];