Commit f0d40db2cadcbec70854cd4f7dac97bfd6eb69cb

Authored by liushiyu
1 parent 9b21aec0

0.0.2

Showing 25 changed files with 676 additions and 224 deletions
CNLiveCommunitModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveCommunitModule' 10 s.name = 'CNLiveCommunitModule'
11 - s.version = '0.0.1' 11 + s.version = '0.0.2'
12 s.summary = 'A short description of CNLiveCommunitModule.' 12 s.summary = 'A short description of CNLiveCommunitModule.'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
@@ -30,24 +30,24 @@ TODO: Add long description of the pod here. @@ -30,24 +30,24 @@ TODO: Add long description of the pod here.
30 30
31 s.ios.deployment_target = '10.0' 31 s.ios.deployment_target = '10.0'
32 32
33 -# s.source_files = 'CNLiveCommunitModule/Classes/ViewController/*.{h,m}' 33 + s.source_files = 'CNLiveCommunitModule/Classes/**/*.{h,m}'
34 s.static_framework = true 34 s.static_framework = true
35 35
36 - s.subspec 'ViewController' do |ss|  
37 - ss.source_files = 'CNLiveCommunitModule/Classes/ViewController/*.{h,m}'  
38 - end  
39 - s.subspec 'ViewModel' do |ss|  
40 - ss.source_files = 'CNLiveCommunitModule/Classes/ViewModel/*.{h,m}'  
41 - end  
42 - s.subspec 'Core' do |ss|  
43 - ss.source_files = 'CNLiveCommunitModule/Classes/Core/*.{h,m}'  
44 - end  
45 - s.subspec 'View' do |ss|  
46 - ss.source_files = 'CNLiveCommunitModule/Classes/View/*.{h,m}'  
47 - end  
48 - s.subspec 'Model' do |ss|  
49 - ss.source_files = 'CNLiveCommunitModule/Classes/Model/*.{h,m}'  
50 - end 36 +# s.subspec 'ViewController' do |ss|
  37 +# ss.source_files = 'CNLiveCommunitModule/Classes/ViewController/*.{h,m}'
  38 +# end
  39 +# s.subspec 'ViewModel' do |ss|
  40 +# ss.source_files = 'CNLiveCommunitModule/Classes/ViewModel/*.{h,m}'
  41 +# end
  42 +# s.subspec 'Core' do |ss|
  43 +# ss.source_files = 'CNLiveCommunitModule/Classes/Core/*.{h,m}'
  44 +# end
  45 +# s.subspec 'View' do |ss|
  46 +# ss.source_files = 'CNLiveCommunitModule/Classes/View/*.{h,m}'
  47 +# end
  48 +# s.subspec 'Model' do |ss|
  49 +# ss.source_files = 'CNLiveCommunitModule/Classes/Model/*.{h,m}'
  50 +# end
51 51
52 s.resource_bundles = { 52 s.resource_bundles = {
53 'CNLiveCommunitModule' => ['CNLiveCommunitModule/Assets/*.bundle'] 53 'CNLiveCommunitModule' => ['CNLiveCommunitModule/Assets/*.bundle']
CNLiveCommunitModule/Classes/Core/CNLiveCommunitModuleProtocol.h
@@ -15,6 +15,10 @@ NS_ASSUME_NONNULL_BEGIN @@ -15,6 +15,10 @@ NS_ASSUME_NONNULL_BEGIN
15 /// @param webUrl url 15 /// @param webUrl url
16 -(UIViewController *)pushWebViewWithMainProjectWithWebUrl:(NSString *)webUrl; 16 -(UIViewController *)pushWebViewWithMainProjectWithWebUrl:(NSString *)webUrl;
17 17
  18 +/// 用主工程的webView打开
  19 +/// @param webUrl url
  20 +-(void)pushWebViewWithMainProjectWithParamDict:(NSDictionary *)paramDict;
  21 +
18 /// 调用工程中支付功能 22 /// 调用工程中支付功能
19 /// @param orderId 订单id 23 /// @param orderId 订单id
20 /// @param price 价格 24 /// @param price 价格
CNLiveCommunitModule/Classes/Core/CNLiveCommuntyModule.h
@@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
9 #import "CNLiveCommunitModuleProtocol.h" 9 #import "CNLiveCommunitModuleProtocol.h"
10 NS_ASSUME_NONNULL_BEGIN 10 NS_ASSUME_NONNULL_BEGIN
11 11
  12 +static NSString *const kCNLiveHiddenModalViewWithQrNotification = @"kCNLiveHiddenModalViewWithQrNotification";
  13 +
12 @interface CNLiveCommuntyModule : NSObject 14 @interface CNLiveCommuntyModule : NSObject
13 15
14 @property (nonatomic, strong) id<CNLiveCommunitModuleProtocol> protocol; 16 @property (nonatomic, strong) id<CNLiveCommunitModuleProtocol> protocol;
@@ -22,6 +24,21 @@ NS_ASSUME_NONNULL_BEGIN @@ -22,6 +24,21 @@ NS_ASSUME_NONNULL_BEGIN
22 /// @param paramDict 支付参数 24 /// @param paramDict 支付参数
23 -(void)pushCommuntyPayResultWithParamDict:(NSDictionary *)paramDict; 25 -(void)pushCommuntyPayResultWithParamDict:(NSDictionary *)paramDict;
24 26
  27 +/// 跳转到报名界面
  28 +/// @param activityId 支付参数
  29 +-(void)pushCommuntySignUpWithActivityId:(NSString *)activityId;
  30 +
  31 +/// 跳转到活动记录界面
  32 +/// @param nbhdId 小区id
  33 +-(void)pushCommuntyRecordListWithNBhdId:(NSString *)nbhdId;
  34 +
  35 +/// 跳转到报修详情界面
  36 +/// @param maintenId 报修id
  37 +-(void)pushCommuntyRepairDetailWithMaintenId:(NSString *)maintenId;
  38 +
  39 +/// 跳转到报修编辑界面
  40 +/// @param nbhdId 小区id
  41 +-(void)pushCommuntyRepairEditWithNBhdId:(NSString *)nbhdId;
25 @end 42 @end
26 43
27 NS_ASSUME_NONNULL_END 44 NS_ASSUME_NONNULL_END
CNLiveCommunitModule/Classes/Core/CNLiveCommuntyModule.m
@@ -6,7 +6,12 @@ @@ -6,7 +6,12 @@
6 // 6 //
7 7
8 #import "CNLiveCommuntyModule.h" 8 #import "CNLiveCommuntyModule.h"
9 - 9 +#import "CNLiveCommuntyHomeModel.h"
  10 +#import "CNLiveCommuntActiviRecordViewController.h"
  11 +#import "CNLiveCommuntyResultViewController.h"
  12 +#import "CNLiveCommuntSignUpViewController.h"
  13 +#import "CNLiveCommuntInformViewController.h"
  14 +#import "CNLiveCommuntyOrderViewController.h"
10 @implementation CNLiveCommuntyModule 15 @implementation CNLiveCommuntyModule
11 16
12 +(instancetype)shareInstance 17 +(instancetype)shareInstance
@@ -44,6 +49,50 @@ @@ -44,6 +49,50 @@
44 /// @param paramDict 支付参数 49 /// @param paramDict 支付参数
45 -(void)pushCommuntyPayResultWithParamDict:(NSDictionary *)paramDict 50 -(void)pushCommuntyPayResultWithParamDict:(NSDictionary *)paramDict
46 { 51 {
47 - 52 + //(0支付失败,1支付成功报名失败,2报名成功)
  53 + NSString * type = [paramDict stringValueForKey:@"text" default:@""];
  54 + NSString * orderId = [paramDict stringValueForKey:@"orderId" default:@""];
  55 + NSString * classId = [paramDict stringValueForKey:@"classId" default:@""];
  56 + if ([type isEqualToString:@"0"]) {
  57 + CNLiveCommuntyResultViewController * successVC = [[CNLiveCommuntyResultViewController alloc] initWithActivityId:@"" OrderId:@"" Msg:@""];
  58 + [[self displayViewController] dsPushViewController:successVC animated:YES];
  59 + }else if ([type isEqualToString:@"1"]) {
  60 + CNLiveCommuntyResultViewController * successVC = [[CNLiveCommuntyResultViewController alloc] initWithActivityId:@"" OrderId:@"" Msg:@"剩余名额不足,退款将原路退回"];
  61 + [[self displayViewController] dsPushViewController:successVC animated:YES];
  62 + }else{
  63 + CNLiveCommuntyResultViewController * successVC = [[CNLiveCommuntyResultViewController alloc] initWithActivityId:classId OrderId:orderId Msg:@""];
  64 + [[self displayViewController] dsPushViewController:successVC animated:YES];
  65 + }
  66 +}
  67 +
  68 +/// 跳转到报名界面
  69 +/// @param activityId 支付参数
  70 +-(void)pushCommuntySignUpWithActivityId:(NSString *)activityId
  71 +{
  72 + CNLiveCommuntSignUpViewController * signUpVC = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:activityId];
  73 + [[self displayViewController] dsPushViewController:signUpVC animated:YES];
  74 +}
  75 +
  76 +/// 跳转到活动记录界面
  77 +/// @param nbhdId 小区id
  78 +-(void)pushCommuntyRecordListWithNBhdId:(NSString *)nbhdId
  79 +{
  80 + CNLiveCommuntActiviRecordViewController * recordVC = [[CNLiveCommuntActiviRecordViewController alloc] initWithNBhdId:nbhdId];
  81 + [[self displayViewController] dsPushViewController:recordVC animated:YES];
  82 +}
  83 +/// 跳转到报修详情界面界面
  84 +/// @param maintenId 报修id
  85 +-(void)pushCommuntyRepairDetailWithMaintenId:(NSString *)maintenId
  86 +{
  87 + CNLiveCommuntyOrderViewController * orderVC = [[CNLiveCommuntyOrderViewController alloc] initWithMaintenId:maintenId];
  88 + [[self displayViewController] dsPushViewController:orderVC animated:YES];
  89 +}
  90 +
  91 +/// 跳转到报修编辑界面
  92 +/// @param nbhdId 小区id
  93 +-(void)pushCommuntyRepairEditWithNBhdId:(NSString *)nbhdId
  94 +{
  95 + CNLiveCommuntInformViewController * informView = [[CNLiveCommuntInformViewController alloc] initWithNBhdId:nbhdId];
  96 + [[self displayViewController] dsPushViewController:informView animated:YES];
48 } 97 }
49 @end 98 @end
CNLiveCommunitModule/Classes/Model/CNLiveCommuntyHomeModel.h
@@ -65,6 +65,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -65,6 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
65 @interface CNLiveCommuntyActivityRecordListModel : NSObject 65 @interface CNLiveCommuntyActivityRecordListModel : NSObject
66 @property (nonatomic, copy) NSString *name; 66 @property (nonatomic, copy) NSString *name;
67 @property (nonatomic, copy) NSString *handworkId; 67 @property (nonatomic, copy) NSString *handworkId;
  68 +/**0未退费 1申请退费 2退费中 3退费成功 4退费失败*/
68 @property (nonatomic, copy) NSString *refundStatus; 69 @property (nonatomic, copy) NSString *refundStatus;
69 @property (nonatomic, copy) NSString *refundApplyTime; 70 @property (nonatomic, copy) NSString *refundApplyTime;
70 @property (nonatomic, copy) NSString *mobile; 71 @property (nonatomic, copy) NSString *mobile;
@@ -74,7 +75,10 @@ NS_ASSUME_NONNULL_BEGIN @@ -74,7 +75,10 @@ NS_ASSUME_NONNULL_BEGIN
74 @property (nonatomic, copy) NSString *gender; 75 @property (nonatomic, copy) NSString *gender;
75 @property (nonatomic, copy) NSString *amount; 76 @property (nonatomic, copy) NSString *amount;
76 @property (nonatomic, copy) NSString *age; 77 @property (nonatomic, copy) NSString *age;
  78 +/**0未缴费 1已缴费*/
77 @property (nonatomic, copy) NSString *paymentStatus; 79 @property (nonatomic, copy) NSString *paymentStatus;
  80 +/**自己定义 0未开始 1进行中 2已结束 3待评价 4退款*/
  81 +@property (nonatomic, copy) NSString *status;
78 @property (nonatomic, copy) NSString *createUser; 82 @property (nonatomic, copy) NSString *createUser;
79 @property (nonatomic, copy) NSString *handworkName; 83 @property (nonatomic, copy) NSString *handworkName;
80 @property (nonatomic, copy) NSString *refundAmount; 84 @property (nonatomic, copy) NSString *refundAmount;
@@ -207,19 +211,61 @@ NS_ASSUME_NONNULL_BEGIN @@ -207,19 +211,61 @@ NS_ASSUME_NONNULL_BEGIN
207 @end 211 @end
208 212
209 @interface CNLiveCommuntyActivitySignUpModel : NSObject 213 @interface CNLiveCommuntyActivitySignUpModel : NSObject
210 -@property (nonatomic, copy) NSString *status;  
211 -@property (nonatomic, copy) NSString *refundableBalance; 214 +@property (nonatomic, copy) NSString * type;
  215 +@property (nonatomic, copy) NSString * orderId;
  216 +@property (nonatomic, copy) NSString * signsString;
  217 +@property (nonatomic, strong) NSArray * signs;
  218 +@end
  219 +
  220 +
  221 +@interface CNLiveCommuntyActivityUserDetailModel : NSObject
  222 +@property (nonatomic, copy) NSString *gender;
  223 +@property (nonatomic, copy) NSString *age;
  224 +@property (nonatomic, copy) NSString *name;
  225 +@property (nonatomic, copy) NSString *mobile;
  226 +@end
  227 +
  228 +@interface CNLiveCommuntyActivityResultDetailModel : NSObject
  229 +@property (nonatomic, copy) NSString *craftId;
  230 +@property (nonatomic, strong) NSArray<CNLiveCommuntyActivityUserDetailModel *> *signupVoList;
  231 +@property (nonatomic, strong) NSMutableArray *dataArray;
  232 +@property (nonatomic, copy) NSString *neighborhoodId;
  233 +@property (nonatomic, copy) NSString *summaryPic;
212 @property (nonatomic, copy) NSString *idStr; 234 @property (nonatomic, copy) NSString *idStr;
213 -@property (nonatomic, copy) NSString *transId;  
214 -@property (nonatomic, strong) NSNumber *updateTime;  
215 -@property (nonatomic, copy) NSString *updateTimeString;  
216 -@property (nonatomic, copy) NSString *totalFee; 235 +@property (nonatomic, copy) NSString *processDesc;
  236 +@property (nonatomic, copy) NSString *unitPrice;
  237 +@property (nonatomic, copy) NSString *publicityPic;
  238 +@property (nonatomic, copy) NSString *duration;
  239 +@property (nonatomic, copy) NSString *name;
  240 +@property (nonatomic, copy) NSString *mobile;
  241 +@property (nonatomic, copy) NSString *desc;
  242 +@property (nonatomic, copy) NSString *oid;
  243 +@property (nonatomic, copy) NSString *craftName;
217 @property (nonatomic, copy) NSString *updatorId; 244 @property (nonatomic, copy) NSString *updatorId;
218 -@property (nonatomic, copy) NSString *type;  
219 -@property (nonatomic, copy) NSString *payType; 245 +@property (nonatomic, copy) NSString *feedbackList;
  246 +@property (nonatomic, copy) NSString *creatorId;
  247 +@property (nonatomic, copy) NSString *signupNum;
  248 +@property (nonatomic, copy) NSString *summary;
  249 +@property (nonatomic, copy) NSString *status;
  250 +@property (nonatomic, copy) NSString *location;
  251 +@property (nonatomic, copy) NSString *organizer;
  252 +@property (nonatomic, copy) NSString *personLimit;
  253 +
  254 +@property (nonatomic, strong) NSNumber *signupEndTime;
  255 +@property (nonatomic, strong) NSNumber *signupStartTime;
  256 +@property (nonatomic, strong) NSNumber *endTime;
  257 +@property (nonatomic, strong) NSNumber *startTime;
220 @property (nonatomic, strong) NSNumber *createTime; 258 @property (nonatomic, strong) NSNumber *createTime;
  259 +@property (nonatomic, strong) NSNumber *updateTime;
  260 +
  261 +@property (nonatomic, copy) NSString *signupEndTimeString;
  262 +@property (nonatomic, copy) NSString *signupStartTimeString;
  263 +@property (nonatomic, copy) NSString *endTimeString;
  264 +@property (nonatomic, copy) NSString *startTimeString;
221 @property (nonatomic, copy) NSString *createTimeString; 265 @property (nonatomic, copy) NSString *createTimeString;
  266 +@property (nonatomic, copy) NSString *updateTimeString;
222 @end 267 @end
223 268
224 269
  270 +
225 NS_ASSUME_NONNULL_END 271 NS_ASSUME_NONNULL_END
CNLiveCommunitModule/Classes/Model/CNLiveCommuntyHomeModel.m
@@ -355,28 +355,149 @@ MJCodingImplementation @@ -355,28 +355,149 @@ MJCodingImplementation
355 @implementation CNLiveCommuntyActivitySignUpModel 355 @implementation CNLiveCommuntyActivitySignUpModel
356 MJCodingImplementation 356 MJCodingImplementation
357 357
  358 +- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
  359 +{
  360 + if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"signs"]) {
  361 + __block NSArray * array = (NSArray *)oldValue;
  362 + __block NSMutableString * signsMString = [[NSMutableString alloc] init];
  363 + [array enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  364 + [signsMString appendFormat:@"%@",obj];
  365 + if (array.count != idx + 1) [signsMString appendString:@","];
  366 + }];
  367 + [signsMString substringToIndex:signsMString.length - 1];
  368 + self.signsString = signsMString;
  369 + }
  370 + return oldValue;
  371 +}
  372 +
  373 +@end
  374 +
  375 +@implementation CNLiveCommuntyActivityUserDetailModel
  376 +
  377 +MJCodingImplementation
  378 +
  379 +@end
  380 +
  381 +@implementation CNLiveCommuntyActivityResultDetailModel
  382 +
  383 +MJCodingImplementation
358 + (NSDictionary *)mj_replacedKeyFromPropertyName 384 + (NSDictionary *)mj_replacedKeyFromPropertyName
359 { 385 {
360 - return @{@"idStr":@"id"}; 386 + return @{@"idStr":@"id",@"desc":@"description"};
361 } 387 }
362 -- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property 388 ++ (NSDictionary *)mj_objectClassInArray
363 { 389 {
364 - oldValue = [NSString stringWithFormat:@"%@",oldValue]; 390 + return @{@"signupVoList":@"CNLiveCommuntyActivityUserDetailModel"};
  391 +}
  392 +- (void)mj_didConvertToObjectWithKeyValues:(NSDictionary *)keyValues
  393 +{
  394 + self.dataArray = [[NSMutableArray alloc] init];
  395 + NSMutableArray * tempArray = [[NSMutableArray alloc] init];
  396 + [keyValues enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) {
  397 + key = [NSString stringWithFormat:@"%@",key];
  398 + obj = [NSString stringWithFormat:@"%@",obj];
  399 + NSMutableDictionary * tempDict = [[NSMutableDictionary alloc] init];
  400 + if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"location"]) {
  401 + [tempDict addString:@"地 点" forKey:@"key"];
  402 + [tempDict addString:obj forKey:@"value"];
  403 + [tempArray addObject:tempDict];
  404 + }
  405 + if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"startTime"]) {
  406 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([obj doubleValue]/1000)];
  407 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  408 + [dateFormatter setDateFormat:@"yyyy年MM月dd日 HH:mm"];
  409 + [tempDict addString:@"时 间" forKey:@"key"];
  410 + [tempDict addString:[dateFormatter stringFromDate:detaildate] forKey:@"value"];
  411 + [tempArray addObject:tempDict];
  412 + }
  413 + if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"personLimit"]) {
  414 + [tempDict addString:@"人 数" forKey:@"key"];
  415 + [tempDict addString:obj forKey:@"value"];
  416 + [tempArray addObject:tempDict];
  417 + }
  418 + if (![obj isKindOfClass:NSNull.class] && [obj isNotBlank] && [key isEqualToString:@"duration"]) {
  419 + [tempDict addString:@"活动时长" forKey:@"key"];
  420 + [tempDict addString:[NSString stringWithFormat:@"%@小时左右",obj] forKey:@"value"];
  421 + [tempArray addObject:tempDict];
  422 + }
  423 + }];
365 424
366 - if (![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"createTime"]) {  
367 - NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];  
368 - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];  
369 - [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];  
370 - self.createTimeString = [dateFormatter stringFromDate:detaildate]; 425 + NSMutableArray * tempArray01 = [[NSMutableArray alloc] init];
  426 + NSArray * voList = [keyValues arrayForKey:@"signupVoList"];
  427 + for (NSDictionary * dict in voList) {
  428 +
  429 + NSMutableDictionary * tempDict01 = [[NSMutableDictionary alloc] init];
  430 + NSString * age = [NSString stringWithFormat:@"%@",dict[@"age"]];
  431 + [tempDict01 addString:@"年 龄" forKey:@"key"];
  432 + [tempDict01 addString:age forKey:@"value"];
  433 + [tempArray01 addObject:tempDict01];
  434 +
  435 + NSMutableDictionary * tempDict02 = [[NSMutableDictionary alloc] init];
  436 + NSString * name = [NSString stringWithFormat:@"%@",dict[@"name"]];
  437 + [tempDict02 addString:@"姓 名" forKey:@"key"];
  438 + [tempDict02 addString:name forKey:@"value"];
  439 + [tempArray01 addObject:tempDict02];
  440 +
  441 + NSMutableDictionary * tempDict03 = [[NSMutableDictionary alloc] init];
  442 + NSString * gender = [NSString stringWithFormat:@"%@",[dict[@"gender"] boolValue]?@"男":@"女"];
  443 + [tempDict03 addString:@"性 别" forKey:@"key"];
  444 + [tempDict03 addString:gender forKey:@"value"];
  445 + [tempArray01 addObject:tempDict03];
  446 +
  447 + NSMutableDictionary * tempDict04 = [[NSMutableDictionary alloc] init];
  448 + NSString * mobile = [NSString stringWithFormat:@"%@",dict[@"mobile"]];
  449 + [tempDict04 addString:@"联系方式" forKey:@"key"];
  450 + [tempDict04 addString:mobile forKey:@"value"];
  451 + [tempArray01 addObject:tempDict04];
371 } 452 }
372 - if (![oldValue isEqualToString:@"<null>"] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"updateTime"]) {  
373 - NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];  
374 - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];  
375 - [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];  
376 - self.updateTimeString = [dateFormatter stringFromDate:detaildate]; 453 + [self.dataArray addObject:tempArray01];
  454 + [self.dataArray addObject:tempArray];
  455 +}
  456 +- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
  457 +{
  458 + if (![property.name isEqualToString:@"signupVoList"]) {
  459 +
  460 + oldValue = [NSString stringWithFormat:@"%@",oldValue];
  461 + if ([oldValue isEqualToString:@"<null>"] || [oldValue isEqualToString:@"(null)"]) oldValue = @"";
  462 +
  463 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"signupEndTime"]) {
  464 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  465 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  466 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  467 + self.signupEndTimeString = [dateFormatter stringFromDate:detaildate];
  468 + }
  469 + if ([oldValue isNotBlank] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"signupStartTime"]) {
  470 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  471 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  472 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  473 + self.signupStartTimeString = [dateFormatter stringFromDate:detaildate];
  474 + }
  475 + if ([oldValue isNotBlank] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"endTime"]) {
  476 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  477 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  478 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  479 + self.endTimeString = [dateFormatter stringFromDate:detaildate];
  480 + }
  481 + if ([oldValue isNotBlank] && ![oldValue isKindOfClass:NSNull.class] && [property.name isEqualToString:@"startTime"]) {
  482 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  483 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  484 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  485 + self.startTimeString = [dateFormatter stringFromDate:detaildate];
  486 + }
  487 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"createTime"]) {
  488 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  489 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  490 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  491 + self.createTimeString = [dateFormatter stringFromDate:detaildate];
  492 + }
  493 + if ([oldValue isNotBlank] && [property.name isEqualToString:@"updateTime"]) {
  494 + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  495 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  496 + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
  497 + self.updateTimeString = [dateFormatter stringFromDate:detaildate];
  498 + }
377 } 499 }
  500 +
378 return oldValue; 501 return oldValue;
379 } 502 }
380 -  
381 -  
382 @end 503 @end
CNLiveCommunitModule/Classes/View/CNLiveCommuntSignUpView.h
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
17 17
18 /// 显示收款弹框 18 /// 显示收款弹框
19 /// @param price 价格 19 /// @param price 价格
20 -+(void)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl; 20 ++(QMUIModalPresentationViewController *)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl;
21 21
22 /// 显示双选项弹框 22 /// 显示双选项弹框
23 /// @param completerBlock 确认回调 23 /// @param completerBlock 确认回调
@@ -80,7 +80,6 @@ NS_ASSUME_NONNULL_BEGIN @@ -80,7 +80,6 @@ NS_ASSUME_NONNULL_BEGIN
80 @property (nonatomic, strong) UILabel * nameLabel; 80 @property (nonatomic, strong) UILabel * nameLabel;
81 @property (nonatomic, strong) UILabel * cententLabel; 81 @property (nonatomic, strong) UILabel * cententLabel;
82 82
83 -  
84 @property (nonatomic, strong) NSDictionary * paramDict; 83 @property (nonatomic, strong) NSDictionary * paramDict;
85 84
86 +(CNLiveCommuntSignUpOrderViewCell *)setTableView:(UITableView *)tableView Dict:(NSDictionary *)dict; 85 +(CNLiveCommuntSignUpOrderViewCell *)setTableView:(UITableView *)tableView Dict:(NSDictionary *)dict;
@@ -93,6 +92,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -93,6 +92,7 @@ NS_ASSUME_NONNULL_BEGIN
93 @property (nonatomic, strong) UIButton * qrButton; 92 @property (nonatomic, strong) UIButton * qrButton;
94 @property (nonatomic, strong) UIButton * payButton; 93 @property (nonatomic, strong) UIButton * payButton;
95 94
  95 +@property (nonatomic, strong) QMUIModalPresentationViewController * modalView;
96 @property (nonatomic, strong) CNLiveCommuntyActivityMaintainsCreateModel * createModel; 96 @property (nonatomic, strong) CNLiveCommuntyActivityMaintainsCreateModel * createModel;
97 @property (nonatomic, copy) void(^reloadBlock)(void); 97 @property (nonatomic, copy) void(^reloadBlock)(void);
98 98
CNLiveCommunitModule/Classes/View/CNLiveCommuntSignUpView.m
@@ -72,7 +72,7 @@ @@ -72,7 +72,7 @@
72 72
73 /// 显示收款弹框 73 /// 显示收款弹框
74 /// @param price 价格 74 /// @param price 价格
75 -+(void)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl 75 ++(QMUIModalPresentationViewController *)showQrTipSuccessViewWithPrice:(NSString *)price PayUrl:(NSString *)payUrl
76 { 76 {
77 UIView * tipView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth - 60, 300)]; 77 UIView * tipView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth - 60, 300)];
78 tipView.backgroundColor = [UIColor whiteColor]; 78 tipView.backgroundColor = [UIColor whiteColor];
@@ -107,6 +107,7 @@ @@ -107,6 +107,7 @@
107 modalViewController.contentView = tipView; 107 modalViewController.contentView = tipView;
108 [modalViewController showWithAnimated:YES completion:nil]; 108 [modalViewController showWithAnimated:YES completion:nil];
109 109
  110 + return modalViewController;
110 // __weak typeof(modalViewController) weakModalViewController = modalViewController; 111 // __weak typeof(modalViewController) weakModalViewController = modalViewController;
111 // [payButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) { 112 // [payButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) {
112 // [weakModalViewController hideWithAnimated:YES completion:NULL]; 113 // [weakModalViewController hideWithAnimated:YES completion:NULL];
@@ -551,9 +552,18 @@ @@ -551,9 +552,18 @@
551 [self.mainView addSubview:self.amoutField]; 552 [self.mainView addSubview:self.amoutField];
552 [self.mainView addSubview:self.qrButton]; 553 [self.mainView addSubview:self.qrButton];
553 [self.mainView addSubview:self.payButton]; 554 [self.mainView addSubview:self.payButton];
  555 +
  556 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hiddenModalViewNotification:) name:kCNLiveHiddenModalViewWithQrNotification object:nil];
554 } 557 }
555 return self; 558 return self;
556 } 559 }
  560 +-(void)hiddenModalViewNotification:(NSNotification *)note
  561 +{
  562 + __weak typeof(self) weakSelf = self;
  563 + [self.modalView hideWithAnimated:YES completion:^(BOOL finished) {
  564 + if (finished && weakSelf.reloadBlock) weakSelf.reloadBlock();
  565 + }];
  566 +}
557 -(void)setCreateModel:(CNLiveCommuntyActivityMaintainsCreateModel *)createModel 567 -(void)setCreateModel:(CNLiveCommuntyActivityMaintainsCreateModel *)createModel
558 { 568 {
559 _createModel = createModel; 569 _createModel = createModel;
@@ -620,19 +630,19 @@ @@ -620,19 +630,19 @@
620 __weak typeof(self) weakSelf = self; 630 __weak typeof(self) weakSelf = self;
621 if ([self.createModel.totalFee isNotBlank] 631 if ([self.createModel.totalFee isNotBlank]
622 && [self.createModel.totalFee integerValue] > 0) { 632 && [self.createModel.totalFee integerValue] > 0) {
623 - [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:self.amoutField.text CompleterBlock:^(NSString * _Nonnull payUrl) { 633 + NSString * p = [NSString stringWithFormat:@"%.0f",([self.amoutField.text floatValue]*100)];
  634 + [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
624 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; 635 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]];
625 - [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl]; 636 + weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl];
626 }]; 637 }];
627 }else{ 638 }else{
628 [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ 639 [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{
629 - NSString * p = [NSString stringWithFormat:@"%.2f",([weakSelf.createModel.totalFee floatValue]/100)];  
630 - weakSelf.amoutField.text = p; 640 + NSString * p = [NSString stringWithFormat:@"%.0f",([weakSelf.amoutField.text floatValue]*100)];
631 weakSelf.amoutField.enabled = NO; 641 weakSelf.amoutField.enabled = NO;
632 weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); 642 weakSelf.amoutField.textColor = UIColorHex(#c8c8c8);
633 - [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:weakSelf.amoutField.text CompleterBlock:^(NSString * _Nonnull payUrl) { 643 + [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
634 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; 644 NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]];
635 - [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl]; 645 + weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl];
636 }]; 646 }];
637 }]; 647 }];
638 } 648 }
@@ -660,7 +670,15 @@ @@ -660,7 +670,15 @@
660 [QMUITips showError:@"似乎与互联网断开连接" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2]; 670 [QMUITips showError:@"似乎与互联网断开连接" inView:[CNLiveCommuntTools cCommunt_currentViewController].view hideAfterDelay:2];
661 return; 671 return;
662 } 672 }
663 - [CNLiveCommuntViewModel requestWithCommuntyMaintenPayMentOrderId:self.createModel.idStr CompleterBlock:self.reloadBlock]; 673 + __weak typeof(self) weakSelf = self;
  674 + [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{
  675 + NSString * p = [NSString stringWithFormat:@"%.0f",([weakSelf.amoutField.text floatValue]*100)];
  676 + weakSelf.amoutField.enabled = NO;
  677 + weakSelf.amoutField.textColor = UIColorHex(#c8c8c8);
  678 + [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) {
  679 + [CNLiveCommuntViewModel requestWithCommuntyMaintenPayMentOrderId:weakSelf.createModel.idStr CompleterBlock:weakSelf.reloadBlock];
  680 + }];
  681 + }];
664 } 682 }
665 #pragma mark = 683 #pragma mark =
666 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string 684 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
CNLiveCommunitModule/Classes/View/CNLiveCommuntSubView.m
@@ -213,6 +213,42 @@ @@ -213,6 +213,42 @@
213 self.nameLabel.text = recoredModel.handworkName; 213 self.nameLabel.text = recoredModel.handworkName;
214 self.descLabel.text = [NSString stringWithFormat:@"%@ %@",recoredModel.name,recoredModel.mobile]; 214 self.descLabel.text = [NSString stringWithFormat:@"%@ %@",recoredModel.name,recoredModel.mobile];
215 self.priceLabel.text = [recoredModel.amount isNotBlank]?[NSString stringWithFormat:@"%@.00",recoredModel.amount]:@"0.00"; 215 self.priceLabel.text = [recoredModel.amount isNotBlank]?[NSString stringWithFormat:@"%@.00",recoredModel.amount]:@"0.00";
  216 + if ([recoredModel.status isEqualToString:@"3"]) {
  217 + self.evalButton.layer.cornerRadius = 10;
  218 + self.evalButton.layer.masksToBounds = YES;
  219 + self.evalButton.layer.borderWidth = 1;
  220 + self.evalButton.layer.borderColor = UIColorHex(#FD862E).CGColor;
  221 + [self.evalButton setBackgroundImage:[UIImage imageWithColor:UIColorHex(#FFFD862E)] forState:UIControlStateNormal];
  222 + self.evalButton.hidden = NO;
  223 + self.evalButton.userInteractionEnabled = YES;
  224 + }else if ([recoredModel.status isEqualToString:@"4"]) {
  225 + self.evalButton.hidden = NO;
  226 + self.evalButton.userInteractionEnabled = NO;
  227 + NSString * buttonName = @"";
  228 + UIColor * color = UIColorHex(#0091FF);
  229 + if ([recoredModel.refundStatus isEqualToString:@"4"]) {
  230 + buttonName = @"退费失败";
  231 + color = UIColorHex(#FD862E);
  232 + }
  233 + [self.evalButton setTitle:buttonName forState:UIControlStateNormal];
  234 + [self.evalButton setTitleColor:color forState:UIControlStateNormal];
  235 + }else if ([recoredModel.status isEqualToString:@"0"]
  236 + || [recoredModel.status isEqualToString:@"1"]) {
  237 + self.evalButton.hidden = NO;
  238 + self.evalButton.userInteractionEnabled = NO;
  239 + [self.evalButton setTitle:@"活动已取消" forState:UIControlStateNormal];
  240 + [self.evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal];
  241 + }else{
  242 + self.evalButton.userInteractionEnabled = NO;
  243 + self.evalButton.hidden = YES;
  244 + }
  245 +}
  246 +-(void)evalContentButton:(UIButton *)button
  247 +{
  248 + if ([self.recoredModel.status isEqualToString:@"1"]) {
  249 + CNLiveCommuntEvaluaViewController * evaluaView = [[CNLiveCommuntEvaluaViewController alloc] initWithRecord:self.recoredModel];
  250 + [[self displayViewController].navigationController pushViewController:evaluaView animated:YES];
  251 + }
216 } 252 }
217 -(void)layoutSubviews 253 -(void)layoutSubviews
218 { 254 {
@@ -244,7 +280,7 @@ @@ -244,7 +280,7 @@
244 [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) { 280 [self.evalButton mas_makeConstraints:^(MASConstraintMaker *make) {
245 make.bottom.right.mas_equalTo(weakSelf.mainView).offset(-10); 281 make.bottom.right.mas_equalTo(weakSelf.mainView).offset(-10);
246 make.height.mas_equalTo(20); 282 make.height.mas_equalTo(20);
247 - make.width.mas_equalTo(50); 283 + make.width.mas_equalTo([weakSelf.recoredModel.status isEqualToString:@"3"]?50:90);
248 }]; 284 }];
249 [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) { 285 [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
250 make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-10); 286 make.bottom.mas_equalTo(weakSelf.mainView.mas_bottom).offset(-10);
@@ -332,11 +368,8 @@ @@ -332,11 +368,8 @@
332 [_evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal]; 368 [_evalButton setTitleColor:UIColorHex(#FD862E) forState:UIControlStateNormal];
333 _evalButton.titleLabel.font = [UIFont systemFontOfSize:13]; 369 _evalButton.titleLabel.font = [UIFont systemFontOfSize:13];
334 _evalButton.titleLabel.font = [UIFont boldSystemFontOfSize:13]; 370 _evalButton.titleLabel.font = [UIFont boldSystemFontOfSize:13];
335 - _evalButton.layer.cornerRadius = 10;  
336 - _evalButton.layer.masksToBounds = YES;  
337 - _evalButton.layer.borderWidth = 1;  
338 - _evalButton.layer.borderColor = UIColorHex(#FD862E).CGColor;  
339 - [_evalButton setBackgroundImage:[UIImage imageWithColor:UIColorHex(#FFFD862E)] forState:UIControlStateNormal]; 371 + _evalButton.hidden = YES;
  372 + [_evalButton addTarget:self action:@selector(evalContentButton:) forControlEvents:UIControlEventTouchUpInside];
340 } 373 }
341 return _evalButton; 374 return _evalButton;
342 } 375 }
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntEvaluaViewController.m
@@ -187,16 +187,22 @@ @@ -187,16 +187,22 @@
187 } 187 }
188 -(void)submiteAction:(UIButton *)button 188 -(void)submiteAction:(UIButton *)button
189 { 189 {
  190 + __weak typeof(self) weakSelf = self;
190 if (self.imageArray.count == 0) { 191 if (self.imageArray.count == 0) {
191 - //self.recordModel.idStr self.recordModel.handworkId  
192 - [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:@"52" handworkId:@"71" comment:self.evaluaView.text imgs:@"" isAnonymity:self.isAnonymity CompleterBlock:^{  
193 - 192 + [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:self.recordModel.idStr handworkId:self.recordModel.handworkId comment:self.evaluaView.text imgs:@"" isAnonymity:self.isAnonymity CompleterBlock:^{
  193 + [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5];
  194 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  195 + [weakSelf.navigationController popViewControllerAnimated:YES];
  196 + });
194 }]; 197 }];
195 }else{ 198 }else{
196 __weak typeof(self) weakSelf = self; 199 __weak typeof(self) weakSelf = self;
197 [self uploadImageWithCompleterBlock:^(NSString *imageUrl) { 200 [self uploadImageWithCompleterBlock:^(NSString *imageUrl) {
198 [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:weakSelf.recordModel.idStr handworkId:weakSelf.recordModel.handworkId comment:weakSelf.evaluaView.text imgs:imageUrl isAnonymity:weakSelf.isAnonymity CompleterBlock:^{ 201 [CNLiveCommuntViewModel requestWithCommuntyCommentsInfoWithContentId:weakSelf.recordModel.idStr handworkId:weakSelf.recordModel.handworkId comment:weakSelf.evaluaView.text imgs:imageUrl isAnonymity:weakSelf.isAnonymity CompleterBlock:^{
199 - 202 + [QMUITips showSucceed:@"评论成功" inView:weakSelf.view hideAfterDelay:1.5];
  203 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  204 + [weakSelf.navigationController popViewControllerAnimated:YES];
  205 + });
200 }]; 206 }];
201 }]; 207 }];
202 } 208 }
@@ -428,14 +434,16 @@ @@ -428,14 +434,16 @@
428 [fileArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 434 [fileArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
429 CNLiveUploadModel *model = fileArray[idx]; 435 CNLiveUploadModel *model = fileArray[idx];
430 if ([model.code isEqualToString:@"200"]) { 436 if ([model.code isEqualToString:@"200"]) {
431 - [picString appendString:@","];  
432 [picString appendString:model.imageUrl]; 437 [picString appendString:model.imageUrl];
  438 + if (fileArray.count != idx + 1) [picString appendString:@","];
433 }else { 439 }else {
434 weakSelf.progressHud.hidden = YES; 440 weakSelf.progressHud.hidden = YES;
435 weakSelf.progressHud = nil; 441 weakSelf.progressHud = nil;
436 [QMUITips showError:model.info.error.localizedDescription inView:weakSelf.view hideAfterDelay:1.5f]; 442 [QMUITips showError:model.info.error.localizedDescription inView:weakSelf.view hideAfterDelay:1.5f];
437 } 443 }
438 }]; 444 }];
  445 + weakSelf.progressHud.hidden = YES;
  446 + weakSelf.progressHud = nil;
439 if (completerBlock) completerBlock(picString); 447 if (completerBlock) completerBlock(picString);
440 } failure:^(NSMutableArray *errorArray, NSError *error) { 448 } failure:^(NSMutableArray *errorArray, NSError *error) {
441 weakSelf.progressHud.hidden = YES; 449 weakSelf.progressHud.hidden = YES;
@@ -466,7 +474,8 @@ @@ -466,7 +474,8 @@
466 _imageView.contentMode = UIViewContentModeScaleToFill; 474 _imageView.contentMode = UIViewContentModeScaleToFill;
467 _imageView.layer.masksToBounds = YES; 475 _imageView.layer.masksToBounds = YES;
468 _imageView.layer.cornerRadius = 5; 476 _imageView.layer.cornerRadius = 5;
469 - _imageView.image = [UIImage imageWithColor:[UIColor cyanColor]]; 477 + _imageView.image = [UIImage imageWithColor:UIColorHex(#f9f9f9)];
  478 + [_imageView sd_setImageWithURL:[NSURL URLWithString:self.recordModel.imgUrl] placeholderImage:[UIImage imageWithColor:UIColorHex(#f9f9f9)]];
470 } 479 }
471 return _imageView; 480 return _imageView;
472 } 481 }
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntInformViewController.m
@@ -189,6 +189,13 @@ @@ -189,6 +189,13 @@
189 if (createModel) { 189 if (createModel) {
190 CNLiveCommuntyOrderViewController * vc = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListYetOrder CreateModel:createModel]; 190 CNLiveCommuntyOrderViewController * vc = [[CNLiveCommuntyOrderViewController alloc] initWithShowType:CNLiveCommuntyOrderShowTypeListYetOrder CreateModel:createModel];
191 [weakSelf.navigationController pushViewController:vc animated:YES]; 191 [weakSelf.navigationController pushViewController:vc animated:YES];
  192 +
  193 +#ifdef DEBUG
  194 + [[NSUserDefaults standardUserDefaults] setObject:createModel.idStr forKey:@"cmnt_id"];
  195 + [[NSUserDefaults standardUserDefaults] synchronize];
  196 +#else
  197 +#endif
  198 +
192 } 199 }
193 }]; 200 }];
194 } 201 }
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntListViewController.m
@@ -157,6 +157,7 @@ @@ -157,6 +157,7 @@
157 { 157 {
158 if (self.showType == CNLiveCommuntListShowTypeRecord) { 158 if (self.showType == CNLiveCommuntListShowTypeRecord) {
159 CNLiveCommuntyActivityRecordListModel * recordModel = self.dataArray[indexPath.row]; 159 CNLiveCommuntyActivityRecordListModel * recordModel = self.dataArray[indexPath.row];
  160 + recordModel.status = [NSString stringWithFormat:@"%ld",(long)self.index];
160 return [CNLiveCommuntSubRecordTableView setTableView:tableView RecordModel:recordModel]; 161 return [CNLiveCommuntSubRecordTableView setTableView:tableView RecordModel:recordModel];
161 } 162 }
162 if (self.showType == CNLiveCommuntListShowTypeHome) { 163 if (self.showType == CNLiveCommuntListShowTypeHome) {
@@ -180,7 +181,7 @@ @@ -180,7 +181,7 @@
180 } 181 }
181 if (self.showType == CNLiveCommuntListShowTypeRepair) { 182 if (self.showType == CNLiveCommuntListShowTypeRepair) {
182 CNLiveCommuntyActivityRepairListModel * repairModel = self.dataArray[indexPath.row]; 183 CNLiveCommuntyActivityRepairListModel * repairModel = self.dataArray[indexPath.row];
183 - return [repairModel.status isEqualToString:@"3"]?110.0:70.0; 184 + return [repairModel.status isEqualToString:@"3"] && [repairModel.totalFee integerValue] > 0?110.0:70.0;
184 } 185 }
185 return 0.001; 186 return 0.001;
186 } 187 }
@@ -200,18 +201,14 @@ @@ -200,18 +201,14 @@
200 [self.navigationController pushViewController:orderView animated:YES]; 201 [self.navigationController pushViewController:orderView animated:YES];
201 } 202 }
202 } 203 }
203 - if (self.showType == CNLiveCommuntListShowTypeRepair) {  
204 - NSLog(@"去活动详情"); 204 + if (self.showType == CNLiveCommuntListShowTypeRecord) {
  205 + CNLiveCommuntyActivityRecordListModel * repairModel = self.dataArray[indexPath.row];
  206 + [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithParamDict:[repairModel mj_JSONObject]];
205 } 207 }
206 if (self.showType == CNLiveCommuntListShowTypeHome) { 208 if (self.showType == CNLiveCommuntListShowTypeHome) {
207 - NSLog(@"去详情页Web页");  
208 - MJWeakSelf  
209 CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row]; 209 CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row];
210 - [CNLiveCommuntViewModel requestWithCommuntyActivityDetailMentActivityId:listModel.idStr CompleterBlock:^(CNLiveCommuntyActivityDetailModel * _Nonnull detailModel) {  
211 - NSDictionary * paramDict = @{@"id":detailModel.idStr,@"mobile":detailModel.mobile,@"unitPrice":detailModel.unitPrice,@"processDesc":detailModel.processDesc,@"name":detailModel.name};  
212 - CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped InfoDict:paramDict];  
213 - [weakSelf.navigationController pushViewController:signUpView animated:YES];  
214 - }]; 210 + CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:listModel.idStr];
  211 + [self.navigationController pushViewController:signUpView animated:YES];
215 } 212 }
216 } 213 }
217 214
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntSignUpViewController.h
@@ -11,10 +11,9 @@ NS_ASSUME_NONNULL_BEGIN @@ -11,10 +11,9 @@ NS_ASSUME_NONNULL_BEGIN
11 11
12 @interface CNLiveCommuntSignUpViewController : CNCommonTableViewController 12 @interface CNLiveCommuntSignUpViewController : CNCommonTableViewController
13 13
14 -  
15 /// 打开该界面需要的参数 14 /// 打开该界面需要的参数
16 -/// @param infoDict 字典  
17 -- (instancetype)initWithStyle:(UITableViewStyle)style InfoDict:(NSDictionary *)infoDict; 15 +/// @param activityId 字典
  16 +- (instancetype)initWithStyle:(UITableViewStyle)style ActivityId:(NSString *)activityId;
18 17
19 @end 18 @end
20 19
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
@@ -8,17 +8,20 @@ @@ -8,17 +8,20 @@
8 #import "CNLiveCommuntSignUpViewController.h" 8 #import "CNLiveCommuntSignUpViewController.h"
9 9
10 @interface CNLiveCommuntSignUpViewController ()<CNLiveCommuntSignUpUserViewDelegate> 10 @interface CNLiveCommuntSignUpViewController ()<CNLiveCommuntSignUpUserViewDelegate>
  11 +@property (nonatomic, strong) CNLiveCommuntyActivityDetailModel * detailModel;
11 @property (nonatomic, strong) NSMutableArray * userArray; 12 @property (nonatomic, strong) NSMutableArray * userArray;
12 -@property (nonatomic, strong) NSDictionary * infoDict; 13 +@property (nonatomic, copy) NSString * activityId;
13 @end 14 @end
14 15
15 @implementation CNLiveCommuntSignUpViewController 16 @implementation CNLiveCommuntSignUpViewController
16 17
17 -- (instancetype)initWithStyle:(UITableViewStyle)style InfoDict:(NSDictionary *)infoDict 18 +/// 打开该界面需要的参数
  19 +/// @param activityId 字典
  20 +- (instancetype)initWithStyle:(UITableViewStyle)style ActivityId:(NSString *)activityId
18 { 21 {
19 self = [super initWithStyle:style]; 22 self = [super initWithStyle:style];
20 if (self) { 23 if (self) {
21 - _infoDict = infoDict; 24 + _activityId = activityId;
22 } 25 }
23 return self; 26 return self;
24 } 27 }
@@ -30,9 +33,19 @@ @@ -30,9 +33,19 @@
30 self.title = @"报名"; 33 self.title = @"报名";
31 34
32 self.userArray = [[NSMutableArray alloc] init]; 35 self.userArray = [[NSMutableArray alloc] init];
33 -  
34 - NSString * mobile = [self.infoDict stringValueForKey:@"mobile" default:@""];  
35 - if ([mobile isNotBlank]) { 36 + __weak typeof(self) weakSelf = self;
  37 + [CNLiveCommuntViewModel requestWithCommuntyActivityDetailMentActivityId:self.activityId CompleterBlock:^(CNLiveCommuntyActivityDetailModel * _Nonnull detailModel) {
  38 + if (detailModel) {
  39 + weakSelf.detailModel = detailModel;
  40 + [weakSelf addTopNavigationWithView];
  41 + [weakSelf.tableView reloadData];
  42 + }
  43 + }];
  44 +
  45 +}
  46 +-(void)addTopNavigationWithView
  47 +{
  48 + if ([self.detailModel.mobile isNotBlank]) {
36 UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 49 UIButton * submiteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
37 submiteBtn.frame = CGRectMake(0, 0, 50, 14); 50 submiteBtn.frame = CGRectMake(0, 0, 50, 14);
38 [submiteBtn setTitle:@"咨询电话" forState:UIControlStateNormal]; 51 [submiteBtn setTitle:@"咨询电话" forState:UIControlStateNormal];
@@ -45,10 +58,10 @@ @@ -45,10 +58,10 @@
45 } 58 }
46 -(void)rightBarButtonAction:(UIButton *)button 59 -(void)rightBarButtonAction:(UIButton *)button
47 { 60 {
48 - NSString * mobile = [self.infoDict stringValueForKey:@"mobile" default:@""]; 61 + __weak typeof(self) weakSelf = self;
49 UIAlertController * alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; 62 UIAlertController * alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
50 - [alert addAction:[UIAlertAction actionWithTitle:mobile style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {  
51 - NSMutableString* str = [[NSMutableString alloc] initWithFormat:@"tel:%@",mobile]; 63 + [alert addAction:[UIAlertAction actionWithTitle:self.detailModel.mobile style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  64 + NSMutableString* str = [[NSMutableString alloc] initWithFormat:@"tel:%@",weakSelf.detailModel.mobile];
52 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str] options:@{} completionHandler:NULL]; 65 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str] options:@{} completionHandler:NULL];
53 }]]; 66 }]];
54 [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:NULL]]; 67 [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:NULL]];
@@ -58,6 +71,7 @@ @@ -58,6 +71,7 @@
58 { 71 {
59 __weak typeof(self) weakSelf = self; 72 __weak typeof(self) weakSelf = self;
60 CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped CompleterBlock:^(NSArray * _Nonnull userArray) { 73 CNLiveCommuntyUserListViewController * userVC = [[CNLiveCommuntyUserListViewController alloc] initWithStyle:UITableViewStyleGrouped CompleterBlock:^(NSArray * _Nonnull userArray) {
  74 + [weakSelf.userArray removeAllObjects];
61 [weakSelf.userArray addObjectsFromArray:userArray]; 75 [weakSelf.userArray addObjectsFromArray:userArray];
62 [weakSelf.tableView reloadData]; 76 [weakSelf.tableView reloadData];
63 [weakSelf setupWithBottemView:weakSelf.userArray.count]; 77 [weakSelf setupWithBottemView:weakSelf.userArray.count];
@@ -89,7 +103,7 @@ @@ -89,7 +103,7 @@
89 make.height.mas_equalTo(50); 103 make.height.mas_equalTo(50);
90 }]; 104 }];
91 105
92 - float unitPrice = [[self.infoDict stringValueForKey:@"unitPrice" default:@"0"] floatValue]; 106 + float unitPrice = [self.detailModel.unitPrice floatValue];
93 NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: ¥%.2f",(totalPrice * unitPrice)]]; 107 NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: ¥%.2f",(totalPrice * unitPrice)]];
94 [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#222833) range:[str.string rangeOfString:@"合计: "]]; 108 [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#222833) range:[str.string rangeOfString:@"合计: "]];
95 [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]]; 109 [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]];
@@ -135,14 +149,14 @@ @@ -135,14 +149,14 @@
135 -(void)payResultAction 149 -(void)payResultAction
136 { 150 {
137 __weak typeof(self) weakSelf = self; 151 __weak typeof(self) weakSelf = self;
138 - [CNLiveCommuntViewModel requestWithCommuntySingUpOrderMentHandworkId:[self.infoDict stringValueForKey:@"id" default:@""] Ussers:self.userArray CompleterBlock:^(CNLiveCommuntyActivitySignUpModel * _Nonnull signUpModel) {  
139 - float unitPrice = [[weakSelf.infoDict stringValueForKey:@"unitPrice" default:@"0"] floatValue]; 152 + [CNLiveCommuntViewModel requestWithCommuntySingUpOrderMentHandworkId:self.detailModel.idStr Ussers:self.userArray CompleterBlock:^(CNLiveCommuntyActivitySignUpModel * _Nonnull signUpModel) {
  153 + float unitPrice = [weakSelf.detailModel.unitPrice floatValue];
140 if (unitPrice == 0.00) { 154 if (unitPrice == 0.00) {
141 - CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel]; 155 + NSString * handworkId = weakSelf.detailModel.idStr;
  156 + CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId];
142 [weakSelf.navigationController pushViewController:resultVC animated:YES]; 157 [weakSelf.navigationController pushViewController:resultVC animated:YES];
143 }else{ 158 }else{
144 - NSString * body = [weakSelf.infoDict stringValueForKey:@"name" default:@""];  
145 - [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:signUpModel.idStr price:signUpModel.totalFee body:body]; 159 + [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:signUpModel.orderId price:weakSelf.detailModel.unitPrice body:weakSelf.detailModel.name];
146 } 160 }
147 }]; 161 }];
148 } 162 }
@@ -168,8 +182,7 @@ @@ -168,8 +182,7 @@
168 #pragma mark = 182 #pragma mark =
169 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 183 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
170 { 184 {
171 - NSString * desc = [self.infoDict stringValueForKey:@"processDesc" default:@""];  
172 - return [desc isNotBlank]?2:1; 185 + return [self.detailModel.processDesc isNotBlank]?2:1;
173 } 186 }
174 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 187 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
175 { 188 {
@@ -183,8 +196,7 @@ @@ -183,8 +196,7 @@
183 userView.delegate = self; 196 userView.delegate = self;
184 return userView; 197 return userView;
185 }else{ 198 }else{
186 - NSString * desc = [self.infoDict stringValueForKey:@"processDesc" default:@""];  
187 - return [CNLiveCommuntSignUpTextViewCell setTableView:tableView Desc:desc]; 199 + return [CNLiveCommuntSignUpTextViewCell setTableView:tableView Desc:self.detailModel.processDesc];
188 } 200 }
189 } 201 }
190 -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 202 -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
@@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
11 @property (nonatomic, strong) CNLiveCommuntyActivityMaintainsCreateModel * createMdoel; 11 @property (nonatomic, strong) CNLiveCommuntyActivityMaintainsCreateModel * createMdoel;
12 @property (nonatomic, assign) CNLiveCommuntyOrderShowType showType; 12 @property (nonatomic, assign) CNLiveCommuntyOrderShowType showType;
13 @property (nonatomic, assign) BOOL isShowTopAndBottem; 13 @property (nonatomic, assign) BOOL isShowTopAndBottem;
  14 +@property (nonatomic, strong) UIView * bottemView;
  15 +@property (nonatomic, strong) UIButton * payButton;
14 @property (nonatomic, copy) NSString *maintenId; 16 @property (nonatomic, copy) NSString *maintenId;
15 @property (nonatomic, assign) BOOL isChat; 17 @property (nonatomic, assign) BOOL isChat;
16 @end 18 @end
@@ -71,16 +73,16 @@ @@ -71,16 +73,16 @@
71 } 73 }
72 -(void)setupWithNaviView 74 -(void)setupWithNaviView
73 { 75 {
74 - if ((self.showType == CNLiveCommuntyOrderShowTypeListYetOrder  
75 - || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder)  
76 - && ![self.createMdoel.repairId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) { 76 + if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder
  77 + || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder
  78 + || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
77 NSString * name = @""; 79 NSString * name = @"";
78 UIColor * titleColor = [UIColor whiteColor]; 80 UIColor * titleColor = [UIColor whiteColor];
79 - if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder) { 81 + if (self.showType == CNLiveCommuntyOrderShowTypeListYetOrder && ![self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
80 name = @"咨询电话"; 82 name = @"咨询电话";
81 titleColor = UIColorHex(#0091FF); 83 titleColor = UIColorHex(#0091FF);
82 } 84 }
83 - if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) { 85 + if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder || [self.createMdoel.userId isEqualToString:[CNUserInfoManager manager].userInfoModel.uid]) {
84 name = @"取消订单"; 86 name = @"取消订单";
85 titleColor = UIColorHex(#F5A623FF); 87 titleColor = UIColorHex(#F5A623FF);
86 } 88 }
@@ -92,6 +94,11 @@ @@ -92,6 +94,11 @@
92 submiteBtn.titleLabel.font = [UIFont systemFontOfSize:14]; 94 submiteBtn.titleLabel.font = [UIFont systemFontOfSize:14];
93 [submiteBtn addTarget:self action:@selector(rightBarButtonAction:) forControlEvents:UIControlEventTouchUpInside]; 95 [submiteBtn addTarget:self action:@selector(rightBarButtonAction:) forControlEvents:UIControlEventTouchUpInside];
94 self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:submiteBtn]; 96 self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:submiteBtn];
  97 + if (self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) {
  98 + self.navigationItem.rightBarButtonItem = nil;
  99 + }
  100 + }else{
  101 + self.navigationItem.rightBarButtonItem = nil;
95 } 102 }
96 } 103 }
97 -(void)setupWithBottemView 104 -(void)setupWithBottemView
@@ -100,39 +107,56 @@ @@ -100,39 +107,56 @@
100 || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder 107 || self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder
101 || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) { 108 || self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder) {
102 __weak typeof(self) weakSelf = self; 109 __weak typeof(self) weakSelf = self;
103 - UIView * bottemView = [[UIView alloc] init];  
104 - bottemView.backgroundColor = [UIColor whiteColor];  
105 - bottemView.hidden = self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder;  
106 - [self.view addSubview:bottemView];  
107 - [bottemView mas_makeConstraints:^(MASConstraintMaker *make) {  
108 - make.left.right.bottom.mas_equalTo(weakSelf.view);  
109 - make.height.mas_equalTo(50);  
110 - }]; 110 + if (!self.bottemView) {
  111 + self.bottemView = [[UIView alloc] init];
  112 + self.bottemView.backgroundColor = [UIColor whiteColor];
  113 + self.bottemView.hidden = self.showType == CNLiveCommuntyOrderShowTypeListFailureOrder;
  114 + [self.view addSubview:self.bottemView];
  115 + [self.bottemView mas_makeConstraints:^(MASConstraintMaker *make) {
  116 + make.left.right.bottom.mas_equalTo(weakSelf.view);
  117 + make.height.mas_equalTo(50);
  118 + }];
  119 + }
111 120
112 NSString * payString = @""; 121 NSString * payString = @"";
113 if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder) payString = @"立即接单"; 122 if (self.showType == CNLiveCommuntyOrderShowTypeChatYetOrder) payString = @"立即接单";
114 if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) payString = @"取消接单"; 123 if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) payString = @"取消接单";
115 124
116 - UIButton * payButton = [UIButton buttonWithType:UIButtonTypeCustom];  
117 - [payButton setTitle:payString forState:UIControlStateNormal];  
118 - [payButton setTitle:payString forState:UIControlStateHighlighted];  
119 - [payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
120 - [payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];  
121 - payButton.backgroundColor = UIColorHex(#CD0302);  
122 - payButton.layer.masksToBounds = YES;  
123 - payButton.layer.cornerRadius = 18;  
124 - payButton.titleLabel.font = [UIFont systemFontOfSize:16];  
125 - payButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];  
126 - [payButton addTarget:self action:@selector(payResultAction:) forControlEvents:UIControlEventTouchUpInside];  
127 - [bottemView addSubview:payButton];  
128 - [payButton mas_makeConstraints:^(MASConstraintMaker *make) {  
129 - make.centerY.mas_equalTo(bottemView);  
130 - make.right.mas_equalTo(bottemView.mas_right).offset(-10);  
131 - make.left.mas_equalTo(bottemView.mas_left).offset(10);  
132 - make.height.mas_equalTo(36);  
133 - }]; 125 + if (!self.payButton) {
  126 + self.payButton = [UIButton buttonWithType:UIButtonTypeCustom];
  127 + [self.payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  128 + [self.payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
  129 + self.payButton.backgroundColor = UIColorHex(#CD0302);
  130 + self.payButton.layer.masksToBounds = YES;
  131 + self.payButton.layer.cornerRadius = 18;
  132 + self.payButton.titleLabel.font = [UIFont systemFontOfSize:16];
  133 + self.payButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];
  134 + [self.payButton addTarget:self action:@selector(payResultAction:) forControlEvents:UIControlEventTouchUpInside];
  135 + [self.bottemView addSubview:self.payButton];
  136 + [self.payButton mas_makeConstraints:^(MASConstraintMaker *make) {
  137 + make.centerY.mas_equalTo(weakSelf.bottemView);
  138 + make.right.mas_equalTo(weakSelf.bottemView.mas_right).offset(-10);
  139 + make.left.mas_equalTo(weakSelf.bottemView.mas_left).offset(10);
  140 + make.height.mas_equalTo(36);
  141 + }];
  142 + }
  143 + [self.payButton setTitle:payString forState:UIControlStateNormal];
  144 + [self.payButton setTitle:payString forState:UIControlStateHighlighted];
  145 +
  146 + if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder && [self.createMdoel.totalFee isNotBlank] && [self.createMdoel.totalFee integerValue] > 0) {
  147 + self.payButton.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder;
  148 + self.bottemView.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder;
  149 + [self.bottemView removeAllSubviews];
  150 + }
  151 + }else{
  152 + if (self.bottemView && self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder) {
  153 + self.payButton.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder;
  154 + self.bottemView.hidden = self.showType == CNLiveCommuntyOrderShowTypeChatCompletOrder;
  155 + [self.bottemView removeAllSubviews];
  156 + }
134 } 157 }
135 } 158 }
  159 +
136 -(void)rightBarButtonAction:(UIButton *)button 160 -(void)rightBarButtonAction:(UIButton *)button
137 { 161 {
138 MJWeakSelf 162 MJWeakSelf
@@ -199,6 +223,10 @@ @@ -199,6 +223,10 @@
199 self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 60, 0); 223 self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 60, 0);
200 } 224 }
201 } 225 }
  226 +-(void)dealloc
  227 +{
  228 + [[NSNotificationCenter defaultCenter] removeObserver:self name:kCNLiveHiddenModalViewWithQrNotification object:nil];
  229 +}
202 #pragma mark = 230 #pragma mark =
203 #pragma mark - DZNEmptyDataSetSource Methods 231 #pragma mark - DZNEmptyDataSetSource Methods
204 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView 232 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultListViewController.h
@@ -14,7 +14,9 @@ NS_ASSUME_NONNULL_BEGIN @@ -14,7 +14,9 @@ NS_ASSUME_NONNULL_BEGIN
14 /// 初始化查看详情界面 14 /// 初始化查看详情界面
15 /// @param style 显示样式 15 /// @param style 显示样式
16 /// @param signId id 16 /// @param signId id
17 -- (instancetype)initWithStyle:(UITableViewStyle)style SignId:(NSString *)signId; 17 +/// @param orderId 订单id
  18 +/// @param handworkId 活动id
  19 +- (instancetype)initWithStyle:(UITableViewStyle)style SignId:(NSString *)signId OrderId:(NSString *)orderId handworkId:(NSString *)handworkId;
18 20
19 @end 21 @end
20 22
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultListViewController.m
@@ -8,17 +8,20 @@ @@ -8,17 +8,20 @@
8 #import "CNLiveCommuntyResultListViewController.h" 8 #import "CNLiveCommuntyResultListViewController.h"
9 9
10 @interface CNLiveCommuntyResultListViewController ()<DZNEmptyDataSetSource,DZNEmptyDataSetDelegate> 10 @interface CNLiveCommuntyResultListViewController ()<DZNEmptyDataSetSource,DZNEmptyDataSetDelegate>
11 - 11 +@property (nonatomic, strong) CNLiveCommuntyActivityResultDetailModel * detailModel;
12 @property (nonatomic, copy) NSString * signId; 12 @property (nonatomic, copy) NSString * signId;
13 - 13 +@property (nonatomic, copy) NSString * orderId;
  14 +@property (nonatomic, copy) NSString * handworkId;
14 @end 15 @end
15 16
16 @implementation CNLiveCommuntyResultListViewController 17 @implementation CNLiveCommuntyResultListViewController
17 18
18 -- (instancetype)initWithStyle:(UITableViewStyle)style SignId:(NSString *)signId 19 +- (instancetype)initWithStyle:(UITableViewStyle)style SignId:(NSString *)signId OrderId:(NSString *)orderId handworkId:(nonnull NSString *)handworkId
19 { 20 {
20 self = [super initWithStyle:style]; 21 self = [super initWithStyle:style];
21 if (self) { 22 if (self) {
  23 + _handworkId = handworkId;
  24 + _orderId = orderId;
22 _signId = signId; 25 _signId = signId;
23 } 26 }
24 return self; 27 return self;
@@ -30,36 +33,43 @@ @@ -30,36 +33,43 @@
30 self.view.backgroundColor = [UIColor whiteColor]; 33 self.view.backgroundColor = [UIColor whiteColor];
31 self.title = @"报名成功"; 34 self.title = @"报名成功";
32 35
33 - [self setupWithBottemView]; 36 +
  37 + __weak typeof(self) weakSelf = self;
  38 + [CNLiveCommuntViewModel requestWithCommuntyActivityResultDetailMentOrderId:self.orderId SignId:self.signId handworkId:self.handworkId CompleterBlock:^(CNLiveCommuntyActivityResultDetailModel * _Nonnull detailModel) {
  39 + weakSelf.detailModel = detailModel;
  40 + [weakSelf setupWithBottemView];
  41 + [weakSelf.tableView reloadData];
  42 + }];
34 } 43 }
35 -(void)setupWithBottemView 44 -(void)setupWithBottemView
36 { 45 {
37 - __weak typeof(self) weakSelf = self;  
38 - UIView * bottemView = [[UIView alloc] init];  
39 - bottemView.backgroundColor = [UIColor whiteColor];  
40 - [self.view addSubview:bottemView];  
41 - [bottemView mas_makeConstraints:^(MASConstraintMaker *make) {  
42 - make.left.right.bottom.mas_equalTo(weakSelf.view);  
43 - make.height.mas_equalTo(50);  
44 - }];  
45 -  
46 - NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: 400元"]];  
47 - [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#222833) range:[str.string rangeOfString:@"合计: "]];  
48 - [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]];  
49 - [str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]];  
50 - [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#DF0D23) range:[str.string rangeOfString:@"¥"]];  
51 - [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:9] range:[str.string rangeOfString:@"¥"]];  
52 -  
53 - UILabel * priceLabel = [[UILabel alloc] init];  
54 - priceLabel.textColor = UIColorHex(#DF0D23);  
55 - priceLabel.font = [UIFont boldSystemFontOfSize:16];  
56 - priceLabel.attributedText = str;  
57 - [bottemView addSubview:priceLabel];  
58 - [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {  
59 - make.centerY.mas_equalTo(bottemView);  
60 - make.right.mas_equalTo(bottemView.mas_right).offset(-10);  
61 - }];  
62 - 46 + if ([self.detailModel.unitPrice isNotBlank] && [self.detailModel.unitPrice floatValue] > 0) {
  47 + __weak typeof(self) weakSelf = self;
  48 + UIView * bottemView = [[UIView alloc] init];
  49 + bottemView.backgroundColor = [UIColor whiteColor];
  50 + [self.view addSubview:bottemView];
  51 + [bottemView mas_makeConstraints:^(MASConstraintMaker *make) {
  52 + make.left.right.bottom.mas_equalTo(weakSelf.view);
  53 + make.height.mas_equalTo(50);
  54 + }];
  55 +
  56 + NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"合计: %.2f元",(self.detailModel.signupVoList.count * [self.detailModel.unitPrice floatValue])/2]];
  57 + [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#222833) range:[str.string rangeOfString:@"合计: "]];
  58 + [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]];
  59 + [str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:14] range:[str.string rangeOfString:@"合计: "]];
  60 + [str addAttribute:NSForegroundColorAttributeName value:UIColorHex(#DF0D23) range:[str.string rangeOfString:@"¥"]];
  61 + [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:9] range:[str.string rangeOfString:@"¥"]];
  62 +
  63 + UILabel * priceLabel = [[UILabel alloc] init];
  64 + priceLabel.textColor = UIColorHex(#DF0D23);
  65 + priceLabel.font = [UIFont boldSystemFontOfSize:16];
  66 + priceLabel.attributedText = str;
  67 + [bottemView addSubview:priceLabel];
  68 + [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  69 + make.centerY.mas_equalTo(bottemView);
  70 + make.right.mas_equalTo(bottemView.mas_right).offset(-10);
  71 + }];
  72 + }
63 } 73 }
64 - (void)initTableView 74 - (void)initTableView
65 { 75 {
@@ -110,17 +120,18 @@ @@ -110,17 +120,18 @@
110 120
111 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 121 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
112 { 122 {
113 - return 1; 123 + return self.detailModel.dataArray.count;
114 } 124 }
115 125
116 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 126 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
117 { 127 {
118 - return 3; 128 + return [self.detailModel.dataArray[section] count];
119 } 129 }
120 130
121 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 131 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
122 { 132 {
123 - return [CNLiveCommuntSignUpOrderViewCell setTableView:tableView Dict:@{}]; 133 + NSDictionary * dic = self.detailModel.dataArray[indexPath.section][indexPath.row];
  134 + return [CNLiveCommuntSignUpOrderViewCell setTableView:tableView Dict:dic];
124 } 135 }
125 136
126 -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 137 -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
@@ -154,24 +165,24 @@ @@ -154,24 +165,24 @@
154 nameLabel.numberOfLines = 1; 165 nameLabel.numberOfLines = 1;
155 nameLabel.font = [UIFont systemFontOfSize:15]; 166 nameLabel.font = [UIFont systemFontOfSize:15];
156 nameLabel.font = [UIFont boldSystemFontOfSize:15]; 167 nameLabel.font = [UIFont boldSystemFontOfSize:15];
157 - nameLabel.text = [NSString stringWithFormat:@"参与人%ld",section+1]; 168 + nameLabel.text = (self.detailModel.dataArray.count - 1 == section) ? @"活动信息" : [NSString stringWithFormat:@"参与人%ld",section+1];
158 [view addSubview:nameLabel]; 169 [view addSubview:nameLabel];
159 [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { 170 [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
160 make.centerY.mas_equalTo(view); 171 make.centerY.mas_equalTo(view);
161 make.left.mas_equalTo(view.mas_left).offset(20); 172 make.left.mas_equalTo(view.mas_left).offset(20);
162 }]; 173 }];
163 174
164 - UILabel * priceLabel = [[UILabel alloc] init];  
165 - priceLabel.textColor = UIColorHex(#DF0D23);  
166 - priceLabel.font = [UIFont boldSystemFontOfSize:16];  
167 - priceLabel.text = @"200元";  
168 - [view addSubview:priceLabel];  
169 - [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {  
170 - make.centerY.mas_equalTo(view);  
171 - make.right.mas_equalTo(view.mas_right).offset(-20);  
172 - }];  
173 -  
174 - 175 + if (self.detailModel.dataArray.count-1 != section && [self.detailModel.unitPrice isNotBlank] && [self.detailModel.unitPrice integerValue] > 0) {
  176 + UILabel * priceLabel = [[UILabel alloc] init];
  177 + priceLabel.textColor = UIColorHex(#DF0D23);
  178 + priceLabel.font = [UIFont boldSystemFontOfSize:16];
  179 + priceLabel.text = [NSString stringWithFormat:@"%lu元",[self.detailModel.unitPrice integerValue]*100*self.detailModel.signupVoList.count];
  180 + [view addSubview:priceLabel];
  181 + [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  182 + make.centerY.mas_equalTo(view);
  183 + make.right.mas_equalTo(view.mas_right).offset(-20);
  184 + }];
  185 + }
175 return view; 186 return view;
176 } 187 }
177 -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section 188 -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultViewController.h
@@ -13,7 +13,12 @@ NS_ASSUME_NONNULL_BEGIN @@ -13,7 +13,12 @@ NS_ASSUME_NONNULL_BEGIN
13 13
14 /// 初始化界面显示 14 /// 初始化界面显示
15 /// @param signUpModel 报名model 15 /// @param signUpModel 报名model
16 -- (instancetype)initWithSignUpModel:(CNLiveCommuntyActivitySignUpModel *)signUpModel; 16 +- (instancetype)initWithSignUpModel:(CNLiveCommuntyActivitySignUpModel *)signUpModel activityId:(NSString *)activityId;
  17 +
  18 +/// 初始化界面显示
  19 +/// @param activityId 活动id
  20 +/// @param orderId 活动id
  21 +- (instancetype)initWithActivityId:(NSString *)activityId OrderId:(NSString *)orderId Msg:(NSString *)msg;
17 @end 22 @end
18 23
19 NS_ASSUME_NONNULL_END 24 NS_ASSUME_NONNULL_END
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyResultViewController.m
@@ -10,9 +10,13 @@ @@ -10,9 +10,13 @@
10 @interface CNLiveCommuntyResultViewController () 10 @interface CNLiveCommuntyResultViewController ()
11 @property (nonatomic, strong) QMUIButton * statusButton; 11 @property (nonatomic, strong) QMUIButton * statusButton;
12 @property (nonatomic, strong) QMUIFillButton * descButton; 12 @property (nonatomic, strong) QMUIFillButton * descButton;
  13 +@property (nonatomic, strong) UILabel * nameLabel;
13 14
14 @property (nonatomic, strong) CNLiveCommuntyActivitySignUpModel *signUpModel; 15 @property (nonatomic, strong) CNLiveCommuntyActivitySignUpModel *signUpModel;
15 16
  17 +@property (nonatomic, copy) NSString *activityId;
  18 +@property (nonatomic, copy) NSString *orderId;
  19 +@property (nonatomic, copy) NSString *msg;
16 @property (nonatomic, assign) BOOL isSuccess; 20 @property (nonatomic, assign) BOOL isSuccess;
17 @end 21 @end
18 22
@@ -20,16 +24,33 @@ @@ -20,16 +24,33 @@
20 24
21 /// 初始化界面显示 25 /// 初始化界面显示
22 /// @param signUpModel 报名model 26 /// @param signUpModel 报名model
23 -- (instancetype)initWithSignUpModel:(CNLiveCommuntyActivitySignUpModel *)signUpModel 27 +- (instancetype)initWithSignUpModel:(CNLiveCommuntyActivitySignUpModel *)signUpModel activityId:(nonnull NSString *)activityId
24 { 28 {
25 self = [super init]; 29 self = [super init];
26 if (self) { 30 if (self) {
  31 + _activityId = activityId;
27 _isSuccess = signUpModel != nil; 32 _isSuccess = signUpModel != nil;
28 _signUpModel = signUpModel; 33 _signUpModel = signUpModel;
29 } 34 }
30 return self; 35 return self;
31 } 36 }
32 37
  38 +/// 初始化界面显示
  39 +/// @param activityId 活动id
  40 +/// @param orderId 活动id
  41 +/// @param msg 失败描述
  42 +- (instancetype)initWithActivityId:(NSString *)activityId OrderId:(NSString *)orderId Msg:(NSString *)msg
  43 +{
  44 + self = [super init];
  45 + if (self) {
  46 + _activityId = activityId;
  47 + _orderId = orderId;
  48 + _msg = msg;
  49 + _isSuccess = [orderId isNotBlank];
  50 + }
  51 + return self;
  52 +}
  53 +
33 - (void)viewDidLoad { 54 - (void)viewDidLoad {
34 [super viewDidLoad]; 55 [super viewDidLoad];
35 // Do any additional setup after loading the view. 56 // Do any additional setup after loading the view.
@@ -37,15 +58,20 @@ @@ -37,15 +58,20 @@
37 self.title = self.isSuccess?@"支付成功":@"支付失败"; 58 self.title = self.isSuccess?@"支付成功":@"支付失败";
38 59
39 [self.view addSubview:self.statusButton]; 60 [self.view addSubview:self.statusButton];
  61 + [self.view addSubview:self.nameLabel];
40 [self.view addSubview:self.descButton]; 62 [self.view addSubview:self.descButton];
41 __weak typeof(self) weakSelf = self; 63 __weak typeof(self) weakSelf = self;
42 [self.statusButton mas_makeConstraints:^(MASConstraintMaker *make) { 64 [self.statusButton mas_makeConstraints:^(MASConstraintMaker *make) {
43 make.centerX.mas_equalTo(weakSelf.view); 65 make.centerX.mas_equalTo(weakSelf.view);
44 make.top.mas_equalTo(weakSelf.view).offset(150); 66 make.top.mas_equalTo(weakSelf.view).offset(150);
45 }]; 67 }];
  68 + [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  69 + make.centerX.mas_equalTo(weakSelf.view);
  70 + make.top.mas_equalTo(weakSelf.statusButton.mas_bottom).offset(20);
  71 + }];
46 [self.descButton mas_makeConstraints:^(MASConstraintMaker *make) { 72 [self.descButton mas_makeConstraints:^(MASConstraintMaker *make) {
47 make.centerX.mas_equalTo(weakSelf.view); 73 make.centerX.mas_equalTo(weakSelf.view);
48 - make.top.mas_equalTo(weakSelf.statusButton.mas_bottom).offset(30); 74 + make.top.mas_equalTo(weakSelf.statusButton.mas_bottom).offset(40);
49 make.width.mas_equalTo(200); 75 make.width.mas_equalTo(200);
50 make.height.mas_equalTo(40); 76 make.height.mas_equalTo(40);
51 }]; 77 }];
@@ -53,7 +79,7 @@ @@ -53,7 +79,7 @@
53 -(void)descAction:(UIButton *)button 79 -(void)descAction:(UIButton *)button
54 { 80 {
55 if (self.isSuccess) { 81 if (self.isSuccess) {
56 - CNLiveCommuntyResultListViewController * resultVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:@""]; 82 + CNLiveCommuntyResultListViewController * resultVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:self.signUpModel.signsString OrderId:self.signUpModel.orderId handworkId:self.activityId];
57 [self.navigationController pushViewController:resultVC animated:YES]; 83 [self.navigationController pushViewController:resultVC animated:YES];
58 }else{ 84 }else{
59 [self.navigationController popViewControllerAnimated:YES]; 85 [self.navigationController popViewControllerAnimated:YES];
@@ -94,4 +120,19 @@ @@ -94,4 +120,19 @@
94 } 120 }
95 return _descButton; 121 return _descButton;
96 } 122 }
  123 +-(UILabel *)nameLabel
  124 +{
  125 + if (!_nameLabel) {
  126 + _nameLabel = [[UILabel alloc] init];
  127 + _nameLabel.textColor = UIColorHex(#999999);
  128 + _nameLabel.lineBreakMode = NSLineBreakByTruncatingTail;
  129 + _nameLabel.numberOfLines = 1;
  130 + _nameLabel.backgroundColor = UIColorHex(#F9F9F9);
  131 + _nameLabel.textAlignment = NSTextAlignmentCenter;
  132 + _nameLabel.font = [UIFont systemFontOfSize:13];
  133 + _nameLabel.text = self.msg;
  134 + _nameLabel.hidden = ![self.msg isNotBlank];
  135 + }
  136 + return _nameLabel;
  137 +}
97 @end 138 @end
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyUserEditViewController.m
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 return; 123 return;
124 } 124 }
125 __weak typeof(self) weakSelf = self; 125 __weak typeof(self) weakSelf = self;
126 - [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { 126 + [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:paramDict isSave:YES isNew:YES CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) {
127 [weakSelf.navigationController popViewControllerAnimated:YES]; 127 [weakSelf.navigationController popViewControllerAnimated:YES];
128 }]; 128 }];
129 } 129 }
CNLiveCommunitModule/Classes/ViewController/CNLiveCommuntyUserListViewController.m
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 { 19 {
20 [super viewDidAppear:animated]; 20 [super viewDidAppear:animated];
21 __weak typeof(self) weakSelf = self; 21 __weak typeof(self) weakSelf = self;
22 - [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) { 22 + [CNLiveCommuntViewModel requestWithCommuntySaveInfoUsersMentUserDict:@{} isSave:NO isNew:NO CompleterBlock:^(NSArray * _Nonnull userArray, BOOL isSave) {
23 weakSelf.userArray = [[NSMutableArray alloc] initWithArray:userArray]; 23 weakSelf.userArray = [[NSMutableArray alloc] initWithArray:userArray];
24 [weakSelf.tableView reloadData]; 24 [weakSelf.tableView reloadData];
25 [weakSelf setupWithBottemView:weakSelf.userArray.count > 0]; 25 [weakSelf setupWithBottemView:weakSelf.userArray.count > 0];
@@ -115,6 +115,11 @@ @@ -115,6 +115,11 @@
115 self.tableView.frame = CGRectMake(0, kNavigationBarHeight, kScreenWidth, kScreenHeight - kNavigationBarHeight); 115 self.tableView.frame = CGRectMake(0, kNavigationBarHeight, kScreenWidth, kScreenHeight - kNavigationBarHeight);
116 self.tableView.contentInset = UIEdgeInsetsMake(10, 0, 60, 0); 116 self.tableView.contentInset = UIEdgeInsetsMake(10, 0, 60, 0);
117 } 117 }
  118 +
  119 +/// 跳转删除人员
  120 +/// @param subDict 显示信息
  121 +-(void)setCommuntPushAddWithDelectUserViewController:(NSDictionary *)subDict{}
  122 +
118 /// 跳转到编辑或添加人员界面 123 /// 跳转到编辑或添加人员界面
119 /// @param subDict 显示信息 124 /// @param subDict 显示信息
120 -(void)setCommuntPushAddWithEditUserViewController:(NSDictionary *)subDict 125 -(void)setCommuntPushAddWithEditUserViewController:(NSDictionary *)subDict
CNLiveCommunitModule/Classes/ViewModel/CNLiveCommuntViewModel.h
@@ -89,8 +89,9 @@ typedef enum : NSUInteger { @@ -89,8 +89,9 @@ typedef enum : NSUInteger {
89 /// 对用户信息进行存读取操作 89 /// 对用户信息进行存读取操作
90 /// @param userDict 用户信息 90 /// @param userDict 用户信息
91 /// @param isSave 读&存 91 /// @param isSave 读&存
  92 +/// @param isNew 是不是新数据
92 /// @param completerBlock 返回结果 93 /// @param completerBlock 返回结果
93 -+(void)requestWithCommuntySaveInfoUsersMentUserDict:(NSDictionary *)userDict isSave:(BOOL)isSave CompleterBlock:(void(^)(NSArray * userArray, BOOL isSave))completerBlock; 94 ++(void)requestWithCommuntySaveInfoUsersMentUserDict:(NSDictionary *)userDict isSave:(BOOL)isSave isNew:(BOOL)isNew CompleterBlock:(void(^)(NSArray * userArray, BOOL isSave))completerBlock;
94 95
95 /// 对活动进行评论id 96 /// 对活动进行评论id
96 /// @param contentId 订单Id 97 /// @param contentId 订单Id
@@ -106,6 +107,13 @@ typedef enum : NSUInteger { @@ -106,6 +107,13 @@ typedef enum : NSUInteger {
106 /// @param completerBlock 返回结果 107 /// @param completerBlock 返回结果
107 +(void)requestWithCommuntyActivityDetailMentActivityId:(NSString *)activityId CompleterBlock:(void(^)(CNLiveCommuntyActivityDetailModel * detailModel))completerBlock; 108 +(void)requestWithCommuntyActivityDetailMentActivityId:(NSString *)activityId CompleterBlock:(void(^)(CNLiveCommuntyActivityDetailModel * detailModel))completerBlock;
108 109
  110 +/// 获取成功界面查看详情界面
  111 +/// @param orderId 订单id
  112 +/// @param signId 报名id
  113 +/// @param handworkId 活动id
  114 +/// @param completerBlock 返回结果
  115 ++(void)requestWithCommuntyActivityResultDetailMentOrderId:(NSString *)orderId SignId:(NSString *)signId handworkId:(NSString *)handworkId CompleterBlock:(void(^)(CNLiveCommuntyActivityResultDetailModel * detailModel))completerBlock;
  116 +
109 @end 117 @end
110 118
111 NS_ASSUME_NONNULL_END 119 NS_ASSUME_NONNULL_END
CNLiveCommunitModule/Classes/ViewModel/CNLiveCommuntViewModel.m
@@ -43,6 +43,8 @@ @@ -43,6 +43,8 @@
43 #define CNCCommuntPayMentActivityCommentsOrderContentURL cn_API_CommuntyApi(@"/feedbackApi/add") 43 #define CNCCommuntPayMentActivityCommentsOrderContentURL cn_API_CommuntyApi(@"/feedbackApi/add")
44 //活动详情 44 //活动详情
45 #define CNCCommuntPayMentActivityDetailOrderContentURL cn_API_CommuntyApi(@"/handworkApi/handworkById") 45 #define CNCCommuntPayMentActivityDetailOrderContentURL cn_API_CommuntyApi(@"/handworkApi/handworkById")
  46 +//查看详情
  47 +#define CNCCommuntPayMentActivityResultOrderContentURL cn_API_CommuntyApi(@"/signupApi/userSignupInfo")
46 @implementation CNLiveCommuntViewModel 48 @implementation CNLiveCommuntViewModel
47 49
48 /// 读取小区APP首页 50 /// 读取小区APP首页
@@ -304,7 +306,7 @@ @@ -304,7 +306,7 @@
304 [CNLiveNetworking setupShowResult:YES]; 306 [CNLiveNetworking setupShowResult:YES];
305 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntPayMentDetailContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { 307 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntPayMentDetailContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
306 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view]; 308 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
307 - [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) { 309 + [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:NO CompleterBlock:^(id responseObject) {
308 if (responseObject && completerBlock) completerBlock(); 310 if (responseObject && completerBlock) completerBlock();
309 }]; 311 }];
310 }]; 312 }];
@@ -361,7 +363,7 @@ @@ -361,7 +363,7 @@
361 { 363 {
362 NSDictionary * paramDict = @{ 364 NSDictionary * paramDict = @{
363 @"id":orderId, 365 @"id":orderId,
364 - @"totalFee":[NSString stringWithFormat:@"%.0f",[totalFee floatValue] * 100], 366 + @"totalFee":totalFee//[NSString stringWithFormat:@"%.0f",[totalFee floatValue] * 100],
365 }; 367 };
366 [QMUITips showLoadingInView:[CNLiveCommuntTools cCommunt_currentViewController].view]; 368 [QMUITips showLoadingInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
367 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 369 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
@@ -377,7 +379,7 @@ @@ -377,7 +379,7 @@
377 @"sp_id":AppId, 379 @"sp_id":AppId,
378 @"out_trade_no":orderId, 380 @"out_trade_no":orderId,
379 @"body":[responseObject stringValueForKey:@"repairName" default:@"服务"], 381 @"body":[responseObject stringValueForKey:@"repairName" default:@"服务"],
380 - @"total_fee":[NSString stringWithFormat:@"%.0f",[totalFee floatValue] * 100], 382 + @"total_fee":totalFee,//[NSString stringWithFormat:@"%.0f",[totalFee floatValue] * 100],
381 @"user_id":[CNUserInfoManager manager].userInfoModel.uid, 383 @"user_id":[CNUserInfoManager manager].userInfoModel.uid,
382 @"notify_url":CNCCommuntPayMentRepairOrderContentURL, 384 @"notify_url":CNCCommuntPayMentRepairOrderContentURL,
383 @"ver":[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"], 385 @"ver":[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"],
@@ -412,7 +414,6 @@ @@ -412,7 +414,6 @@
412 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view]; 414 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
413 [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) { 415 [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
414 if (responseObject) { 416 if (responseObject) {
415 - NSLog(@"%@",[responseObject mj_JSONString]);  
416 CNLiveCommuntyActivitySignUpModel * signUpModel = [CNLiveCommuntyActivitySignUpModel mj_objectWithKeyValues:responseObject]; 417 CNLiveCommuntyActivitySignUpModel * signUpModel = [CNLiveCommuntyActivitySignUpModel mj_objectWithKeyValues:responseObject];
417 if (completerBlock) completerBlock(signUpModel); 418 if (completerBlock) completerBlock(signUpModel);
418 }else{ 419 }else{
@@ -425,34 +426,39 @@ @@ -425,34 +426,39 @@
425 /// 对用户信息进行存读取操作 426 /// 对用户信息进行存读取操作
426 /// @param userDict 用户信息 427 /// @param userDict 用户信息
427 /// @param isSave 读&存 428 /// @param isSave 读&存
  429 +/// @param isNew 是不是新数据
428 /// @param completerBlock 返回结果 430 /// @param completerBlock 返回结果
429 -+(void)requestWithCommuntySaveInfoUsersMentUserDict:(NSDictionary *)userDict isSave:(BOOL)isSave CompleterBlock:(void(^)(NSArray * userArray, BOOL isSave))completerBlock 431 ++(void)requestWithCommuntySaveInfoUsersMentUserDict:(NSDictionary *)userDict isSave:(BOOL)isSave isNew:(BOOL)isNew CompleterBlock:(void(^)(NSArray * userArray, BOOL isSave))completerBlock
430 { 432 {
431 NSString * cacheKey = [NSString stringWithFormat:@"%@/kCNLiveCommuntySaveInfoUsersMentKey04",[CNUserInfoManager manager].userInfoModel.uid]; 433 NSString * cacheKey = [NSString stringWithFormat:@"%@/kCNLiveCommuntySaveInfoUsersMentKey04",[CNUserInfoManager manager].userInfoModel.uid];
432 if (isSave) { 434 if (isSave) {
433 if ([userDict allKeys].count > 0 && [userDict allValues].count > 0) { 435 if ([userDict allKeys].count > 0 && [userDict allValues].count > 0) {
434 NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]]; 436 NSString * save_string = [NSString stringWithFormat:@"%@",[CNLiveRespCacheManager objectCacheWithFileName:cacheKey]];
435 NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:[save_string mj_JSONObject]]; 437 NSMutableArray * tempArray = [[NSMutableArray alloc] initWithArray:[save_string mj_JSONObject]];
436 - BOOL isReplace = YES;  
437 - NSString * i_nameString = [userDict stringValueForKey:@"name" default:@""];  
438 - NSString * i_sexString = [userDict stringValueForKey:@"gender" default:@""];  
439 - NSString * i_ageString = [userDict stringValueForKey:@"age" default:@""];  
440 - NSString * i_mobileString = [userDict stringValueForKey:@"mobile" default:@""];  
441 - for (NSDictionary * subDict in tempArray) {  
442 - NSString * o_nameString = [subDict stringValueForKey:@"name" default:@""];  
443 - NSString * o_sexString = [subDict stringValueForKey:@"gender" default:@""];  
444 - NSString * o_ageString = [subDict stringValueForKey:@"age" default:@""];  
445 - NSString * o_mobileString = [subDict stringValueForKey:@"mobile" default:@""];  
446 - if (![i_nameString isEqualToString:o_nameString]  
447 - || ![i_sexString isEqualToString:o_sexString]  
448 - || ![i_ageString isEqualToString:o_ageString]  
449 - || ![i_mobileString isEqualToString:o_mobileString]) {  
450 - [tempArray replaceObjectAtIndex:[tempArray indexOfObject:subDict] withObject:userDict];  
451 - isReplace = NO;  
452 - break; 438 + if (!isNew) {
  439 + BOOL isReplace = YES;
  440 + NSString * i_nameString = [userDict stringValueForKey:@"name" default:@""];
  441 + NSString * i_sexString = [userDict stringValueForKey:@"gender" default:@""];
  442 + NSString * i_ageString = [userDict stringValueForKey:@"age" default:@""];
  443 + NSString * i_mobileString = [userDict stringValueForKey:@"mobile" default:@""];
  444 + for (NSDictionary * subDict in tempArray) {
  445 + NSString * o_nameString = [subDict stringValueForKey:@"name" default:@""];
  446 + NSString * o_sexString = [subDict stringValueForKey:@"gender" default:@""];
  447 + NSString * o_ageString = [subDict stringValueForKey:@"age" default:@""];
  448 + NSString * o_mobileString = [subDict stringValueForKey:@"mobile" default:@""];
  449 + if (![i_nameString isEqualToString:o_nameString]
  450 + || ![i_sexString isEqualToString:o_sexString]
  451 + || ![i_ageString isEqualToString:o_ageString]
  452 + || ![i_mobileString isEqualToString:o_mobileString]) {
  453 + [tempArray replaceObjectAtIndex:[tempArray indexOfObject:subDict] withObject:userDict];
  454 + isReplace = NO;
  455 + break;
  456 + }
453 } 457 }
  458 + if (isReplace) [tempArray addObject:userDict];
  459 + }else{
  460 + [tempArray addObject:userDict];
454 } 461 }
455 - if (isReplace) [tempArray addObject:userDict];  
456 NSString * user_info = [tempArray mj_JSONString]; 462 NSString * user_info = [tempArray mj_JSONString];
457 [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey]; 463 [CNLiveRespCacheManager cachePathWithObject:user_info FileName:cacheKey];
458 if (completerBlock) completerBlock(@[],isSave); 464 if (completerBlock) completerBlock(@[],isSave);
@@ -488,12 +494,8 @@ @@ -488,12 +494,8 @@
488 [CNLiveNetworking setupShowResult:YES]; 494 [CNLiveNetworking setupShowResult:YES];
489 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntPayMentActivityCommentsOrderContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { 495 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntPayMentActivityCommentsOrderContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
490 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view]; 496 [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
491 - [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {  
492 - if (responseObject) {  
493 -  
494 - }else{  
495 -  
496 - } 497 + [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:NO CompleterBlock:^(id responseObject) {
  498 + if ([responseObject[@"errorMessage"] isEqualToString:@"success"] && completerBlock) completerBlock();
497 }]; 499 }];
498 }]; 500 }];
499 } 501 }
@@ -522,6 +524,33 @@ @@ -522,6 +524,33 @@
522 }]; 524 }];
523 }]; 525 }];
524 } 526 }
  527 +/// 获取成功界面查看详情界面
  528 +/// @param orderId 订单id
  529 +/// @param signId 报名id
  530 +/// @param completerBlock 返回结果
  531 ++(void)requestWithCommuntyActivityResultDetailMentOrderId:(NSString *)orderId SignId:(NSString *)signId handworkId:(NSString *)handworkId CompleterBlock:(void(^)(CNLiveCommuntyActivityResultDetailModel * detailModel))completerBlock
  532 +{
  533 + NSDictionary * paramDict = @{
  534 + @"orderId":[orderId isNotBlank]?orderId:@"",
  535 + @"handworkId":[handworkId isNotBlank]?handworkId:@"",
  536 + @"signupIds":[signId isNotBlank]?signId:@""
  537 + };
  538 + [QMUITips showLoadingInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
  539 + [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  540 + [CNLiveNetworking setupShowDataResult:NO];
  541 + [CNLiveNetworking setupShowResult:YES];
  542 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNCCommuntPayMentActivityResultOrderContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  543 + [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
  544 + [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
  545 + if (responseObject) {
  546 + CNLiveCommuntyActivityResultDetailModel * detailModel = [CNLiveCommuntyActivityResultDetailModel mj_objectWithKeyValues:responseObject];
  547 + if (completerBlock) completerBlock(detailModel);
  548 + }else{
  549 + if (completerBlock) completerBlock(nil);
  550 + }
  551 + }];
  552 + }];
  553 +}
525 #pragma mark =========== 对放回的结果进行提醒判断 =========== 554 #pragma mark =========== 对放回的结果进行提醒判断 ===========
526 555
527 /// 获取时间戳 556 /// 获取时间戳
Example/CNLiveCommunitModule/CNLIVEAppDelegate.m
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 [IQKeyboardManager sharedManager].enable = YES; 23 [IQKeyboardManager sharedManager].enable = YES;
24 [IQKeyboardManager sharedManager].enableAutoToolbar = YES; 24 [IQKeyboardManager sharedManager].enableAutoToolbar = YES;
25 25
26 - [CNUserInfoManager manager].userInfoModel.uid = @"145680";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10458139";//@"10537318";//@"10499533";// 26 + [CNUserInfoManager manager].userInfoModel.uid = @"145680";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10458139";//@"10537318";//@"10499533";//@"11973842"
27 27
28 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; 28 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
29 // [[NSUserDefaults standardUserDefaults] synchronize]; 29 // [[NSUserDefaults standardUserDefaults] synchronize];
Example/CNLiveCommunitModule/CNLIVEViewController.m
@@ -18,6 +18,12 @@ @@ -18,6 +18,12 @@
18 #import <Masonry/Masonry.h> 18 #import <Masonry/Masonry.h>
19 #import "CNLiveCommuntyModule.h" 19 #import "CNLiveCommuntyModule.h"
20 #import "CNLIVEAppDelegate.h" 20 #import "CNLIVEAppDelegate.h"
  21 +#import <YYCategories/YYCategories.h>
  22 +#import <JXCategoryView/JXCategoryView.h>
  23 +#import <JXPagingView/JXPagerView.h>
  24 +#import <Masonry/Masonry.h>
  25 +#import <YYText/YYText.h>
  26 +#import "CNLiveCommuntViewModel.h"
21 #import "CNLiveCommuntyResultListViewController.h" 27 #import "CNLiveCommuntyResultListViewController.h"
22 #import <CNLiveEnvironment/CNLiveEnvironment.h> 28 #import <CNLiveEnvironment/CNLiveEnvironment.h>
23 #import <CNLiveUserManagement/CNUserInfoManager.h> 29 #import <CNLiveUserManagement/CNUserInfoManager.h>
@@ -63,6 +69,14 @@ @@ -63,6 +69,14 @@
63 [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { 69 [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
64 make.edges.mas_equalTo(self.view); 70 make.edges.mas_equalTo(self.view);
65 }]; 71 }];
  72 +
  73 + __block NSArray * array = @[@"123",@"123",@"123",@"123",@"123",@"123"];
  74 + __block NSMutableString *picString = [[NSMutableString alloc] init];
  75 + [array enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  76 + [picString appendString:obj];
  77 + if (array.count != idx+1) [picString appendString:@","];
  78 + }];
  79 + NSLog(@"===>%@",picString);
66 } 80 }
67 81
68 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 82 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
@@ -80,7 +94,7 @@ @@ -80,7 +94,7 @@
80 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(UITableViewCell.class)]; 94 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(UITableViewCell.class)];
81 } 95 }
82 cell.selectionStyle = UITableViewCellSelectionStyleNone; 96 cell.selectionStyle = UITableViewCellSelectionStyleNone;
83 - cell.textLabel.text = self.dataArray[indexPath.row]; 97 + cell.textLabel.text = [NSString stringWithFormat:@"%@==%ld",self.dataArray[indexPath.row],(long)indexPath.row];
84 98
85 return cell; 99 return cell;
86 } 100 }
@@ -112,22 +126,19 @@ @@ -112,22 +126,19 @@
112 [self.navigationController pushViewController:evaluaView animated:YES]; 126 [self.navigationController pushViewController:evaluaView animated:YES];
113 } 127 }
114 if (indexPath.row == 5) { 128 if (indexPath.row == 5) {
115 - /*  
116 - "id" : 37,  
117 - "mobile" : null,  
118 - "unitPrice" : 10,  
119 - "processDesc" : "阿斯达大1"  
120 - */  
121 - NSDictionary * paramDict = @{@"id":@"37",@"mobile":@"",@"unitPrice":@"0",@"processDesc":@"阿斯达大1"};  
122 - CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped InfoDict:paramDict]; 129 + CNLiveCommuntSignUpViewController * signUpView = [[CNLiveCommuntSignUpViewController alloc] initWithStyle:UITableViewStyleGrouped ActivityId:@"52"];
123 [self.navigationController pushViewController:signUpView animated:YES]; 130 [self.navigationController pushViewController:signUpView animated:YES];
124 } 131 }
125 if (indexPath.row == 6) { 132 if (indexPath.row == 6) {
126 - CNLiveCommuntyOrderViewController * orderVC = [[CNLiveCommuntyOrderViewController alloc] initWithMaintenId:@"cmnt2022021613328658203"];  
127 - [self.navigationController pushViewController:orderVC animated:YES]; 133 + NSString * cmnt_id = [[NSUserDefaults standardUserDefaults] objectForKey:@"cmnt_id"];
  134 + if ([cmnt_id isNotBlank]) {
  135 + CNLiveCommuntyOrderViewController * orderVC = [[CNLiveCommuntyOrderViewController alloc] initWithMaintenId:cmnt_id];
  136 + [self.navigationController pushViewController:orderVC animated:YES];
  137 + }
  138 +
128 } 139 }
129 if (indexPath.row == 7) { 140 if (indexPath.row == 7) {
130 - CNLiveCommuntyResultListViewController * orderVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:@""]; 141 + CNLiveCommuntyResultListViewController * orderVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:@"48" OrderId:@"" handworkId:@"52"];
131 [self.navigationController pushViewController:orderVC animated:YES]; 142 [self.navigationController pushViewController:orderVC animated:YES];
132 } 143 }
133 // if (indexPath.row == 8) { 144 // if (indexPath.row == 8) {
@@ -135,8 +146,8 @@ @@ -135,8 +146,8 @@
135 // [self.navigationController pushViewController:orderVC animated:YES]; 146 // [self.navigationController pushViewController:orderVC animated:YES];
136 // } 147 // }
137 if (indexPath.row == 8) { 148 if (indexPath.row == 8) {
138 - [CNUserInfoManager manager].userInfoModel.uid = self.isChange ? @"353001" : @"145680";  
139 - [self.dataArray replaceObjectAtIndex:8 withObject:self.isChange ? @"353001" : @"145680"]; 149 + [CNUserInfoManager manager].userInfoModel.uid = self.isChange ? @"11973842" : @"145680";
  150 + [self.dataArray replaceObjectAtIndex:8 withObject:self.isChange ? @"11973842" : @"145680"];
140 self.isChange = !self.isChange; 151 self.isChange = !self.isChange;
141 NSMutableDictionary * mDict = [[NSMutableDictionary alloc] init]; 152 NSMutableDictionary * mDict = [[NSMutableDictionary alloc] init];
142 [mDict setValue:[CNUserInfoManager manager].userInfoModel.uid forKey:@"loginSid"]; 153 [mDict setValue:[CNUserInfoManager manager].userInfoModel.uid forKey:@"loginSid"];