Commit 480e4d116a22ffed02c7c719fd3baf21d5c95599
1 parent
73d7e51d
0.0.9
Showing
20 changed files
with
292 additions
and
100 deletions
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.8' | 11 | + s.version = '0.0.9' |
| 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/Classes/Core/CNLiveCommunitHeader.h
| @@ -59,6 +59,7 @@ | @@ -59,6 +59,7 @@ | ||
| 59 | 59 | ||
| 60 | 60 | ||
| 61 | static NSString *const kCNLiveCommuntyNBhdInfoIdentifier = @"kCNLiveCommuntyNBhdInfoIdentifier"; | 61 | static NSString *const kCNLiveCommuntyNBhdInfoIdentifier = @"kCNLiveCommuntyNBhdInfoIdentifier"; |
| 62 | +static NSString *const kCNLiveCommuntySaveChangeUserInfoNotification = @"kCNLiveCommuntySaveChangeUserInfoNotification"; | ||
| 62 | 63 | ||
| 63 | #define isDemo [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] isEqualToString:@"org.cocoapods.demo.CNLiveCommuntyModule-Example"] | 64 | #define isDemo [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] isEqualToString:@"org.cocoapods.demo.CNLiveCommuntyModule-Example"] |
| 64 | #endif /* CNLiveCommunitHeader_h */ | 65 | #endif /* CNLiveCommunitHeader_h */ |
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.h
| @@ -148,8 +148,6 @@ NS_ASSUME_NONNULL_BEGIN | @@ -148,8 +148,6 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 148 | @property (nonatomic, copy) NSString *userId; | 148 | @property (nonatomic, copy) NSString *userId; |
| 149 | @property (nonatomic, copy) NSString *repairId; | 149 | @property (nonatomic, copy) NSString *repairId; |
| 150 | @property (nonatomic, copy) NSString *payType; | 150 | @property (nonatomic, copy) NSString *payType; |
| 151 | -@property (nonatomic, strong) NSNumber *intentEndTime; | ||
| 152 | -@property (nonatomic, copy) NSString *intentEndTimeString; | ||
| 153 | @property (nonatomic, copy) NSString *status; | 151 | @property (nonatomic, copy) NSString *status; |
| 154 | @property (nonatomic, copy) NSString *repairProject; | 152 | @property (nonatomic, copy) NSString *repairProject; |
| 155 | @property (nonatomic, copy) NSString *idStr; | 153 | @property (nonatomic, copy) NSString *idStr; |
| @@ -162,6 +160,8 @@ NS_ASSUME_NONNULL_BEGIN | @@ -162,6 +160,8 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 162 | @property (nonatomic, copy) NSString *mobile; | 160 | @property (nonatomic, copy) NSString *mobile; |
| 163 | @property (nonatomic, strong) NSNumber *intentBeginTime; | 161 | @property (nonatomic, strong) NSNumber *intentBeginTime; |
| 164 | @property (nonatomic, copy) NSString *intentBeginTimeString; | 162 | @property (nonatomic, copy) NSString *intentBeginTimeString; |
| 163 | +@property (nonatomic, strong) NSNumber *intentEndTime; | ||
| 164 | +@property (nonatomic, copy) NSString *intentEndTimeString; | ||
| 165 | @property (nonatomic, strong) NSNumber *cancleTime; | 165 | @property (nonatomic, strong) NSNumber *cancleTime; |
| 166 | @property (nonatomic, copy) NSString *cancleTimeString; | 166 | @property (nonatomic, copy) NSString *cancleTimeString; |
| 167 | @property (nonatomic, strong) NSNumber *createTime; | 167 | @property (nonatomic, strong) NSNumber *createTime; |
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
| @@ -239,15 +239,19 @@ MJCodingImplementation | @@ -239,15 +239,19 @@ MJCodingImplementation | ||
| 239 | } | 239 | } |
| 240 | if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"remark"]) {//问题描述 | 240 | if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"remark"]) {//问题描述 |
| 241 | [tempDict addString:@"问题描述" forKey:@"key"]; | 241 | [tempDict addString:@"问题描述" forKey:@"key"]; |
| 242 | - [tempDict addString:obj forKey:@"value"]; | 242 | + [tempDict addString:[obj isEqualToString:@"<null>"]?@"":obj forKey:@"value"]; |
| 243 | [self.infoArray addObject:tempDict]; | 243 | [self.infoArray addObject:tempDict]; |
| 244 | } | 244 | } |
| 245 | if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"intentBeginTime"]) {//联系地址 | 245 | if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"intentBeginTime"]) {//联系地址 |
| 246 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)]; | 246 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)]; |
| 247 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 247 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 248 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 248 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 249 | + NSString * startIntentString = [dateFormatter stringFromDate:detaildate]; | ||
| 250 | + NSDateFormatter *endFormatter = [[NSDateFormatter alloc] init]; | ||
| 251 | + [endFormatter setDateFormat:@"HH"]; | ||
| 252 | + NSString * endIntentString = [endFormatter stringFromDate:detaildate]; | ||
| 249 | [tempDict addString:@"预约时间" forKey:@"key"]; | 253 | [tempDict addString:@"预约时间" forKey:@"key"]; |
| 250 | - [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"]; | 254 | + [tempDict addString:[NSString stringWithFormat:@"%@~%ld:00",startIntentString,[endIntentString integerValue]+2] forKey:@"value"]; |
| 251 | [self.infoArray addObject:tempDict]; | 255 | [self.infoArray addObject:tempDict]; |
| 252 | } | 256 | } |
| 253 | 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"]) { |
| @@ -295,39 +299,40 @@ MJCodingImplementation | @@ -295,39 +299,40 @@ MJCodingImplementation | ||
| 295 | } | 299 | } |
| 296 | - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property | 300 | - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property |
| 297 | { | 301 | { |
| 298 | - oldValue = [NSString stringWithFormat:@"%@",oldValue]; | 302 | + BOOL isNULL = [oldValue isKindOfClass:NSNull.class] || oldValue == nil; |
| 303 | + oldValue = [NSString stringWithFormat:@"%@",isNULL?@"":oldValue]; | ||
| 299 | 304 | ||
| 300 | - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"createTime"]) { | 305 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) { |
| 301 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 306 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 302 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 307 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 303 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 308 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 304 | self.createTimeString = [dateFormatter stringFromDate:detaildate]; | 309 | self.createTimeString = [dateFormatter stringFromDate:detaildate]; |
| 305 | } | 310 | } |
| 306 | - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"repairTime"]) { | 311 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"repairTime"]) { |
| 307 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 312 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 308 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 313 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 309 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 314 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 310 | self.repairTimeString = [dateFormatter stringFromDate:detaildate]; | 315 | self.repairTimeString = [dateFormatter stringFromDate:detaildate]; |
| 311 | } | 316 | } |
| 312 | - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"payTime"]) { | 317 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"payTime"]) { |
| 313 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 318 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 314 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 319 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 315 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 320 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 316 | self.payTimeString = [dateFormatter stringFromDate:detaildate]; | 321 | self.payTimeString = [dateFormatter stringFromDate:detaildate]; |
| 317 | } | 322 | } |
| 318 | - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"intentEndTime"]) { | 323 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"intentEndTime"]) { |
| 319 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 324 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 320 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 325 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 321 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 326 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 322 | self.intentEndTimeString = [dateFormatter stringFromDate:detaildate]; | 327 | self.intentEndTimeString = [dateFormatter stringFromDate:detaildate]; |
| 323 | } | 328 | } |
| 324 | - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"intentBeginTime"]) { | 329 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"intentBeginTime"]) { |
| 325 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 330 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 326 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 331 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 327 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 332 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 328 | self.intentBeginTimeString = [dateFormatter stringFromDate:detaildate]; | 333 | self.intentBeginTimeString = [dateFormatter stringFromDate:detaildate]; |
| 329 | } | 334 | } |
| 330 | - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"cancleTime"]) { | 335 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"cancleTime"]) { |
| 331 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 336 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 332 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 337 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 333 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 338 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| @@ -348,33 +353,34 @@ MJCodingImplementation | @@ -348,33 +353,34 @@ MJCodingImplementation | ||
| 348 | } | 353 | } |
| 349 | - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property | 354 | - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property |
| 350 | { | 355 | { |
| 351 | - oldValue = [NSString stringWithFormat:@"%@",oldValue]; | 356 | + BOOL isNULL = [oldValue isKindOfClass:NSNull.class] || oldValue == nil; |
| 357 | + oldValue = [NSString stringWithFormat:@"%@",isNULL?@"":oldValue]; | ||
| 352 | 358 | ||
| 353 | - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"createTime"]) { | 359 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) { |
| 354 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 360 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 355 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 361 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 356 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 362 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 357 | self.createTimeString = [dateFormatter stringFromDate:detaildate]; | 363 | self.createTimeString = [dateFormatter stringFromDate:detaildate]; |
| 358 | } | 364 | } |
| 359 | - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"endTime"]) { | 365 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"endTime"]) { |
| 360 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 366 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 361 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 367 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 362 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 368 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 363 | self.endTimeString = [dateFormatter stringFromDate:detaildate]; | 369 | self.endTimeString = [dateFormatter stringFromDate:detaildate]; |
| 364 | } | 370 | } |
| 365 | - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"startTime"]) { | 371 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"startTime"]) { |
| 366 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 372 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 367 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 373 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 368 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 374 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 369 | self.startTimeString = [dateFormatter stringFromDate:detaildate]; | 375 | self.startTimeString = [dateFormatter stringFromDate:detaildate]; |
| 370 | } | 376 | } |
| 371 | - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"updateTime"]) { | 377 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"updateTime"]) { |
| 372 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 378 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 373 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 379 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 374 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 380 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| 375 | self.updateTimeString = [dateFormatter stringFromDate:detaildate]; | 381 | self.updateTimeString = [dateFormatter stringFromDate:detaildate]; |
| 376 | } | 382 | } |
| 377 | - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"signupEndTime"]) { | 383 | + if ([oldValue isNotBlank] && [property.name isEqualToString:@"signupEndTime"]) { |
| 378 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 384 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 379 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 385 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 380 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; | 386 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; |
| @@ -398,7 +404,9 @@ MJCodingImplementation | @@ -398,7 +404,9 @@ MJCodingImplementation | ||
| 398 | 404 | ||
| 399 | - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property | 405 | - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property |
| 400 | { | 406 | { |
| 401 | - oldValue = [NSString stringWithFormat:@"%@",oldValue]; | 407 | + BOOL isNULL = [oldValue isKindOfClass:NSNull.class] || oldValue == nil; |
| 408 | + oldValue = [NSString stringWithFormat:@"%@",isNULL?@"":oldValue]; | ||
| 409 | + | ||
| 402 | if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) { | 410 | if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) { |
| 403 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; | 411 | NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)]; |
| 404 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | 412 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.h
| @@ -48,6 +48,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -48,6 +48,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 48 | @property (nonatomic, strong) UIButton * delectBtn; | 48 | @property (nonatomic, strong) UIButton * delectBtn; |
| 49 | @property (nonatomic, strong) UILabel * nameLabel; | 49 | @property (nonatomic, strong) UILabel * nameLabel; |
| 50 | @property (nonatomic, strong) UILabel * lineLabel; | 50 | @property (nonatomic, strong) UILabel * lineLabel; |
| 51 | +@property (nonatomic, strong) UILabel * bottemLineLabel; | ||
| 51 | @property (nonatomic, strong) UILabel * sexAgeLabel; | 52 | @property (nonatomic, strong) UILabel * sexAgeLabel; |
| 52 | @property (nonatomic, strong) UILabel * phoneLabel; | 53 | @property (nonatomic, strong) UILabel * phoneLabel; |
| 53 | @property (nonatomic, strong) UIButton * editButton; | 54 | @property (nonatomic, strong) UIButton * editButton; |
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
| @@ -195,6 +195,7 @@ | @@ -195,6 +195,7 @@ | ||
| 195 | [self.mainView addSubview:self.phoneLabel]; | 195 | [self.mainView addSubview:self.phoneLabel]; |
| 196 | [self.mainView addSubview:self.delectBtn]; | 196 | [self.mainView addSubview:self.delectBtn]; |
| 197 | [self.mainView addSubview:self.editButton]; | 197 | [self.mainView addSubview:self.editButton]; |
| 198 | + [self.mainView addSubview:self.bottemLineLabel]; | ||
| 198 | } | 199 | } |
| 199 | return self; | 200 | return self; |
| 200 | } | 201 | } |
| @@ -276,7 +277,7 @@ | @@ -276,7 +277,7 @@ | ||
| 276 | [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) { | 277 | [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 277 | make.centerY.mas_equalTo(weakSelf.nameLabel); | 278 | make.centerY.mas_equalTo(weakSelf.nameLabel); |
| 278 | make.right.mas_equalTo(weakSelf.sexAgeLabel.mas_left).offset(-5); | 279 | make.right.mas_equalTo(weakSelf.sexAgeLabel.mas_left).offset(-5); |
| 279 | - make.height.mas_equalTo(15); | 280 | + make.height.mas_equalTo(10); |
| 280 | make.width.mas_equalTo(0.5); | 281 | make.width.mas_equalTo(0.5); |
| 281 | }]; | 282 | }]; |
| 282 | [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { | 283 | [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| @@ -284,6 +285,12 @@ | @@ -284,6 +285,12 @@ | ||
| 284 | make.left.mas_equalTo(weakSelf.delectBtn.mas_right).offset(10); | 285 | make.left.mas_equalTo(weakSelf.delectBtn.mas_right).offset(10); |
| 285 | make.right.mas_equalTo(weakSelf.lineLabel.mas_left).offset(-5); | 286 | make.right.mas_equalTo(weakSelf.lineLabel.mas_left).offset(-5); |
| 286 | }]; | 287 | }]; |
| 288 | + [self.bottemLineLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 289 | + make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(5); | ||
| 290 | + make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-5); | ||
| 291 | + make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-1); | ||
| 292 | + make.height.mas_equalTo(1); | ||
| 293 | + }]; | ||
| 287 | } | 294 | } |
| 288 | #pragma mark = | 295 | #pragma mark = |
| 289 | -(UIView *)mainView | 296 | -(UIView *)mainView |
| @@ -311,10 +318,18 @@ | @@ -311,10 +318,18 @@ | ||
| 311 | if (!_lineLabel) { | 318 | if (!_lineLabel) { |
| 312 | _lineLabel = [[UILabel alloc] init]; | 319 | _lineLabel = [[UILabel alloc] init]; |
| 313 | _lineLabel.backgroundColor = UIColorHex(#C8C8C8); | 320 | _lineLabel.backgroundColor = UIColorHex(#C8C8C8); |
| 314 | - _lineLabel.hidden = YES; | 321 | + _lineLabel.hidden = NO; |
| 315 | } | 322 | } |
| 316 | return _lineLabel; | 323 | return _lineLabel; |
| 317 | } | 324 | } |
| 325 | +-(UILabel *)bottemLineLabel | ||
| 326 | +{ | ||
| 327 | + if (!_bottemLineLabel) { | ||
| 328 | + _bottemLineLabel = [[UILabel alloc] init]; | ||
| 329 | + _bottemLineLabel.backgroundColor = UIColorHex(#F1F2F6); | ||
| 330 | + } | ||
| 331 | + return _bottemLineLabel; | ||
| 332 | +} | ||
| 318 | -(UILabel *)sexAgeLabel | 333 | -(UILabel *)sexAgeLabel |
| 319 | { | 334 | { |
| 320 | if (!_sexAgeLabel) { | 335 | if (!_sexAgeLabel) { |
| @@ -334,8 +349,8 @@ | @@ -334,8 +349,8 @@ | ||
| 334 | _phoneLabel.textColor = UIColorHex(#8A8A8A); | 349 | _phoneLabel.textColor = UIColorHex(#8A8A8A); |
| 335 | _phoneLabel.lineBreakMode = NSLineBreakByTruncatingTail; | 350 | _phoneLabel.lineBreakMode = NSLineBreakByTruncatingTail; |
| 336 | _phoneLabel.numberOfLines = 1; | 351 | _phoneLabel.numberOfLines = 1; |
| 337 | - _phoneLabel.font = [UIFont systemFontOfSize:11]; | ||
| 338 | - _phoneLabel.font = [UIFont boldSystemFontOfSize:11]; | 352 | + _phoneLabel.font = [UIFont systemFontOfSize:13]; |
| 353 | + _phoneLabel.font = [UIFont boldSystemFontOfSize:13]; | ||
| 339 | } | 354 | } |
| 340 | return _phoneLabel; | 355 | return _phoneLabel; |
| 341 | } | 356 | } |
| @@ -639,12 +654,13 @@ | @@ -639,12 +654,13 @@ | ||
| 639 | [QMUITips showError:@"数字输入错误" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; | 654 | [QMUITips showError:@"数字输入错误" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; |
| 640 | return; | 655 | return; |
| 641 | } | 656 | } |
| 642 | - | 657 | + self.amoutField.text = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; |
| 643 | if ([self.amoutField.text floatValue] >= 999999.99) { | 658 | if ([self.amoutField.text floatValue] >= 999999.99) { |
| 644 | if (![self.amoutField.text isEqualToString:@"1000000.0"] | 659 | if (![self.amoutField.text isEqualToString:@"1000000.0"] |
| 645 | && ![self.amoutField.text isEqualToString:@"1000000"] | 660 | && ![self.amoutField.text isEqualToString:@"1000000"] |
| 646 | && ![self.amoutField.text isEqualToString:@"1000000.00"]) { | 661 | && ![self.amoutField.text isEqualToString:@"1000000.00"]) { |
| 647 | [QMUITips showWithText:@"最高限额1000000元" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; | 662 | [QMUITips showWithText:@"最高限额1000000元" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; |
| 663 | + self.amoutField.text = @"1000000.00"; | ||
| 648 | return; | 664 | return; |
| 649 | } | 665 | } |
| 650 | } | 666 | } |
| @@ -655,7 +671,7 @@ | @@ -655,7 +671,7 @@ | ||
| 655 | __weak typeof(self) weakSelf = self; | 671 | __weak typeof(self) weakSelf = self; |
| 656 | if ([self.createModel.totalFee isNotBlank] | 672 | if ([self.createModel.totalFee isNotBlank] |
| 657 | && [self.createModel.totalFee integerValue] > 0) { | 673 | && [self.createModel.totalFee integerValue] > 0) { |
| 658 | - NSString * p = [NSString stringWithFormat:@"%.0f",([self.amoutField.text floatValue]*100)]; | 674 | + NSString * p = [NSString stringWithFormat:@"%ld",([self.amoutField.text integerValue]*100)]; |
| 659 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { | 675 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { |
| 660 | NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; | 676 | NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; |
| 661 | weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl CompleterBlock:^{ | 677 | weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl CompleterBlock:^{ |
| @@ -663,10 +679,11 @@ | @@ -663,10 +679,11 @@ | ||
| 663 | [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; | 679 | [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; |
| 664 | }]; | 680 | }]; |
| 665 | [[NSNotificationCenter defaultCenter] addObserver:weakSelf selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; | 681 | [[NSNotificationCenter defaultCenter] addObserver:weakSelf selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; |
| 682 | + if (weakSelf.reloadBlock) weakSelf.reloadBlock(); | ||
| 666 | }]; | 683 | }]; |
| 667 | }else{ | 684 | }else{ |
| 668 | [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ | 685 | [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ |
| 669 | - NSString * p = [NSString stringWithFormat:@"%.0f",([weakSelf.amoutField.text floatValue]*100)]; | 686 | + NSString * p = [NSString stringWithFormat:@"%ld",([weakSelf.amoutField.text integerValue]*100)]; |
| 670 | weakSelf.amoutField.enabled = NO; | 687 | weakSelf.amoutField.enabled = NO; |
| 671 | weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); | 688 | weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); |
| 672 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { | 689 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { |
| @@ -676,6 +693,7 @@ | @@ -676,6 +693,7 @@ | ||
| 676 | [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; | 693 | [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; |
| 677 | }]; | 694 | }]; |
| 678 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; | 695 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hiddenModalViewNotification:) name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; |
| 696 | + if (weakSelf.reloadBlock) weakSelf.reloadBlock(); | ||
| 679 | }]; | 697 | }]; |
| 680 | }]; | 698 | }]; |
| 681 | } | 699 | } |
| @@ -690,7 +708,7 @@ | @@ -690,7 +708,7 @@ | ||
| 690 | [QMUITips showError:@"数字输入错误" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; | 708 | [QMUITips showError:@"数字输入错误" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; |
| 691 | return; | 709 | return; |
| 692 | } | 710 | } |
| 693 | - | 711 | + self.amoutField.text = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; |
| 694 | if ([self.amoutField.text floatValue] >= 999999.99) { | 712 | if ([self.amoutField.text floatValue] >= 999999.99) { |
| 695 | if (![self.amoutField.text isEqualToString:@"1000000.0"] | 713 | if (![self.amoutField.text isEqualToString:@"1000000.0"] |
| 696 | && ![self.amoutField.text isEqualToString:@"1000000"] | 714 | && ![self.amoutField.text isEqualToString:@"1000000"] |
| @@ -705,7 +723,7 @@ | @@ -705,7 +723,7 @@ | ||
| 705 | } | 723 | } |
| 706 | __weak typeof(self) weakSelf = self; | 724 | __weak typeof(self) weakSelf = self; |
| 707 | [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ | 725 | [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ |
| 708 | - NSString * p = [NSString stringWithFormat:@"%.0f",([weakSelf.amoutField.text floatValue]*100)]; | 726 | + NSString * p = [NSString stringWithFormat:@"%ld",([self.amoutField.text integerValue]*100)]; |
| 709 | weakSelf.amoutField.enabled = NO; | 727 | weakSelf.amoutField.enabled = NO; |
| 710 | weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); | 728 | weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); |
| 711 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { | 729 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { |
| @@ -729,9 +747,9 @@ | @@ -729,9 +747,9 @@ | ||
| 729 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField | 747 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField |
| 730 | { | 748 | { |
| 731 | if ([textField.text isNotBlank] && textField.text.length > 10) { | 749 | if ([textField.text isNotBlank] && textField.text.length > 10) { |
| 732 | - [QMUITips showWithText:@"最长10位!超出部分会在输入完成时自动删除" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; | 750 | + [QMUITips showWithText:@"最高限额1000000.00元" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; |
| 733 | //如果是表情的话 这里容易截断显示 | 751 | //如果是表情的话 这里容易截断显示 |
| 734 | - textField.text = [textField.text substringToIndex:10]; | 752 | + textField.text = @"1000000.00"; |
| 735 | } | 753 | } |
| 736 | return YES; | 754 | return YES; |
| 737 | } | 755 | } |
| @@ -778,7 +796,6 @@ | @@ -778,7 +796,6 @@ | ||
| 778 | _amoutField.font = [UIFont systemFontOfSize:14.0f]; | 796 | _amoutField.font = [UIFont systemFontOfSize:14.0f]; |
| 779 | _amoutField.textColor = UIColorHex(#333333); | 797 | _amoutField.textColor = UIColorHex(#333333); |
| 780 | _amoutField.clearButtonMode = UITextFieldViewModeWhileEditing; | 798 | _amoutField.clearButtonMode = UITextFieldViewModeWhileEditing; |
| 781 | - _amoutField.clearsOnBeginEditing = YES; | ||
| 782 | _amoutField.keyboardType = UIKeyboardTypeDefault; | 799 | _amoutField.keyboardType = UIKeyboardTypeDefault; |
| 783 | _amoutField.textAlignment = NSTextAlignmentLeft; | 800 | _amoutField.textAlignment = NSTextAlignmentLeft; |
| 784 | _amoutField.keyboardType = UIKeyboardTypeDecimalPad; | 801 | _amoutField.keyboardType = UIKeyboardTypeDecimalPad; |
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSubView.m
| @@ -337,7 +337,6 @@ | @@ -337,7 +337,6 @@ | ||
| 337 | [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) { | 337 | [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 338 | make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-10); | 338 | make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-10); |
| 339 | make.left.mas_equalTo(weakSelf.imgView.mas_right).offset(10); | 339 | make.left.mas_equalTo(weakSelf.imgView.mas_right).offset(10); |
| 340 | - make.right.mas_equalTo(weakSelf.evalButton.mas_right).offset(-10); | ||
| 341 | }]; | 340 | }]; |
| 342 | } | 341 | } |
| 343 | #pragma mark - | 342 | #pragma mark - |
| @@ -630,10 +629,15 @@ | @@ -630,10 +629,15 @@ | ||
| 630 | -(void)setSubDict:(NSDictionary *)subDict | 629 | -(void)setSubDict:(NSDictionary *)subDict |
| 631 | { | 630 | { |
| 632 | _subDict = subDict; | 631 | _subDict = subDict; |
| 633 | - NSMutableAttributedString * nameString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"*%@",[subDict stringValueForKey:@"name" default:@""]]]; | ||
| 634 | - [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#CD0302) range:[nameString.string rangeOfString:@"*"]]; | ||
| 635 | - [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#333333) range:[nameString.string rangeOfString:[subDict stringValueForKey:@"name" default:@""]]]; | ||
| 636 | - self.nameLabel.attributedText = nameString; | 632 | + NSString * name = [subDict stringValueForKey:@"name" default:@""]; |
| 633 | + if (![name isEqualToString:@"问题描述"]) { | ||
| 634 | + NSMutableAttributedString * nameString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"*%@",[subDict stringValueForKey:@"name" default:@""]]]; | ||
| 635 | + [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#CD0302) range:[nameString.string rangeOfString:@"*"]]; | ||
| 636 | + [nameString addAttribute:NSForegroundColorAttributeName value:UIColorHex(#333333) range:[nameString.string rangeOfString:[subDict stringValueForKey:@"name" default:@""]]]; | ||
| 637 | + self.nameLabel.attributedText = nameString; | ||
| 638 | + }else{ | ||
| 639 | + self.nameLabel.text = name; | ||
| 640 | + } | ||
| 637 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*联系电话"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; | 641 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*联系电话"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; |
| 638 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*年龄"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; | 642 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*年龄"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; |
| 639 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*联系方式"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; | 643 | self.contentField.keyboardType = [self.nameLabel.text isEqualToString:@"*联系方式"]?UIKeyboardTypeNumberPad:UIKeyboardTypeDefault; |
| @@ -855,12 +859,12 @@ | @@ -855,12 +859,12 @@ | ||
| 855 | if (!_contentField) { | 859 | if (!_contentField) { |
| 856 | _contentField = [[UITextField alloc] init]; | 860 | _contentField = [[UITextField alloc] init]; |
| 857 | _contentField.backgroundColor = [UIColor whiteColor]; | 861 | _contentField.backgroundColor = [UIColor whiteColor]; |
| 858 | - _contentField.font = [UIFont systemFontOfSize:14.0f]; | 862 | + _contentField.font = [UIFont systemFontOfSize:16.0f]; |
| 859 | _contentField.textColor = UIColorHex(#333333); | 863 | _contentField.textColor = UIColorHex(#333333); |
| 860 | _contentField.clearButtonMode = UITextFieldViewModeWhileEditing; | 864 | _contentField.clearButtonMode = UITextFieldViewModeWhileEditing; |
| 861 | _contentField.textAlignment = NSTextAlignmentRight; | 865 | _contentField.textAlignment = NSTextAlignmentRight; |
| 862 | _contentField.adjustsFontSizeToFitWidth = YES; | 866 | _contentField.adjustsFontSizeToFitWidth = YES; |
| 863 | - _contentField.minimumFontSize = 12; | 867 | + _contentField.minimumFontSize = 13; |
| 864 | _contentField.returnKeyType = UIReturnKeyNext; | 868 | _contentField.returnKeyType = UIReturnKeyNext; |
| 865 | _contentField.hidden = YES; | 869 | _contentField.hidden = YES; |
| 866 | _contentField.delegate = self; | 870 | _contentField.delegate = self; |
| @@ -877,7 +881,7 @@ | @@ -877,7 +881,7 @@ | ||
| 877 | _descTextView.placeholderColor = UIColorHex(#C8C8C8); | 881 | _descTextView.placeholderColor = UIColorHex(#C8C8C8); |
| 878 | _descTextView.placeholder = @"您遇到什么问题,请留言"; | 882 | _descTextView.placeholder = @"您遇到什么问题,请留言"; |
| 879 | _descTextView.textColor = UIColorHex(#333333); | 883 | _descTextView.textColor = UIColorHex(#333333); |
| 880 | - _descTextView.font = [UIFont systemFontOfSize:14.0f]; | 884 | + _descTextView.font = [UIFont systemFontOfSize:16.0f]; |
| 881 | _descTextView.returnKeyType = UIReturnKeyDone; | 885 | _descTextView.returnKeyType = UIReturnKeyDone; |
| 882 | _descTextView.maximumTextLength = 100; | 886 | _descTextView.maximumTextLength = 100; |
| 883 | _descTextView.textContainerInset = UIEdgeInsetsMake(2.5, 2.5, 2.5, 2.5); | 887 | _descTextView.textContainerInset = UIEdgeInsetsMake(2.5, 2.5, 2.5, 2.5); |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntInformViewController.m
| @@ -103,8 +103,8 @@ | @@ -103,8 +103,8 @@ | ||
| 103 | @{@"name":@"联系人",@"placeholder":@"请输入姓名",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, | 103 | @{@"name":@"联系人",@"placeholder":@"请输入姓名",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, |
| 104 | @{@"name":@"联系地址",@"placeholder":@"请输入联系地址",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, | 104 | @{@"name":@"联系地址",@"placeholder":@"请输入联系地址",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, |
| 105 | @{@"name":@"联系电话",@"placeholder":@"请输入联系电话",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, | 105 | @{@"name":@"联系电话",@"placeholder":@"请输入联系电话",@"isClick":@NO,@"isTextField":@YES,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, |
| 106 | - @{@"name":@"报修项目",@"placeholder":@"请输入报修项目",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, | ||
| 107 | - @{@"name":@"上门时间",@"placeholder":@"请输入上门时间",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, | 106 | + @{@"name":@"报修项目",@"placeholder":@"请选择报修项目",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, |
| 107 | + @{@"name":@"上门时间",@"placeholder":@"请选择上门时间",@"isClick":@YES,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@NO,@"isChick":@NO}, | ||
| 108 | @{@"name":@"问题描述",@"placeholder":@"您遇到什么问题,请留言",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@YES,@"isImage":@NO,@"isChick":@NO}, | 108 | @{@"name":@"问题描述",@"placeholder":@"您遇到什么问题,请留言",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@YES,@"isImage":@NO,@"isChick":@NO}, |
| 109 | // @{@"name":@"",@"placeholder":@"",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@YES,@"isChick":@NO}, | 109 | // @{@"name":@"",@"placeholder":@"",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@YES,@"isChick":@NO}, |
| 110 | ]]; | 110 | ]]; |
| @@ -191,8 +191,8 @@ | @@ -191,8 +191,8 @@ | ||
| 191 | NSString * startString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].firstObject; | 191 | NSString * startString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].firstObject; |
| 192 | NSString * endString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].lastObject; | 192 | NSString * endString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].lastObject; |
| 193 | if ([startString isNotBlank] && [endString isNotBlank]) { | 193 | if ([startString isNotBlank] && [endString isNotBlank]) { |
| 194 | - NSString * temp_start_time = [NSString stringWithFormat:@"%@ %@:00:00",dayString,startString]; | ||
| 195 | - NSString * temp_end_time = [NSString stringWithFormat:@"%@ %@:00:00",dayString,endString]; | 194 | + NSString * temp_start_time = [NSString stringWithFormat:@"%@ %@:00",dayString,startString]; |
| 195 | + NSString * temp_end_time = [NSString stringWithFormat:@"%@ %@:00",dayString,endString]; | ||
| 196 | [paramDict addString:[temp_start_time isNotBlank]?temp_start_time:@"" forKey:@"beginTime"]; | 196 | [paramDict addString:[temp_start_time isNotBlank]?temp_start_time:@"" forKey:@"beginTime"]; |
| 197 | [paramDict addString:[temp_end_time isNotBlank]?temp_end_time:@"" forKey:@"endTime"]; | 197 | [paramDict addString:[temp_end_time isNotBlank]?temp_end_time:@"" forKey:@"endTime"]; |
| 198 | }else{ | 198 | }else{ |
| @@ -205,14 +205,15 @@ | @@ -205,14 +205,15 @@ | ||
| 205 | if ([[paramDict allValues] containsObject:@""]) { | 205 | if ([[paramDict allValues] containsObject:@""]) { |
| 206 | NSInteger index = [[paramDict allValues] indexOfObject:@""]; | 206 | NSInteger index = [[paramDict allValues] indexOfObject:@""]; |
| 207 | NSString * key = [[paramDict allKeys] objectAtIndex:index]; | 207 | NSString * key = [[paramDict allKeys] objectAtIndex:index]; |
| 208 | - if ([key isEqualToString:@"userName"]) [QMUITips showWithText:@"联系人不能为空"]; | ||
| 209 | - if ([key isEqualToString:@"address"]) [QMUITips showWithText:@"联系地址不能为空"]; | ||
| 210 | - if ([key isEqualToString:@"phone"]) [QMUITips showWithText:@"联系电话不能为空"]; | ||
| 211 | - if ([key isEqualToString:@"repairProject"]) [QMUITips showWithText:@"报修项目不能为空"]; | ||
| 212 | - if ([key isEqualToString:@"beginTime"]) [QMUITips showWithText:@"请选择上门时间"]; | ||
| 213 | - if ([key isEqualToString:@"endTime"]) [QMUITips showWithText:@"请选择上门时间"]; | ||
| 214 | - if ([key isEqualToString:@"remark"]) [QMUITips showWithText:@"问题描述不能为空"]; | ||
| 215 | - return; | 208 | + if (![key isEqualToString:@"remark"]) { |
| 209 | + if ([key isEqualToString:@"userName"]) [QMUITips showWithText:@"联系人不能为空"]; | ||
| 210 | + if ([key isEqualToString:@"address"]) [QMUITips showWithText:@"联系地址不能为空"]; | ||
| 211 | + if ([key isEqualToString:@"phone"]) [QMUITips showWithText:@"联系电话不能为空"]; | ||
| 212 | + if ([key isEqualToString:@"repairProject"]) [QMUITips showWithText:@"报修项目不能为空"]; | ||
| 213 | + if ([key isEqualToString:@"beginTime"]) [QMUITips showWithText:@"请选择上门时间"]; | ||
| 214 | + if ([key isEqualToString:@"endTime"]) [QMUITips showWithText:@"请选择上门时间"]; | ||
| 215 | + return; | ||
| 216 | + } | ||
| 216 | } | 217 | } |
| 217 | __weak typeof(self) weakSelf = self; | 218 | __weak typeof(self) weakSelf = self; |
| 218 | [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenPushWithParamDict:paramDict nbhdId:self.nbhdId CompleterBlock:^(CNLiveCommuntyActivityMaintainsCreateModel * _Nonnull createModel) { | 219 | [CNLiveCommuntViewModel requestWithCommuntyHomeMaintenPushWithParamDict:paramDict nbhdId:self.nbhdId CompleterBlock:^(CNLiveCommuntyActivityMaintainsCreateModel * _Nonnull createModel) { |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntListViewController.m
| @@ -12,6 +12,7 @@ | @@ -12,6 +12,7 @@ | ||
| 12 | @property (nonatomic, assign) CNLiveCommuntListShowType showType; | 12 | @property (nonatomic, assign) CNLiveCommuntListShowType showType; |
| 13 | @property (nonatomic, strong) CNLiveRefreshFooter * footerView; | 13 | @property (nonatomic, strong) CNLiveRefreshFooter * footerView; |
| 14 | @property (nonatomic, strong) NSMutableArray * dataArray; | 14 | @property (nonatomic, strong) NSMutableArray * dataArray; |
| 15 | +@property (nonatomic, strong) NSIndexPath * selectIndexPath; | ||
| 15 | @property (nonatomic, copy) NSString * nbhdId; | 16 | @property (nonatomic, copy) NSString * nbhdId; |
| 16 | @property (nonatomic, assign) NSInteger index; | 17 | @property (nonatomic, assign) NSInteger index; |
| 17 | @property (nonatomic, assign) NSInteger page; | 18 | @property (nonatomic, assign) NSInteger page; |
| @@ -44,6 +45,7 @@ | @@ -44,6 +45,7 @@ | ||
| 44 | -(void)viewDidAppear:(BOOL)animated | 45 | -(void)viewDidAppear:(BOOL)animated |
| 45 | { | 46 | { |
| 46 | [super viewDidAppear:animated]; | 47 | [super viewDidAppear:animated]; |
| 48 | + self.page = 1; | ||
| 47 | [self loadDataSourceWithPage:1 nbhdId:self.nbhdId index:self.index CompleterBlock:NULL]; | 49 | [self loadDataSourceWithPage:1 nbhdId:self.nbhdId index:self.index CompleterBlock:NULL]; |
| 48 | } | 50 | } |
| 49 | - (void)viewDidLoad { | 51 | - (void)viewDidLoad { |
| @@ -79,6 +81,11 @@ | @@ -79,6 +81,11 @@ | ||
| 79 | [weakSelf.tableView.mj_footer endRefreshing]; | 81 | [weakSelf.tableView.mj_footer endRefreshing]; |
| 80 | if (isLastPage) [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData]; | 82 | if (isLastPage) [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData]; |
| 81 | if (page == 1 && weakSelf.dataArray.count == 0 && weakSelf.tableView.mj_footer) weakSelf.tableView.mj_footer = nil; | 83 | if (page == 1 && weakSelf.dataArray.count == 0 && weakSelf.tableView.mj_footer) weakSelf.tableView.mj_footer = nil; |
| 84 | + if (weakSelf.selectIndexPath) { | ||
| 85 | + BOOL isEnough = weakSelf.dataArray.count <= weakSelf.selectIndexPath.row; | ||
| 86 | + if (!isEnough) weakSelf.selectIndexPath = [NSIndexPath indexPathForRow:0 inSection:0]; | ||
| 87 | + [weakSelf.tableView scrollToRowAtIndexPath:weakSelf.selectIndexPath atScrollPosition:isEnough?UITableViewScrollPositionNone:UITableViewScrollPositionTop animated:NO]; | ||
| 88 | + } | ||
| 82 | }]; | 89 | }]; |
| 83 | } | 90 | } |
| 84 | 91 | ||
| @@ -104,6 +111,10 @@ | @@ -104,6 +111,10 @@ | ||
| 104 | [super layoutTableView]; | 111 | [super layoutTableView]; |
| 105 | 112 | ||
| 106 | } | 113 | } |
| 114 | +-(void)dealloc | ||
| 115 | +{ | ||
| 116 | + self.selectIndexPath = nil; | ||
| 117 | +} | ||
| 107 | #pragma mark - DZNEmptyDataSetSource Methods | 118 | #pragma mark - DZNEmptyDataSetSource Methods |
| 108 | - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView | 119 | - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView |
| 109 | { | 120 | { |
| @@ -208,6 +219,7 @@ | @@ -208,6 +219,7 @@ | ||
| 208 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | 219 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath |
| 209 | { | 220 | { |
| 210 | if (self.showType == CNLiveCommuntListShowTypeRepair) { | 221 | if (self.showType == CNLiveCommuntListShowTypeRepair) { |
| 222 | + self.selectIndexPath = indexPath; | ||
| 211 | CNLiveCommuntyActivityRepairListModel * repairModel = self.dataArray[indexPath.row]; | 223 | CNLiveCommuntyActivityRepairListModel * repairModel = self.dataArray[indexPath.row]; |
| 212 | if (self.index == 3) { | 224 | if (self.index == 3) { |
| 213 | CNLiveCommuntyOrderViewController * orderView = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListCompletOrder MaintenId:repairModel.idStr]; | 225 | CNLiveCommuntyOrderViewController * orderView = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListCompletOrder MaintenId:repairModel.idStr]; |
| @@ -221,10 +233,12 @@ | @@ -221,10 +233,12 @@ | ||
| 221 | } | 233 | } |
| 222 | } | 234 | } |
| 223 | if (self.showType == CNLiveCommuntListShowTypeRecord) { | 235 | if (self.showType == CNLiveCommuntListShowTypeRecord) { |
| 236 | + self.selectIndexPath = indexPath; | ||
| 224 | CNLiveCommuntyActivityRecordListModel * repairModel = self.dataArray[indexPath.row]; | 237 | CNLiveCommuntyActivityRecordListModel * repairModel = self.dataArray[indexPath.row]; |
| 225 | [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:repairModel.handworkId]; | 238 | [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:repairModel.handworkId]; |
| 226 | } | 239 | } |
| 227 | if (self.showType == CNLiveCommuntListShowTypeHome) { | 240 | if (self.showType == CNLiveCommuntListShowTypeHome) { |
| 241 | + self.selectIndexPath = indexPath; | ||
| 228 | CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row]; | 242 | CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row]; |
| 229 | [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:listModel.idStr]; | 243 | [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:listModel.idStr]; |
| 230 | } | 244 | } |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
| @@ -27,7 +27,18 @@ | @@ -27,7 +27,18 @@ | ||
| 27 | } | 27 | } |
| 28 | return self; | 28 | return self; |
| 29 | } | 29 | } |
| 30 | - | 30 | +//-(void)viewDidAppear:(BOOL)animated |
| 31 | +//{ | ||
| 32 | +// [super viewDidAppear:animated]; | ||
| 33 | +// __weak typeof(self) weakSelf = self; | ||
| 34 | +// [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO isNew:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { | ||
| 35 | +// for (NSDictionary * userDict in userArray) { | ||
| 36 | +//// [weakSelf.userArray addObjectsFromArray:userArray]; | ||
| 37 | +//// [weakSelf.tableView reloadData]; | ||
| 38 | +//// [weakSelf setupWithBottemView:weakSelf.userArray.count]; | ||
| 39 | +// } | ||
| 40 | +// }]; | ||
| 41 | +//} | ||
| 31 | - (void)viewDidLoad { | 42 | - (void)viewDidLoad { |
| 32 | [super viewDidLoad]; | 43 | [super viewDidLoad]; |
| 33 | // Do any additional setup after loading the view. | 44 | // Do any additional setup after loading the view. |
| @@ -45,8 +56,23 @@ | @@ -45,8 +56,23 @@ | ||
| 45 | [[weakSelf displayViewController] dsPopViewControllerAnimated:YES]; | 56 | [[weakSelf displayViewController] dsPopViewControllerAnimated:YES]; |
| 46 | } | 57 | } |
| 47 | }]; | 58 | }]; |
| 59 | + | ||
| 60 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleChangeAction:) name:kCNLiveCommuntySaveChangeUserInfoNotification object:nil]; | ||
| 48 | 61 | ||
| 49 | } | 62 | } |
| 63 | +-(void)handleChangeAction:(NSNotification *)note | ||
| 64 | +{ | ||
| 65 | + NSDictionary * paramDict = (NSDictionary *)note.object; | ||
| 66 | + NSString * idStr = [paramDict stringValueForKey:@"id" default:@""]; | ||
| 67 | + for (NSDictionary * subDict in self.userArray) { | ||
| 68 | + NSString * idStr_temp = [subDict stringValueForKey:@"id" default:@""]; | ||
| 69 | + if ([idStr_temp isEqualToString:idStr]) { | ||
| 70 | + [self.userArray replaceObjectAtIndex:[self.userArray indexOfObject:subDict] withObject:paramDict]; | ||
| 71 | + [self.tableView reloadData]; | ||
| 72 | + return; | ||
| 73 | + } | ||
| 74 | + } | ||
| 75 | +} | ||
| 50 | -(void)addTopNavigationWithView | 76 | -(void)addTopNavigationWithView |
| 51 | { | 77 | { |
| 52 | if ([self.detailModel.mobile isNotBlank]) { | 78 | if ([self.detailModel.mobile isNotBlank]) { |
| @@ -74,14 +100,17 @@ | @@ -74,14 +100,17 @@ | ||
| 74 | -(void)addUserAction:(UIButton *)button | 100 | -(void)addUserAction:(UIButton *)button |
| 75 | { | 101 | { |
| 76 | __weak typeof(self) weakSelf = self; | 102 | __weak typeof(self) weakSelf = self; |
| 77 | - CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped selectArray:self.userArray CompleterBlock:^(NSArray * _Nonnull userArray) { | ||
| 78 | -// [weakSelf.userArray removeAllObjects]; | ||
| 79 | -// [weakSelf.userArray addObjectsFromArray:userArray]; | 103 | + NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:self.userArray]; |
| 104 | + CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped selectArray:tempArray CompleterBlock:^(NSArray * _Nonnull userArray) { | ||
| 105 | + [weakSelf.userArray removeAllObjects]; | ||
| 106 | + [weakSelf.userArray addObjectsFromArray:userArray]; | ||
| 107 | + weakSelf.userArray = [[[weakSelf.userArray reverseObjectEnumerator] allObjects] mutableCopy]; | ||
| 80 | [weakSelf.tableView reloadData]; | 108 | [weakSelf.tableView reloadData]; |
| 81 | [weakSelf setupWithBottemView:weakSelf.userArray.count]; | 109 | [weakSelf setupWithBottemView:weakSelf.userArray.count]; |
| 82 | }]; | 110 | }]; |
| 83 | [self.navigationController pushViewController:userVC animated:YES]; | 111 | [self.navigationController pushViewController:userVC animated:YES]; |
| 84 | } | 112 | } |
| 113 | + | ||
| 85 | - (void)initTableView | 114 | - (void)initTableView |
| 86 | { | 115 | { |
| 87 | [super initTableView]; | 116 | [super initTableView]; |
| @@ -95,6 +124,7 @@ | @@ -95,6 +124,7 @@ | ||
| 95 | } | 124 | } |
| 96 | -(void)dealloc | 125 | -(void)dealloc |
| 97 | { | 126 | { |
| 127 | + [[NSNotificationCenter defaultCenter] removeObserver:self name:kCNLiveCommuntySaveChangeUserInfoNotification object:nil]; | ||
| 98 | [[NSNotificationCenter defaultCenter] removeObserver:self name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil]; | 128 | [[NSNotificationCenter defaultCenter] removeObserver:self name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil]; |
| 99 | } | 129 | } |
| 100 | -(void)layoutTableView | 130 | -(void)layoutTableView |
| @@ -236,6 +266,7 @@ | @@ -236,6 +266,7 @@ | ||
| 236 | if (indexPath.section == 0) { | 266 | if (indexPath.section == 0) { |
| 237 | CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:@[] isAddUser:NO UserDict:self.userArray[indexPath.row]]; | 267 | CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:@[] isAddUser:NO UserDict:self.userArray[indexPath.row]]; |
| 238 | userView.delegate = self; | 268 | userView.delegate = self; |
| 269 | + userView.bottemLineLabel.hidden = (indexPath.row == self.userArray.count - 1); | ||
| 239 | return userView; | 270 | return userView; |
| 240 | }else{ | 271 | }else{ |
| 241 | __weak typeof(self) weakSelf = self; | 272 | __weak typeof(self) weakSelf = self; |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntViewController.m
| @@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
| 42 | // Do any additional setup after loading the view. | 42 | // Do any additional setup after loading the view. |
| 43 | self.selectColor = [UIColor colorWithHexString:@"0xCD0302"]; | 43 | self.selectColor = [UIColor colorWithHexString:@"0xCD0302"]; |
| 44 | self.normalColor = [UIColor colorWithHexString:@"0x979797"]; | 44 | self.normalColor = [UIColor colorWithHexString:@"0x979797"]; |
| 45 | - | 45 | + self.hidesBottomBarWhenPushed = YES; |
| 46 | self.tabBar.backgroundColor = UIColorHex(#f9f9f9); | 46 | self.tabBar.backgroundColor = UIColorHex(#f9f9f9); |
| 47 | 47 | ||
| 48 | __weak typeof(self) weakSelf = self; | 48 | __weak typeof(self) weakSelf = self; |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
| @@ -79,6 +79,7 @@ | @@ -79,6 +79,7 @@ | ||
| 79 | if (createModel) { | 79 | if (createModel) { |
| 80 | weakSelf.createMdoel = createModel; | 80 | weakSelf.createMdoel = createModel; |
| 81 | if (weakSelf.isChat) weakSelf.showType = weakSelf.createMdoel.showType; | 81 | if (weakSelf.isChat) weakSelf.showType = weakSelf.createMdoel.showType; |
| 82 | + if ([weakSelf.createMdoel.repairId isNotBlank] && ![weakSelf.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) weakSelf.showType = CNLiveCommuntyOrderShowTypeChatYetOrder; | ||
| 82 | [weakSelf setupWithBottemView]; | 83 | [weakSelf setupWithBottemView]; |
| 83 | [weakSelf setupWithNaviView]; | 84 | [weakSelf setupWithNaviView]; |
| 84 | [weakSelf.tableView reloadData]; | 85 | [weakSelf.tableView reloadData]; |
| @@ -89,8 +90,7 @@ | @@ -89,8 +90,7 @@ | ||
| 89 | -(void)setupWithNaviView | 90 | -(void)setupWithNaviView |
| 90 | { | 91 | { |
| 91 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder | 92 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder |
| 92 | - || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder | ||
| 93 | - || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | 93 | + || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) { |
| 94 | NSString * name = @""; | 94 | NSString * name = @""; |
| 95 | UIColor * titleColor = [UIColor whiteColor]; | 95 | UIColor * titleColor = [UIColor whiteColor]; |
| 96 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder | 96 | if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder |
| @@ -98,11 +98,21 @@ | @@ -98,11 +98,21 @@ | ||
| 98 | name = @"咨询电话"; | 98 | name = @"咨询电话"; |
| 99 | titleColor = UIColorHex(#0091FF); | 99 | titleColor = UIColorHex(#0091FF); |
| 100 | } | 100 | } |
| 101 | - if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder | 101 | + if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder |
| 102 | && [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | 102 | && [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { |
| 103 | name = @"取消订单"; | 103 | name = @"取消订单"; |
| 104 | titleColor = UIColorHex(#F5A623FF); | 104 | titleColor = UIColorHex(#F5A623FF); |
| 105 | } | 105 | } |
| 106 | + if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder | ||
| 107 | + && [self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | ||
| 108 | + name = @"取消订单"; | ||
| 109 | + titleColor = UIColorHex(#F5A623FF); | ||
| 110 | + } | ||
| 111 | + if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder | ||
| 112 | + && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | ||
| 113 | + return; | ||
| 114 | + } | ||
| 115 | + if ([self.createMdoel.totalFee isNotBlank] && [self.createMdoel.totalFee integerValue] > 0) return; | ||
| 106 | UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 116 | UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 107 | submiteBtn.frame = CGRectMake(0, 0, 50, 14); | 117 | submiteBtn.frame = CGRectMake(0, 0, 50, 14); |
| 108 | [submiteBtn setTitle:name forState:UIControlStateNormal]; | 118 | [submiteBtn setTitle:name forState:UIControlStateNormal]; |
| @@ -157,9 +167,17 @@ | @@ -157,9 +167,17 @@ | ||
| 157 | make.height.mas_equalTo(36); | 167 | make.height.mas_equalTo(36); |
| 158 | }]; | 168 | }]; |
| 159 | } | 169 | } |
| 170 | + if ([self.createMdoel.repairId isNotBlank] && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { | ||
| 171 | + payString = @"已接单"; | ||
| 172 | + self.payButton.backgroundColor = UIColorHex(#D7D7D7); | ||
| 173 | + self.payButton.userInteractionEnabled = NO; | ||
| 174 | + }else{ | ||
| 175 | + self.payButton.userInteractionEnabled = YES; | ||
| 176 | + } | ||
| 160 | [self.payButton setTitle:payString forState:UIControlStateNormal]; | 177 | [self.payButton setTitle:payString forState:UIControlStateNormal]; |
| 161 | [self.payButton setTitle:payString forState:UIControlStateHighlighted]; | 178 | [self.payButton setTitle:payString forState:UIControlStateHighlighted]; |
| 162 | 179 | ||
| 180 | + | ||
| 163 | if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder && [self.createMdoel.totalFee isNotBlank] && [self.createMdoel.totalFee integerValue] > 0) { | 181 | if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder && [self.createMdoel.totalFee isNotBlank] && [self.createMdoel.totalFee integerValue] > 0) { |
| 164 | self.payButton.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder; | 182 | self.payButton.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder; |
| 165 | self.bottemView.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder; | 183 | self.bottemView.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder; |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserEditViewController.m
| @@ -96,7 +96,15 @@ | @@ -96,7 +96,15 @@ | ||
| 96 | NSMutableDictionary * paramDict = [[NSMutableDictionary alloc] initWithDictionary:self.userDict]; | 96 | NSMutableDictionary * paramDict = [[NSMutableDictionary alloc] initWithDictionary:self.userDict]; |
| 97 | for (int i = 0; i < self.dataSource.count; i ++) { | 97 | for (int i = 0; i < self.dataSource.count; i ++) { |
| 98 | CNLiveCommuntSubInputTableView * userCell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]]; | 98 | CNLiveCommuntSubInputTableView * userCell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]]; |
| 99 | - if (i == 0) [paramDict addString:[userCell.contentField.text isNotBlank]?userCell.contentField.text:@"" forKey:@"name"]; | 99 | + if (i == 0) { |
| 100 | + NSString * name = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; | ||
| 101 | + if ([name isNotBlank]) { | ||
| 102 | + [paramDict addString:name forKey:@"name"]; | ||
| 103 | + }else{ | ||
| 104 | + [QMUITips showWithText:@"联系人不能为空"]; | ||
| 105 | + return; | ||
| 106 | + } | ||
| 107 | + } | ||
| 100 | if (i == 1) [paramDict addString:[userCell.sex isEqualToString:@"女"]?@"0":@"1" forKey:@"gender"]; | 108 | if (i == 1) [paramDict addString:[userCell.sex isEqualToString:@"女"]?@"0":@"1" forKey:@"gender"]; |
| 101 | if (i == 2) { | 109 | if (i == 2) { |
| 102 | NSString * age = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; | 110 | NSString * age = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; |
| @@ -128,6 +136,7 @@ | @@ -128,6 +136,7 @@ | ||
| 128 | 136 | ||
| 129 | __weak typeof(self) weakSelf = self; | 137 | __weak typeof(self) weakSelf = self; |
| 130 | [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES isNew:self.userDict.allKeys.count == 0 CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { | 138 | [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES isNew:self.userDict.allKeys.count == 0 CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { |
| 139 | + [[NSNotificationCenter defaultCenter] postNotificationName:kCNLiveCommuntySaveChangeUserInfoNotification object:paramDict]; | ||
| 131 | [weakSelf.navigationController popViewControllerAnimated:YES]; | 140 | [weakSelf.navigationController popViewControllerAnimated:YES]; |
| 132 | }]; | 141 | }]; |
| 133 | } | 142 | } |
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyUserListViewController.m
| @@ -24,7 +24,6 @@ | @@ -24,7 +24,6 @@ | ||
| 24 | [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO isNew:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { | 24 | [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO isNew:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { |
| 25 | weakSelf.userArray = [[NSMutableArray alloc] initWithArray:userArray]; | 25 | weakSelf.userArray = [[NSMutableArray alloc] initWithArray:userArray]; |
| 26 | [weakSelf.tableView reloadData]; | 26 | [weakSelf.tableView reloadData]; |
| 27 | - | ||
| 28 | [weakSelf setupWithBottemView:weakSelf.selectArray.count > 0]; | 27 | [weakSelf setupWithBottemView:weakSelf.selectArray.count > 0]; |
| 29 | }]; | 28 | }]; |
| 30 | } | 29 | } |
| @@ -55,6 +54,7 @@ | @@ -55,6 +54,7 @@ | ||
| 55 | [submiteBtn addTarget:self action:@selector(rightBarButtonAction:) forControlEvents:UIControlEventTouchUpInside]; | 54 | [submiteBtn addTarget:self action:@selector(rightBarButtonAction:) forControlEvents:UIControlEventTouchUpInside]; |
| 56 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:submiteBtn]; | 55 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:submiteBtn]; |
| 57 | } | 56 | } |
| 57 | + | ||
| 58 | -(void)rightBarButtonAction:(UIButton *)button | 58 | -(void)rightBarButtonAction:(UIButton *)button |
| 59 | { | 59 | { |
| 60 | CNLiveCommuntyUserEditViewController * editVC = [[CNLiveCommuntyUserEditViewController alloc] initWithUser:@{}]; | 60 | CNLiveCommuntyUserEditViewController * editVC = [[CNLiveCommuntyUserEditViewController alloc] initWithUser:@{}]; |
| @@ -186,6 +186,7 @@ | @@ -186,6 +186,7 @@ | ||
| 186 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | 186 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
| 187 | { | 187 | { |
| 188 | CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:self.selectArray isAddUser:YES UserDict:self.userArray[indexPath.row]]; | 188 | CNLiveCommuntSignUpUserViewCell * userView = [CNLiveCommuntSignUpUserViewCell setTableView:tableView selectArray:self.selectArray isAddUser:YES UserDict:self.userArray[indexPath.row]]; |
| 189 | + userView.bottemLineLabel.hidden = (indexPath.row == self.userArray.count - 1); | ||
| 189 | userView.delegate = self; | 190 | userView.delegate = self; |
| 190 | return userView; | 191 | return userView; |
| 191 | } | 192 | } |
CNLiveCommuntyModule/Classes/ViewModel/CNLiveCommuntViewModel.m
| @@ -254,10 +254,10 @@ | @@ -254,10 +254,10 @@ | ||
| 254 | NSMutableArray * tArray = [[NSMutableArray alloc] init]; | 254 | NSMutableArray * tArray = [[NSMutableArray alloc] init]; |
| 255 | NSInteger start = i == 0 ? (components_h.hour-(components_h.hour%2)) : 0; | 255 | NSInteger start = i == 0 ? (components_h.hour-(components_h.hour%2)) : 0; |
| 256 | for (int i = 0; i < 12; i++) { | 256 | for (int i = 0; i < 12; i++) { |
| 257 | - [tArray addObject:[NSString stringWithFormat:@"%02ld~%02ld",start,start+2]]; | 257 | + [tArray addObject:[NSString stringWithFormat:@"%02ld:00~%02ld:00",start,start+2]]; |
| 258 | start += 2; | 258 | start += 2; |
| 259 | } | 259 | } |
| 260 | - if (i == 0) [tArray removeObjectsInRange:NSMakeRange([tArray indexOfObject:@"22~24"]+1, tArray.count - [tArray indexOfObject:@"22~24"] - 1)]; | 260 | + if (i == 0) [tArray removeObjectsInRange:NSMakeRange([tArray indexOfObject:@"22:00~24:00"]+1, tArray.count - [tArray indexOfObject:@"22:00~24:00"] - 1)]; |
| 261 | 261 | ||
| 262 | NSTimeInterval secondsPerDay = i * 24*60*60; | 262 | NSTimeInterval secondsPerDay = i * 24*60*60; |
| 263 | NSDate *curDate = [NSDate dateWithTimeInterval:secondsPerDay sinceDate:[NSDate date]]; | 263 | NSDate *curDate = [NSDate dateWithTimeInterval:secondsPerDay sinceDate:[NSDate date]]; |
| @@ -377,7 +377,7 @@ | @@ -377,7 +377,7 @@ | ||
| 377 | [CNLiveNetworking setupShowDataResult:NO]; | 377 | [CNLiveNetworking setupShowDataResult:NO]; |
| 378 | [CNLiveNetworking setupShowResult:YES]; | 378 | [CNLiveNetworking setupShowResult:YES]; |
| 379 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntPayMentTotalFeeOrderContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | 379 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntPayMentTotalFeeOrderContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { |
| 380 | - [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view.viewController.view]; | 380 | + [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view]; |
| 381 | [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) { | 381 | [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) { |
| 382 | if (responseObject) { | 382 | if (responseObject) { |
| 383 | NSString * timestamp = [CNLiveCommuntViewModel getNowTimestamp]; | 383 | NSString * timestamp = [CNLiveCommuntViewModel getNowTimestamp]; |
| @@ -437,11 +437,37 @@ | @@ -437,11 +437,37 @@ | ||
| 437 | /// @param completerBlock 返回结果 | 437 | /// @param completerBlock 返回结果 |
| 438 | +(void)requestWithCommuntySaveInfoUsersMentUserDict:(NSDictionary *)userDict isSave:(BOOL)isSave isNew:(BOOL)isNew CompleterBlock:(void(^)(NSArray * userArray, BOOL isSave))completerBlock | 438 | +(void)requestWithCommuntySaveInfoUsersMentUserDict:(NSDictionary *)userDict isSave:(BOOL)isSave isNew:(BOOL)isNew CompleterBlock:(void(^)(NSArray * userArray, BOOL isSave))completerBlock |
| 439 | { | 439 | { |
| 440 | - NSString * cacheKey = [NSString stringWithFormat:@"%@/kCNLiveCommuntySaveInfoUsersMentKey04",[CNUserInfoManager manager].userInfoModel.uid]; | 440 | + NSString * cacheKey = [NSString stringWithFormat:@"%@/kCNLiveCommuntySaveInfoUsersMentKey06",[CNUserInfoManager manager].userInfoModel.uid]; |
| 441 | if (isSave) { | 441 | if (isSave) { |
| 442 | if ([userDict allKeys].count > 0 && [userDict allValues].count > 0) { | 442 | if ([userDict allKeys].count > 0 && [userDict allValues].count > 0) { |
| 443 | NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]]; | 443 | NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]]; |
| 444 | NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:[save_string mj_JSONObject]]; | 444 | NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:[save_string mj_JSONObject]]; |
| 445 | + if (![userDict containsObjectForKey:@"id"] && isNew) { | ||
| 446 | + NSString *timeSp = [NSString stringWithFormat:@"%ld",(long)[[NSDate date] timeIntervalSince1970]]; | ||
| 447 | + NSMutableDictionary * tempDict = [[NSMutableDictionary alloc] initWithDictionary:userDict]; | ||
| 448 | + [tempDict addString:timeSp forKey:@"id"]; | ||
| 449 | + [tempArray addObject:tempDict]; | ||
| 450 | + NSString * user_info = [tempArray mj_JSONString]; | ||
| 451 | + [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey]; | ||
| 452 | + if (completerBlock) completerBlock(@[],isSave); | ||
| 453 | + }else{ | ||
| 454 | + NSString * idStr = [userDict stringValueForKey:@"id" default:@""]; | ||
| 455 | + NSMutableArray * tempArray01 = [[NSMutableArray alloc] initWithArray:tempArray]; | ||
| 456 | + for (NSDictionary * subDict in tempArray) { | ||
| 457 | + NSString * idStr_temp = [subDict stringValueForKey:@"id" default:@""]; | ||
| 458 | + if ([idStr isEqualToString:idStr_temp]) { | ||
| 459 | + [tempArray01 replaceObjectAtIndex:[tempArray indexOfObject:subDict] withObject:userDict]; | ||
| 460 | + break; | ||
| 461 | + } | ||
| 462 | + } | ||
| 463 | + tempArray = tempArray01; | ||
| 464 | + NSString * user_info = [tempArray mj_JSONString]; | ||
| 465 | + [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey]; | ||
| 466 | + if (completerBlock) completerBlock(@[],isSave); | ||
| 467 | + } | ||
| 468 | + | ||
| 469 | + | ||
| 470 | + /* | ||
| 445 | if (!isNew) { | 471 | if (!isNew) { |
| 446 | BOOL isReplace = YES; | 472 | BOOL isReplace = YES; |
| 447 | NSString * i_nameString = [userDict stringValueForKey:@"name" default:@""]; | 473 | NSString * i_nameString = [userDict stringValueForKey:@"name" default:@""]; |
| @@ -472,9 +498,8 @@ | @@ -472,9 +498,8 @@ | ||
| 472 | } | 498 | } |
| 473 | if (!isEqual_dict) [tempArray addObject:userDict]; | 499 | if (!isEqual_dict) [tempArray addObject:userDict]; |
| 474 | } | 500 | } |
| 475 | - NSString * user_info = [tempArray mj_JSONString]; | ||
| 476 | - [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey]; | ||
| 477 | - if (completerBlock) completerBlock(@[],isSave); | 501 | + */ |
| 502 | + | ||
| 478 | } | 503 | } |
| 479 | }else{ | 504 | }else{ |
| 480 | NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]]; | 505 | NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]]; |
Example/CNLiveCommuntyModule.xcodeproj/project.pbxproj
| @@ -25,6 +25,7 @@ | @@ -25,6 +25,7 @@ | ||
| 25 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; | 25 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; |
| 26 | 791464F727C4843600D58C68 /* CNLIVEMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 791464F427C4843600D58C68 /* CNLIVEMainViewController.m */; }; | 26 | 791464F727C4843600D58C68 /* CNLIVEMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 791464F427C4843600D58C68 /* CNLIVEMainViewController.m */; }; |
| 27 | 791464F827C4843600D58C68 /* CNLiveCommunitModuleImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 791464F627C4843600D58C68 /* CNLiveCommunitModuleImpl.m */; }; | 27 | 791464F827C4843600D58C68 /* CNLiveCommunitModuleImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 791464F627C4843600D58C68 /* CNLiveCommunitModuleImpl.m */; }; |
| 28 | + 7947273527D0693B002BE846 /* CNLIVETabberViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7947273427D0693B002BE846 /* CNLIVETabberViewController.m */; }; | ||
| 28 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; | 29 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; |
| 29 | /* End PBXBuildFile section */ | 30 | /* End PBXBuildFile section */ |
| 30 | 31 | ||
| @@ -67,6 +68,8 @@ | @@ -67,6 +68,8 @@ | ||
| 67 | 791464F427C4843600D58C68 /* CNLIVEMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLIVEMainViewController.m; sourceTree = "<group>"; }; | 68 | 791464F427C4843600D58C68 /* CNLIVEMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLIVEMainViewController.m; sourceTree = "<group>"; }; |
| 68 | 791464F527C4843600D58C68 /* CNLiveCommunitModuleImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveCommunitModuleImpl.h; sourceTree = "<group>"; }; | 69 | 791464F527C4843600D58C68 /* CNLiveCommunitModuleImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveCommunitModuleImpl.h; sourceTree = "<group>"; }; |
| 69 | 791464F627C4843600D58C68 /* CNLiveCommunitModuleImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveCommunitModuleImpl.m; sourceTree = "<group>"; }; | 70 | 791464F627C4843600D58C68 /* CNLiveCommunitModuleImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveCommunitModuleImpl.m; sourceTree = "<group>"; }; |
| 71 | + 7947273327D0693B002BE846 /* CNLIVETabberViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVETabberViewController.h; sourceTree = "<group>"; }; | ||
| 72 | + 7947273427D0693B002BE846 /* CNLIVETabberViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVETabberViewController.m; sourceTree = "<group>"; }; | ||
| 70 | 79EA711F7A32917A3445172F /* Pods_CNLiveCommuntyModule_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveCommuntyModule_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | 73 | 79EA711F7A32917A3445172F /* Pods_CNLiveCommuntyModule_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveCommuntyModule_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 71 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; | 74 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; |
| 72 | A3F1027952916F49DBC7AEB2 /* Pods-CNLiveCommuntyModule_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveCommuntyModule_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveCommuntyModule_Tests/Pods-CNLiveCommuntyModule_Tests.release.xcconfig"; sourceTree = "<group>"; }; | 75 | A3F1027952916F49DBC7AEB2 /* Pods-CNLiveCommuntyModule_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveCommuntyModule_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveCommuntyModule_Tests/Pods-CNLiveCommuntyModule_Tests.release.xcconfig"; sourceTree = "<group>"; }; |
| @@ -154,6 +157,8 @@ | @@ -154,6 +157,8 @@ | ||
| 154 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, | 157 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, |
| 155 | 6003F5A5195388D20070C39A /* CNLIVEViewController.h */, | 158 | 6003F5A5195388D20070C39A /* CNLIVEViewController.h */, |
| 156 | 6003F5A6195388D20070C39A /* CNLIVEViewController.m */, | 159 | 6003F5A6195388D20070C39A /* CNLIVEViewController.m */, |
| 160 | + 7947273327D0693B002BE846 /* CNLIVETabberViewController.h */, | ||
| 161 | + 7947273427D0693B002BE846 /* CNLIVETabberViewController.m */, | ||
| 157 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, | 162 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, |
| 158 | 6003F5A8195388D20070C39A /* Images.xcassets */, | 163 | 6003F5A8195388D20070C39A /* Images.xcassets */, |
| 159 | 791464F527C4843600D58C68 /* CNLiveCommunitModuleImpl.h */, | 164 | 791464F527C4843600D58C68 /* CNLiveCommunitModuleImpl.h */, |
| @@ -479,6 +484,7 @@ | @@ -479,6 +484,7 @@ | ||
| 479 | 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */, | 484 | 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */, |
| 480 | 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */, | 485 | 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */, |
| 481 | 791464F727C4843600D58C68 /* CNLIVEMainViewController.m in Sources */, | 486 | 791464F727C4843600D58C68 /* CNLIVEMainViewController.m in Sources */, |
| 487 | + 7947273527D0693B002BE846 /* CNLIVETabberViewController.m in Sources */, | ||
| 482 | 6003F59A195388D20070C39A /* main.m in Sources */, | 488 | 6003F59A195388D20070C39A /* main.m in Sources */, |
| 483 | 791464F827C4843600D58C68 /* CNLiveCommunitModuleImpl.m in Sources */, | 489 | 791464F827C4843600D58C68 /* CNLiveCommunitModuleImpl.m in Sources */, |
| 484 | ); | 490 | ); |
Example/CNLiveCommuntyModule/CNLIVEAppDelegate.m
| @@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
| 14 | #import "CNLIVEViewController.h" | 14 | #import "CNLIVEViewController.h" |
| 15 | #import <IQKeyboardManager/IQKeyboardManager.h> | 15 | #import <IQKeyboardManager/IQKeyboardManager.h> |
| 16 | #import "CNLiveCommuntViewController.h" | 16 | #import "CNLiveCommuntViewController.h" |
| 17 | +#import "CNLIVETabberViewController.h" | ||
| 17 | @implementation CNLIVEAppDelegate | 18 | @implementation CNLIVEAppDelegate |
| 18 | 19 | ||
| 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | 20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
| @@ -23,13 +24,13 @@ | @@ -23,13 +24,13 @@ | ||
| 23 | [IQKeyboardManager sharedManager].enable = YES; | 24 | [IQKeyboardManager sharedManager].enable = YES; |
| 24 | [IQKeyboardManager sharedManager].enableAutoToolbar = YES; | 25 | [IQKeyboardManager sharedManager].enableAutoToolbar = YES; |
| 25 | 26 | ||
| 26 | - [CNUserInfoManager manager].userInfoModel.uid = @"10458139";//@"145680";//@"395098";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10537318";//@"10499533";//@"11973842" | 27 | + [CNUserInfoManager manager].userInfoModel.uid = @"10458139";//@"145680";//@"395098";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10537318";//@"10499533";//@"11973842";//@"1342671" |
| 27 | 28 | ||
| 28 | // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; | 29 | // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; |
| 29 | // [[NSUserDefaults standardUserDefaults] synchronize]; | 30 | // [[NSUserDefaults standardUserDefaults] synchronize]; |
| 30 | 31 | ||
| 31 | [self setParamNet]; | 32 | [self setParamNet]; |
| 32 | - UINavigationController *navCtrl = [[QMUINavigationController alloc] initWithRootViewController:[[CNLIVEViewController alloc] init]]; | 33 | + UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[[CNLIVETabberViewController alloc] init]]; |
| 33 | 34 | ||
| 34 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | 35 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; |
| 35 | self.window.rootViewController = navCtrl; | 36 | self.window.rootViewController = navCtrl; |
Example/CNLiveCommuntyModule/CNLIVETabberViewController.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLIVETabberViewController.h | ||
| 3 | +// CNLiveCommuntyModule_Example | ||
| 4 | +// | ||
| 5 | +// Created by open on 2022/3/3. | ||
| 6 | +// Copyright © 2022 woshiliushiyu. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@interface CNLIVETabberViewController : UITabBarController | ||
| 14 | + | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +NS_ASSUME_NONNULL_END |
Example/CNLiveCommuntyModule/CNLIVETabberViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLIVETabberViewController.m | ||
| 3 | +// CNLiveCommuntyModule_Example | ||
| 4 | +// | ||
| 5 | +// Created by open on 2022/3/3. | ||
| 6 | +// Copyright © 2022 woshiliushiyu. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLIVETabberViewController.h" | ||
| 10 | +#import "CNLIVEViewController.h" | ||
| 11 | +@interface CNLIVETabberViewController () | ||
| 12 | + | ||
| 13 | +@end | ||
| 14 | + | ||
| 15 | +@implementation CNLIVETabberViewController | ||
| 16 | + | ||
| 17 | +- (void)viewWillAppear:(BOOL)animated{ | ||
| 18 | + [super viewWillAppear:animated]; | ||
| 19 | + [self.navigationController.navigationBar setHidden:YES]; | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +- (void)viewDidLoad { | ||
| 23 | + [super viewDidLoad]; | ||
| 24 | + // Do any additional setup after loading the view. | ||
| 25 | + [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第一个"]; | ||
| 26 | + [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第二个"]; | ||
| 27 | + [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第三个"]; | ||
| 28 | +} | ||
| 29 | +-(void)addChildVC:(UIViewController *)VC withTitle:(NSString *)title{ | ||
| 30 | + | ||
| 31 | + VC.title = title; | ||
| 32 | + UINavigationController *mainVC = [[UINavigationController alloc]initWithRootViewController:VC]; | ||
| 33 | + | ||
| 34 | + [self addChildViewController:mainVC]; | ||
| 35 | + | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +@end |
Example/CNLiveCommuntyModule/CNLiveCommuntyModule-Info.plist
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <key>CFBundleDevelopmentRegion</key> | 5 | <key>CFBundleDevelopmentRegion</key> |
| 6 | <string>en</string> | 6 | <string>en</string> |
| 7 | <key>CFBundleDisplayName</key> | 7 | <key>CFBundleDisplayName</key> |
| 8 | - <string>${PRODUCT_NAME}</string> | 8 | + <string>社区</string> |
| 9 | <key>CFBundleExecutable</key> | 9 | <key>CFBundleExecutable</key> |
| 10 | <string>${EXECUTABLE_NAME}</string> | 10 | <string>${EXECUTABLE_NAME}</string> |
| 11 | <key>CFBundleIdentifier</key> | 11 | <key>CFBundleIdentifier</key> |
| @@ -24,6 +24,35 @@ | @@ -24,6 +24,35 @@ | ||
| 24 | <string>1.0</string> | 24 | <string>1.0</string> |
| 25 | <key>LSRequiresIPhoneOS</key> | 25 | <key>LSRequiresIPhoneOS</key> |
| 26 | <true/> | 26 | <true/> |
| 27 | + <key>NSAppTransportSecurity</key> | ||
| 28 | + <dict> | ||
| 29 | + <key>NSAllowsArbitraryLoads</key> | ||
| 30 | + <true/> | ||
| 31 | + </dict> | ||
| 32 | + <key>NSBluetoothAlwaysUsageDescription</key> | ||
| 33 | + <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string> | ||
| 34 | + <key>NSBluetoothPeripheralUsageDescription</key> | ||
| 35 | + <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string> | ||
| 36 | + <key>NSCalendarsUsageDescription</key> | ||
| 37 | + <string>需要允许访问日历才能使用服务号功能</string> | ||
| 38 | + <key>NSCameraUsageDescription</key> | ||
| 39 | + <string>需要允许开启相机才能在发布生活圈或聊天时使用录制视频和拍照功能</string> | ||
| 40 | + <key>NSContactsUsageDescription</key> | ||
| 41 | + <string>需要允许访问通讯录才能获取手机联系人中的网家家用户</string> | ||
| 42 | + <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> | ||
| 43 | + <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string> | ||
| 44 | + <key>NSLocationAlwaysUsageDescription</key> | ||
| 45 | + <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string> | ||
| 46 | + <key>NSLocationWhenInUseUsageDescription</key> | ||
| 47 | + <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string> | ||
| 48 | + <key>NSMicrophoneUsageDescription</key> | ||
| 49 | + <string>需要允许开启麦克风才能使用录制视频和语音等服务</string> | ||
| 50 | + <key>NSMotionUsageDescription</key> | ||
| 51 | + <string>需要允许访问运动与健身才能在亲情群健康步数、走路活动或者参加线上跑步赛事时记录您的步数信息</string> | ||
| 52 | + <key>NSPhotoLibraryAddUsageDescription</key> | ||
| 53 | + <string>需要允许打开相册才能访问相册照片和保存照片</string> | ||
| 54 | + <key>NSPhotoLibraryUsageDescription</key> | ||
| 55 | + <string>需要允许打开相册才能访问相册照片和保存照片</string> | ||
| 27 | <key>UILaunchStoryboardName</key> | 56 | <key>UILaunchStoryboardName</key> |
| 28 | <string>LaunchScreen</string> | 57 | <string>LaunchScreen</string> |
| 29 | <key>UIMainStoryboardFile</key> | 58 | <key>UIMainStoryboardFile</key> |
| @@ -32,35 +61,6 @@ | @@ -32,35 +61,6 @@ | ||
| 32 | <array> | 61 | <array> |
| 33 | <string>armv7</string> | 62 | <string>armv7</string> |
| 34 | </array> | 63 | </array> |
| 35 | - <key>NSAppTransportSecurity</key> | ||
| 36 | - <dict> | ||
| 37 | - <key>NSAllowsArbitraryLoads</key> | ||
| 38 | - <true/> | ||
| 39 | - </dict> | ||
| 40 | - <key>NSBluetoothAlwaysUsageDescription</key> | ||
| 41 | - <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string> | ||
| 42 | - <key>NSBluetoothPeripheralUsageDescription</key> | ||
| 43 | - <string>需要允许开启蓝牙才能对音箱使用配对及配网功能</string> | ||
| 44 | - <key>NSCalendarsUsageDescription</key> | ||
| 45 | - <string>需要允许访问日历才能使用服务号功能</string> | ||
| 46 | - <key>NSCameraUsageDescription</key> | ||
| 47 | - <string>需要允许开启相机才能在发布生活圈或聊天时使用录制视频和拍照功能</string> | ||
| 48 | - <key>NSContactsUsageDescription</key> | ||
| 49 | - <string>需要允许访问通讯录才能获取手机联系人中的网家家用户</string> | ||
| 50 | - <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> | ||
| 51 | - <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string> | ||
| 52 | - <key>NSLocationAlwaysUsageDescription</key> | ||
| 53 | - <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string> | ||
| 54 | - <key>NSLocationWhenInUseUsageDescription</key> | ||
| 55 | - <string>需要允许使用您的位置信息才能在发布生活圈、发布目击者、聊天发送位置、线上徒步赛事等功能获取您所在的城市</string> | ||
| 56 | - <key>NSMicrophoneUsageDescription</key> | ||
| 57 | - <string>需要允许开启麦克风才能使用录制视频和语音等服务</string> | ||
| 58 | - <key>NSMotionUsageDescription</key> | ||
| 59 | - <string>需要允许访问运动与健身才能在亲情群健康步数、走路活动或者参加线上跑步赛事时记录您的步数信息</string> | ||
| 60 | - <key>NSPhotoLibraryAddUsageDescription</key> | ||
| 61 | - <string>需要允许打开相册才能访问相册照片和保存照片</string> | ||
| 62 | - <key>NSPhotoLibraryUsageDescription</key> | ||
| 63 | - <string>需要允许打开相册才能访问相册照片和保存照片</string> | ||
| 64 | <key>UISupportedInterfaceOrientations</key> | 64 | <key>UISupportedInterfaceOrientations</key> |
| 65 | <array> | 65 | <array> |
| 66 | <string>UIInterfaceOrientationPortrait</string> | 66 | <string>UIInterfaceOrientationPortrait</string> |