Commit 78024900a11c9edfa515fc8e94d46955df0c9d46
1 parent
ae9f1922
0.1.1
Showing
9 changed files
with
46 additions
and
65 deletions
CNLiveCommuntyModule.podspec
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
| ... | ... | @@ -254,7 +254,7 @@ MJCodingImplementation |
| 254 | 254 | [tempDict addString:[NSString stringWithFormat:@"%@~%ld:00",startIntentString,[endIntentString integerValue]+2] forKey:@"value"]; |
| 255 | 255 | [self.infoArray addObject:tempDict]; |
| 256 | 256 | } |
| 257 | - if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"createTime"] && [status isEqualToString:@"0"]) { | |
| 257 | + if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"createTime"] && ([status isEqualToString:@"0"] || [status isEqualToString:@"1"] || [status isEqualToString:@"2"] || [status isEqualToString:@"3"])) { | |
| 258 | 258 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)]; |
| 259 | 259 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 260 | 260 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; |
| ... | ... | @@ -262,7 +262,7 @@ MJCodingImplementation |
| 262 | 262 | [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"]; |
| 263 | 263 | [self.processArray replaceObjectAtIndex:0 withObject:tempDict]; |
| 264 | 264 | } |
| 265 | - if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"repairTime"] && [status isEqualToString:@"1"]) { | |
| 265 | + if (![obj isEqualToString:@"<null>"] && [obj isNotBlank] && [key isEqualToString:@"repairTime"] && ([status isEqualToString:@"1"] || [status isEqualToString:@"3"])) { | |
| 266 | 266 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)]; |
| 267 | 267 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 268 | 268 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; |
| ... | ... | @@ -292,8 +292,8 @@ MJCodingImplementation |
| 292 | 292 | NSString * key = [subDict stringValueForKey:@"key" default:@""]; |
| 293 | 293 | if ([key isEqualToString:@"用户提交报修订单"] ) self.showType = 0; |
| 294 | 294 | if ([key isEqualToString:@"维修人员已接单"]) self.showType = 1; |
| 295 | - if ([key isEqualToString:@"完成维修并支付"]) self.showType = 2; | |
| 296 | - if ([key isEqualToString:@"用户取消报修订单"]) self.showType = 3; | |
| 295 | + if ([key isEqualToString:@"完成维修并支付"]) self.showType = 3; | |
| 296 | + if ([key isEqualToString:@"用户取消报修订单"]) self.showType = 2; | |
| 297 | 297 | } |
| 298 | 298 | self.processArray = [[NSMutableArray alloc] initWithArray:[[self.processArray reverseObjectEnumerator] allObjects]]; |
| 299 | 299 | } | ... | ... |
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
| ... | ... | @@ -819,7 +819,7 @@ |
| 819 | 819 | _qrButton.layer.cornerRadius = 5; |
| 820 | 820 | _qrButton.layer.masksToBounds = YES; |
| 821 | 821 | // _qrButton.enabled = NO; |
| 822 | - [_qrButton setBackgroundImage:[UIImage imageWithColor:UIColorHex(#FD862E1A)] forState:UIControlStateNormal]; | |
| 822 | + [_qrButton setBackgroundImage:[UIImage imageWithColor:UIColorHex(#FEF2EA)] forState:UIControlStateNormal]; | |
| 823 | 823 | [_qrButton addTarget:self action:@selector(qrCreateAction) forControlEvents:UIControlEventTouchUpInside]; |
| 824 | 824 | } |
| 825 | 825 | return _qrButton; |
| ... | ... | @@ -835,7 +835,7 @@ |
| 835 | 835 | _payButton.layer.cornerRadius = 5; |
| 836 | 836 | _payButton.layer.masksToBounds = YES; |
| 837 | 837 | // _payButton.enabled = NO; |
| 838 | - [_payButton setBackgroundImage:[UIImage imageWithColor:UIColorHex(#0091FF1A)] forState:UIControlStateNormal]; | |
| 838 | + [_payButton setBackgroundImage:[UIImage imageWithColor:UIColorHex(#E5F4FF)] forState:UIControlStateNormal]; | |
| 839 | 839 | [_payButton addTarget:self action:@selector(payCreateAction) forControlEvents:UIControlEventTouchUpInside]; |
| 840 | 840 | } |
| 841 | 841 | return _payButton; | ... | ... |
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSubView.m
| ... | ... | @@ -495,7 +495,7 @@ |
| 495 | 495 | self.lineLabel.hidden = ![repairModel.totalFee isNotBlank] || [repairModel.totalFee isEqualToString:@"0"]; |
| 496 | 496 | self.priceLabel.hidden = ![repairModel.totalFee isNotBlank] || [repairModel.totalFee isEqualToString:@"0"]; |
| 497 | 497 | self.nameLabel.text = [repairModel.repairName isNotBlank]?repairModel.repairName:@""; |
| 498 | - self.priceLabel.text = [NSString stringWithFormat:@"合计:¥%.2f",[repairModel.totalFee floatValue]/100]; | |
| 498 | + self.priceLabel.text = [NSString stringWithFormat:@"%.2f",([repairModel.totalFee integerValue]/100.0)];; | |
| 499 | 499 | self.dateLabel.text = [NSString stringWithFormat:@"下单时间:%@",repairModel.createTimeString]; |
| 500 | 500 | [_statueButton setTitle:repairModel.statusString forState:UIControlStateNormal]; |
| 501 | 501 | [_statueButton setTitleColor:![repairModel.status isEqualToString:@"3"]?UIColorHex(#FD862E):UIColorHex(#797979) forState:UIControlStateNormal]; | ... | ... |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.h
| ... | ... | @@ -11,8 +11,9 @@ |
| 11 | 11 | typedef enum : NSUInteger { |
| 12 | 12 | CNLiveCommuntyOrderShowTypeListYetOrder = 0,//////列表已发起 |
| 13 | 13 | CNLiveCommuntyOrderShowTypeListReadyOrder,////列表处理中 |
| 14 | - CNLiveCommuntyOrderShowTypeListCompletOrder,//列表已完成 | |
| 15 | 14 | CNLiveCommuntyOrderShowTypeListFailureOrder,//列表已失效 |
| 15 | + CNLiveCommuntyOrderShowTypeListCompletOrder,//列表已完成 | |
| 16 | + | |
| 16 | 17 | |
| 17 | 18 | CNLiveCommuntyOrderShowTypeChatYetOrder,//聊天里面的未接单状态 |
| 18 | 19 | CNLiveCommuntyOrderShowTypeChatReadyOrder,//聊天里面的已接单状态 | ... | ... |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
| ... | ... | @@ -81,7 +81,7 @@ |
| 81 | 81 | if (createModel) { |
| 82 | 82 | weakSelf.createMdoel = createModel; |
| 83 | 83 | if (weakSelf.isChat) weakSelf.showType = weakSelf.createMdoel.showType; |
| 84 | - if ([weakSelf.createMdoel.repairId isNotBlank] && ![weakSelf.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) weakSelf.showType = CNLiveCommuntyOrderShowTypeChatYetOrder; | |
| 84 | + if ([createModel.status isEqualToString:@"0"] && weakSelf.isChat) weakSelf.showType = CNLiveCommuntyOrderShowTypeChatYetOrder; | |
| 85 | 85 | [weakSelf setupWithBottemView]; |
| 86 | 86 | [weakSelf setupWithNaviView]; |
| 87 | 87 | [weakSelf.tableView reloadData]; |
| ... | ... | @@ -91,30 +91,9 @@ |
| 91 | 91 | } |
| 92 | 92 | -(void)setupWithNaviView |
| 93 | 93 | { |
| 94 | - if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder | |
| 95 | - || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) { | |
| 96 | - NSString * name = @""; | |
| 97 | - UIColor * titleColor = [UIColor whiteColor]; | |
| 98 | - if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder | |
| 99 | - && ![self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | |
| 100 | - name = @"咨询电话"; | |
| 101 | - titleColor = UIColorHex(#0091FF); | |
| 102 | - } | |
| 103 | - if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder | |
| 104 | - && [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | |
| 105 | - name = @"取消订单"; | |
| 106 | - titleColor = UIColorHex(#F5A623FF); | |
| 107 | - } | |
| 108 | - if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder | |
| 109 | - && [self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | |
| 110 | - name = @"取消订单"; | |
| 111 | - titleColor = UIColorHex(#F5A623FF); | |
| 112 | - } | |
| 113 | - if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder | |
| 114 | - && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | |
| 115 | - return; | |
| 116 | - } | |
| 117 | - if ([self.createMdoel.totalFee isNotBlank] && [self.createMdoel.totalFee integerValue] > 0) return; | |
| 94 | + if (([self.createMdoel.status isEqualToString:@"0"] && [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) || ([self.createMdoel.status isEqualToString:@"1"] && [self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid])) { | |
| 95 | + NSString * name = @"取消订单"; | |
| 96 | + UIColor * titleColor = UIColorHex(#F5A623); | |
| 118 | 97 | UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 119 | 98 | submiteBtn.frame = CGRectMake(0, 0, 50, 14); |
| 120 | 99 | [submiteBtn setTitle:name forState:UIControlStateNormal]; |
| ... | ... | @@ -123,9 +102,6 @@ |
| 123 | 102 | submiteBtn.titleLabel.font = [UIFont systemFontOfSize:14]; |
| 124 | 103 | [submiteBtn addTarget:self action:@selector(rightBarButtonAction:) forControlEvents:UIControlEventTouchUpInside]; |
| 125 | 104 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:submiteBtn]; |
| 126 | - if (self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { | |
| 127 | - self.navigationItem.rightBarButtonItem = nil; | |
| 128 | - } | |
| 129 | 105 | }else{ |
| 130 | 106 | self.navigationItem.rightBarButtonItem = nil; |
| 131 | 107 | } |
| ... | ... | @@ -169,7 +145,7 @@ |
| 169 | 145 | make.height.mas_equalTo(36); |
| 170 | 146 | }]; |
| 171 | 147 | } |
| 172 | - if ([self.createMdoel.repairId isNotBlank] && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | |
| 148 | + if ([self.createMdoel.status isEqualToString:@"1"] && [self.createMdoel.repairId isNotBlank] && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | |
| 173 | 149 | payString = @"已接单"; |
| 174 | 150 | self.payButton.backgroundColor = UIColorHex(#D7D7D7); |
| 175 | 151 | self.payButton.userInteractionEnabled = NO; |
| ... | ... | @@ -209,10 +185,11 @@ |
| 209 | 185 | if ([button.titleLabel.text isEqualToString:@"取消订单"]) { |
| 210 | 186 | [CNLiveCommuntSignUpView showAlertViewWithMessage:@"确定取消订单后,此订单将失效" CompleterBlock:^{ |
| 211 | 187 | [CNLiveCommuntViewModel requestWithCommuntyCancleOrderMentOrderId:weakSelf.createMdoel.idStr CompleterBlock:^{ |
| 212 | - weakSelf.showType = CNLiveCommuntyOrderShowTypeListFailureOrder; | |
| 213 | - [weakSelf setupWithBottemView]; | |
| 214 | - [weakSelf setupWithNaviView]; | |
| 215 | - [weakSelf.tableView reloadData]; | |
| 188 | +// weakSelf.showType = CNLiveCommuntyOrderShowTypeListFailureOrder; | |
| 189 | +// [weakSelf setupWithBottemView]; | |
| 190 | +// [weakSelf setupWithNaviView]; | |
| 191 | +// [weakSelf.tableView reloadData]; | |
| 192 | + [weakSelf reloadDataWithDataSource]; | |
| 216 | 193 | }]; |
| 217 | 194 | }]; |
| 218 | 195 | } |
| ... | ... | @@ -227,9 +204,10 @@ |
| 227 | 204 | weakSelf.showType = CNLiveCommuntyOrderShowTypeChatReadyOrder; |
| 228 | 205 | [button setTitle:@"取消接单" forState:UIControlStateNormal]; |
| 229 | 206 | [button setTitle:@"取消接单" forState:UIControlStateHighlighted]; |
| 230 | - [weakSelf setupWithBottemView]; | |
| 231 | - [weakSelf setupWithNaviView]; | |
| 232 | - [weakSelf.tableView reloadData]; | |
| 207 | +// [weakSelf setupWithBottemView]; | |
| 208 | +// [weakSelf setupWithNaviView]; | |
| 209 | +// [weakSelf.tableView reloadData]; | |
| 210 | + [weakSelf reloadDataWithDataSource]; | |
| 233 | 211 | }]; |
| 234 | 212 | }]; |
| 235 | 213 | } |
| ... | ... | @@ -239,9 +217,10 @@ |
| 239 | 217 | weakSelf.showType = CNLiveCommuntyOrderShowTypeChatYetOrder; |
| 240 | 218 | [button setTitle:@"立即接单" forState:UIControlStateNormal]; |
| 241 | 219 | [button setTitle:@"立即接单" forState:UIControlStateHighlighted]; |
| 242 | - [weakSelf setupWithBottemView]; | |
| 243 | - [weakSelf setupWithNaviView]; | |
| 244 | - [weakSelf.tableView reloadData]; | |
| 220 | +// [weakSelf setupWithBottemView]; | |
| 221 | +// [weakSelf setupWithNaviView]; | |
| 222 | +// [weakSelf.tableView reloadData]; | |
| 223 | + [weakSelf reloadDataWithDataSource]; | |
| 245 | 224 | }]; |
| 246 | 225 | }]; |
| 247 | 226 | } |
| ... | ... | @@ -317,7 +296,7 @@ |
| 317 | 296 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder) return 2; |
| 318 | 297 | if (self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder) return 2; |
| 319 | 298 | if (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder) return 3; |
| 320 | - if (self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) return 1; | |
| 299 | + if (self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) return 2; | |
| 321 | 300 | if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder) return 1; |
| 322 | 301 | if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) return 2; |
| 323 | 302 | if (self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder) return 1; |
| ... | ... | @@ -328,12 +307,12 @@ |
| 328 | 307 | { |
| 329 | 308 | if (self.createMdoel) { |
| 330 | 309 | if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder |
| 331 | - || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder | |
| 332 | - || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { | |
| 310 | + || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder) { | |
| 333 | 311 | if (section == 0) return self.createMdoel.infoArray.count; |
| 334 | 312 | } |
| 335 | 313 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder |
| 336 | - || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder) { | |
| 314 | + || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder | |
| 315 | + || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { | |
| 337 | 316 | if (section == 0) return self.createMdoel.infoArray.count; |
| 338 | 317 | if (section == 1) return self.createMdoel.processArray.count; |
| 339 | 318 | } |
| ... | ... | @@ -352,12 +331,12 @@ |
| 352 | 331 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
| 353 | 332 | { |
| 354 | 333 | if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder |
| 355 | - || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder | |
| 356 | - || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { | |
| 334 | + || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder) { | |
| 357 | 335 | return [CNLiveCommuntSignUpOrderViewCell setTableView:tableView Dict:self.createMdoel.infoArray[indexPath.row]]; |
| 358 | 336 | } |
| 359 | 337 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder |
| 360 | - || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder) { | |
| 338 | + || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder | |
| 339 | + || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { | |
| 361 | 340 | if (indexPath.section == 0) return [CNLiveCommuntSignUpOrderViewCell setTableView:tableView Dict:self.createMdoel.infoArray[indexPath.row]]; |
| 362 | 341 | if (indexPath.section == 1) return [CNLiveCommuntSignUpDetailViewCell setTableView:tableView isTop:indexPath.row == 0 isBottom:indexPath.row == (self.createMdoel.processArray.count - 1) Dict:self.createMdoel.processArray[indexPath.row]]; |
| 363 | 342 | } |
| ... | ... | @@ -378,14 +357,14 @@ |
| 378 | 357 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath |
| 379 | 358 | { |
| 380 | 359 | if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder |
| 381 | - || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder | |
| 382 | - || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { | |
| 360 | + || self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder) { | |
| 383 | 361 | NSDictionary * subDict = self.createMdoel.infoArray[indexPath.row]; |
| 384 | 362 | CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height; |
| 385 | 363 | return height > 30 ? height : 30; |
| 386 | 364 | } |
| 387 | 365 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder |
| 388 | - || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder) { | |
| 366 | + || self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder | |
| 367 | + || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { | |
| 389 | 368 | if (indexPath.section == 0) { |
| 390 | 369 | NSDictionary * subDict = self.createMdoel.infoArray[indexPath.row]; |
| 391 | 370 | CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height; |
| ... | ... | @@ -414,11 +393,11 @@ |
| 414 | 393 | } |
| 415 | 394 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section |
| 416 | 395 | { |
| 417 | - return section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2) ? 50 : 0; | |
| 396 | + return section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2) ? 50 : 0; | |
| 418 | 397 | } |
| 419 | 398 | -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section |
| 420 | 399 | { |
| 421 | - if (section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2)) { | |
| 400 | + if (section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2)) { | |
| 422 | 401 | UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 50)]; |
| 423 | 402 | view.backgroundColor = [UIColor clearColor]; |
| 424 | 403 | |
| ... | ... | @@ -453,11 +432,11 @@ |
| 453 | 432 | } |
| 454 | 433 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section |
| 455 | 434 | { |
| 456 | - return section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2) ? 10 : 0; | |
| 435 | + return section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2) ? 10 : 0; | |
| 457 | 436 | } |
| 458 | 437 | -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section |
| 459 | 438 | { |
| 460 | - if (section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2)) { | |
| 439 | + if (section == 0 || ((self.showType == CNLiveCommuntyOrderShowTypeListReadyOrder || self.showType == CNLiveCommuntyOrderShowTypeListYetOrder || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) && section == 1) || (self.showType == CNLiveCommuntyOrderShowTypeListCompletOrder && section == 2)) { | |
| 461 | 440 | UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)]; |
| 462 | 441 | view.backgroundColor = [UIColor clearColor]; |
| 463 | 442 | ... | ... |
CNLiveCommuntyModule/Classes/ViewModel/CNLiveCommuntViewModel.m
| ... | ... | @@ -286,10 +286,11 @@ |
| 286 | 286 | [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) { |
| 287 | 287 | if (responseObject) { |
| 288 | 288 | CNLiveCommuntyActivityMaintainsCreateModel * createModel = [CNLiveCommuntyActivityMaintainsCreateModel mj_objectWithKeyValues:responseObject]; |
| 289 | + if (createModel.showType == 1 && [createModel.repairId isNotBlank] && ![createModel.userId isEqualToString:createModel.repairId]) createModel.showType = 0; | |
| 289 | 290 | if (isChat && createModel.showType == 0) createModel.showType = 4; |
| 290 | 291 | if (isChat && createModel.showType == 1) createModel.showType = 5; |
| 291 | - if (isChat && createModel.showType == 2) createModel.showType = 6; | |
| 292 | 292 | if (isChat && createModel.showType == 3) createModel.showType = 6; |
| 293 | +// if (isChat && createModel.showType == 3) createModel.showType = 6; | |
| 293 | 294 | if (completerBlock) completerBlock(createModel); |
| 294 | 295 | }else{ |
| 295 | 296 | if (completerBlock) completerBlock(nil); | ... | ... |
Example/CNLiveCommuntyModule/CNLIVEAppDelegate.m
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | { |
| 44 | 44 | NSMutableDictionary * mDict = [[NSMutableDictionary alloc] init]; |
| 45 | 45 | [mDict setValue:[CNUserInfoManager manager].userInfoModel.uid forKey:@"loginSid"]; |
| 46 | - [mDict setValue:@"com.cnlive.CNLiveNetAdd.debug" forKey:@"platform_id"]; | |
| 46 | + [mDict setValue:@"com.cnlive.CNLiveNetAdd" forKey:@"platform_id"]; | |
| 47 | 47 | [mDict setValue:[[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""] forKey:@"uuid"]; |
| 48 | 48 | [mDict setValue:@"i" forKey:@"plat"]; |
| 49 | 49 | [mDict setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"ver"]; | ... | ... |
Example/CNLiveCommuntyModule/main.m
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | int main(int argc, char * argv[]) |
| 13 | 13 | { |
| 14 | 14 | @autoreleasepool { |
| 15 | - [CNLiveEnvironmentManager setAppType:CNLiveAppTypeUser environmentType:CNLiveDebugAppStore]; | |
| 15 | + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeUser environmentType:CNLiveProductionAppStore];//CNLiveDebugAppStore]; | |
| 16 | 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class])); |
| 17 | 17 | } |
| 18 | 18 | } | ... | ... |