Commit 3a94ce5e450545c7b342426f8cab4f3d6d9fea67
1 parent
93c11137
no message
Showing
9 changed files
with
58 additions
and
27 deletions
CNLiveBalanceModule/Classes/Controller/CNLiveBalanceController.h
| ... | ... | @@ -15,9 +15,14 @@ |
| 15 | 15 | |
| 16 | 16 | NS_ASSUME_NONNULL_BEGIN |
| 17 | 17 | |
| 18 | -//type: 1-个人中心 2-特色群组 | |
| 19 | -//ID: 用户id-个人中心 群组id-特色群组 | |
| 20 | 18 | @interface CNLiveBalanceController : CNCommonViewController |
| 19 | + | |
| 20 | +/** | |
| 21 | + * @abstract 初始化 | |
| 22 | + * @param type type: 1-个人中心 2-特色群组 | |
| 23 | + * @param ID ID: 用户id-个人中心 群组id-特色群组 | |
| 24 | + * @return instancetype 控制器对象 | |
| 25 | + */ | |
| 21 | 26 | - (instancetype)initWithType:(NSString *)type ID:(NSString *)ID; |
| 22 | 27 | |
| 23 | 28 | - (instancetype)init NS_UNAVAILABLE; | ... | ... |
CNLiveBalanceModule/Classes/TradingRecord/CNLiveMonthBillController.h
| ... | ... | @@ -13,6 +13,14 @@ |
| 13 | 13 | #import "CNCommonViewController.h" |
| 14 | 14 | |
| 15 | 15 | @interface CNLiveMonthBillController : CNCommonViewController |
| 16 | + | |
| 17 | +/** | |
| 18 | + * @abstract 初始化 | |
| 19 | + * @param date 2019年12月 | |
| 20 | + * @param startTime 开始时间 每个月第一天的13位时间戳 | |
| 21 | + * @param endTime 结束时间 每个月最后一天的13位时间戳 | |
| 22 | + * @return instancetype 控制器对象 | |
| 23 | + */ | |
| 16 | 24 | - (instancetype)initWithDate:(NSString *)date startTime:(NSString *)startTime endTime:(NSString *)endTime; |
| 17 | 25 | |
| 18 | 26 | - (instancetype)init NS_UNAVAILABLE; | ... | ... |
CNLiveBalanceModule/Classes/TradingRecord/CNLiveMonthBillController.m
| ... | ... | @@ -132,8 +132,7 @@ static const CGFloat height = 60; |
| 132 | 132 | |
| 133 | 133 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
| 134 | 134 | CNLiveTradingRecordListModel *model = self.data[indexPath.row]; |
| 135 | - CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]init]; | |
| 136 | - vc.model = model; | |
| 135 | + CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]initWithType:TradingRecordDetailTypeDefault model:model date:self.date startTime:self.date endTime:self.date]; | |
| 137 | 136 | [self.navigationController pushViewController:vc animated:YES]; |
| 138 | 137 | |
| 139 | 138 | } | ... | ... |
CNLiveBalanceModule/Classes/TradingRecord/CNLiveTradingRecordController.h
| ... | ... | @@ -19,13 +19,14 @@ typedef enum { |
| 19 | 19 | @interface CNLiveTradingRecordController : CNCommonViewController |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * @abstract 初始化配置 | |
| 23 | - * @param type type: 0 -> 个人中心交易记录 1 -> 查看与此商户的交易记录 | |
| 24 | - * @param ID ID: 0 -> 用户id 1 -> 查看与此商户的交易记录 toId | |
| 25 | - * @param date 2019年12月 | |
| 26 | - * @param startTime 开始时间 | |
| 27 | - * @param endTime 结束时间 | |
| 28 | -*/ | |
| 22 | + * @abstract 初始化 | |
| 23 | + * @param type type: 0 -> 个人中心交易记录 1 -> 查看与此商户的交易记录 | |
| 24 | + * @param ID ID: 0 -> 用户id 1 -> 查看与此商户的交易记录 toId | |
| 25 | + * @param date 2019年12月 | |
| 26 | + * @param startTime 开始时间 每个月第一天的13位时间戳 | |
| 27 | + * @param endTime 结束时间 每个月最后一天的13位时间戳 | |
| 28 | + * @return instancetype 控制器对象 | |
| 29 | + */ | |
| 29 | 30 | - (instancetype)initWithType:(TradingRecordType)type ID:(NSString *)ID date:(NSString *)date startTime:(NSString *)startTime endTime:(NSString *)endTime; |
| 30 | 31 | |
| 31 | 32 | - (instancetype)init NS_UNAVAILABLE; | ... | ... |
CNLiveBalanceModule/Classes/TradingRecord/CNLiveTradingRecordController.m
| ... | ... | @@ -146,20 +146,11 @@ static const CGFloat height = 80; |
| 146 | 146 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
| 147 | 147 | if(self.type == TradingRecordTypeSpecial){ |
| 148 | 148 | CNLiveTradingRecordListModel *model = self.data[indexPath.row]; |
| 149 | - CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]init]; | |
| 150 | - vc.model = model; | |
| 151 | - vc.type = TradingRecordDetailTypeSpecial; | |
| 152 | - vc.date = self.date; | |
| 153 | - vc.startTime = self.startTime; | |
| 154 | - vc.endTime = self.endTime; | |
| 149 | + CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]initWithType:TradingRecordDetailTypeSpecial model:model date:self.date startTime:self.date endTime:self.date]; | |
| 155 | 150 | [self.navigationController pushViewController:vc animated:YES]; |
| 156 | 151 | }else{ |
| 157 | 152 | CNLiveTradingRecordListModel *model = self.data[indexPath.row]; |
| 158 | - CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]init]; | |
| 159 | - vc.model = model; | |
| 160 | - vc.date = self.date; | |
| 161 | - vc.startTime = self.startTime; | |
| 162 | - vc.endTime = self.endTime; | |
| 153 | + CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]initWithType:TradingRecordDetailTypeDefault model:model date:self.date startTime:self.date endTime:self.date]; | |
| 163 | 154 | [self.navigationController pushViewController:vc animated:YES]; |
| 164 | 155 | } |
| 165 | 156 | ... | ... |
CNLiveBalanceModule/Classes/TradingRecord/CNLiveTradingRecordDetailController.h
| ... | ... | @@ -18,11 +18,19 @@ typedef enum { |
| 18 | 18 | } TradingRecordDetailType; |
| 19 | 19 | |
| 20 | 20 | @interface CNLiveTradingRecordDetailController : CNCommonViewController |
| 21 | -@property (nonatomic, strong) CNLiveTradingRecordListModel *model; | |
| 22 | -@property (nonatomic, assign) TradingRecordDetailType type; | |
| 23 | 21 | |
| 24 | -@property (nonatomic, copy) NSString *date; | |
| 25 | -@property (nonatomic, copy) NSString *startTime; | |
| 26 | -@property (nonatomic, copy) NSString *endTime; | |
| 22 | +/** | |
| 23 | + * @abstract 初始化 | |
| 24 | + * @param type TradingRecordDetailType | |
| 25 | + * @param model CNLiveTradingRecordListModel对象 | |
| 26 | + * @param date 2019年12月 | |
| 27 | + * @param startTime 开始时间 每个月第一天的13位时间戳 | |
| 28 | + * @param endTime 结束时间 每个月最后一天的13位时间戳 | |
| 29 | + * @return instancetype 控制器对象 | |
| 30 | + */ | |
| 31 | +- (instancetype)initWithType:(TradingRecordDetailType)type model:(CNLiveTradingRecordListModel *)model date:(NSString *)date startTime:(NSString *)startTime endTime:(NSString *)endTime; | |
| 32 | + | |
| 33 | +- (instancetype)init NS_UNAVAILABLE; | |
| 34 | ++ (instancetype)new NS_UNAVAILABLE; | |
| 27 | 35 | |
| 28 | 36 | @end | ... | ... |
CNLiveBalanceModule/Classes/TradingRecord/CNLiveTradingRecordDetailController.m
| ... | ... | @@ -34,10 +34,29 @@ |
| 34 | 34 | @property (nonatomic, strong) CNLiveTradingRecordDetailHeaderView *headerView; |
| 35 | 35 | @property (nonatomic, strong) NSMutableArray *data; |
| 36 | 36 | |
| 37 | +@property (nonatomic, strong) CNLiveTradingRecordListModel *model; | |
| 38 | +@property (nonatomic, assign) TradingRecordDetailType type; | |
| 39 | + | |
| 40 | +@property (nonatomic, copy) NSString *date; | |
| 41 | +@property (nonatomic, copy) NSString *startTime; | |
| 42 | +@property (nonatomic, copy) NSString *endTime; | |
| 43 | + | |
| 37 | 44 | @end |
| 38 | 45 | |
| 39 | 46 | @implementation CNLiveTradingRecordDetailController |
| 40 | 47 | static const CGFloat height = 80; |
| 48 | +#pragma mark - 初始化 | |
| 49 | +- (instancetype)initWithType:(TradingRecordDetailType)type model:(CNLiveTradingRecordListModel *)model date:(NSString *)date startTime:(NSString *)startTime endTime:(NSString *)endTime{ | |
| 50 | + if(self = [super init]){ | |
| 51 | + self.type = type; | |
| 52 | + self.model = model; | |
| 53 | + | |
| 54 | + self.date = date; | |
| 55 | + self.startTime = startTime; | |
| 56 | + self.endTime = endTime; | |
| 57 | + } | |
| 58 | + return self; | |
| 59 | +} | |
| 41 | 60 | |
| 42 | 61 | #pragma mark - 加载数据 |
| 43 | 62 | - (void)loadData { | ... | ... |
CNLiveBalanceModule/Classes/PayCenter/CNLivePayCenterCell.h renamed to CNLiveBalanceModule/Classes/View/CNLivePayCenterCell.h
CNLiveBalanceModule/Classes/PayCenter/CNLivePayCenterCell.m renamed to CNLiveBalanceModule/Classes/View/CNLivePayCenterCell.m