Commit eb33d63d59dda22983e06efc2c7e662cd65c41b1
1 parent
93a42607
0.0.8
Showing
10 changed files
with
38 additions
and
26 deletions
CNLiveCMineModule.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 = 'CNLiveCMineModule' | 10 | s.name = 'CNLiveCMineModule' |
| 11 | - s.version = '0.0.7' | 11 | + s.version = '0.0.8' |
| 12 | s.summary = '网家家C端个人中心' | 12 | s.summary = '网家家C端个人中心' |
| 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. |
CNLiveCMineModule/Classes/inte/Controller/CNLiveCMineInteAnnouListViewController.m
| @@ -88,9 +88,9 @@ | @@ -88,9 +88,9 @@ | ||
| 88 | { | 88 | { |
| 89 | CNLiveCMineInteListSubModel * annouModel = self.annouModel.list[indexPath.row]; | 89 | CNLiveCMineInteListSubModel * annouModel = self.annouModel.list[indexPath.row]; |
| 90 | if ([annouModel.model isEqualToString:@"3"] || [annouModel.model isEqualToString:@"3_roof"]) { | 90 | if ([annouModel.model isEqualToString:@"3"] || [annouModel.model isEqualToString:@"3_roof"]) { |
| 91 | - BOOL isCont = [annouModel.shareUrl cn_containsString:@"?"]; | ||
| 92 | - NSString * shreUrl = [NSString stringWithFormat:@"%@%@contentId=%@",annouModel.shareUrl,isCont?@"&":@"?",annouModel.contentId]; | ||
| 93 | - [[CNLiveCMineService shareMineProtocol] pushCMineInteContentForCMainWebViewWithURL:shreUrl statue:CNLiveCMineIntePushWebViewStatueAnnotationDetail]; | 91 | +// BOOL isCont = [annouModel.shareUrl cn_containsString:@"?"]; |
| 92 | + NSString * shreUrl = [NSString stringWithFormat:@"/cnPointsAnnouncement.html?contentId=%@&isShowTitle=true",annouModel.contentId]; | ||
| 93 | + [[CNLiveCMineService shareMineProtocol] pushCMineInteContentForCMainWebViewWithURL:cn_WjjH5_Host(shreUrl) statue:CNLiveCMineIntePushWebViewStatueAnnotationDetail]; | ||
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| 96 | -(UIStatusBarStyle)preferredStatusBarStyle | 96 | -(UIStatusBarStyle)preferredStatusBarStyle |
CNLiveCMineModule/Classes/inte/Controller/CNLiveCMineInteDetaiListlViewController.m
| @@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
| 11 | @property (nonatomic, weak) CNLiveCMineInteDetailViewController * detailVC; | 11 | @property (nonatomic, weak) CNLiveCMineInteDetailViewController * detailVC; |
| 12 | @property (nonatomic, strong) CNLiveCMineInteDetailModel * listModel;//数据源 | 12 | @property (nonatomic, strong) CNLiveCMineInteDetailModel * listModel;//数据源 |
| 13 | @property (nonatomic, strong) CNLiveRefreshFooter * footerView;//加载 | 13 | @property (nonatomic, strong) CNLiveRefreshFooter * footerView;//加载 |
| 14 | +@property (nonatomic, strong) NSMutableArray * dataArray; | ||
| 14 | @property (nonatomic, assign) NSInteger pageNo; | 15 | @property (nonatomic, assign) NSInteger pageNo; |
| 15 | @end | 16 | @end |
| 16 | 17 | ||
| @@ -23,6 +24,7 @@ | @@ -23,6 +24,7 @@ | ||
| 23 | { | 24 | { |
| 24 | self = [super init]; | 25 | self = [super init]; |
| 25 | if (self) { | 26 | if (self) { |
| 27 | + _dataArray = [[NSMutableArray alloc] init]; | ||
| 26 | _currentMonth = currentMonth; | 28 | _currentMonth = currentMonth; |
| 27 | _currentInte = currentInte; | 29 | _currentInte = currentInte; |
| 28 | _currentType = currentType; | 30 | _currentType = currentType; |
| @@ -46,11 +48,13 @@ | @@ -46,11 +48,13 @@ | ||
| 46 | self.pageNo = pageNo; | 48 | self.pageNo = pageNo; |
| 47 | self.currentType = currentType; | 49 | self.currentType = currentType; |
| 48 | self.currentMonth = currentMonth; | 50 | self.currentMonth = currentMonth; |
| 49 | - [CNLiveCMineInteViewModel requestWithIntegraDetailWithCurrentMonth:currentMonth currentType:currentType pageNo:pageNo CompleterBlock:^(CNLiveCMineInteDetailModel * _Nonnull listModel, NSError * _Nonnull error) { | 51 | + [CNLiveCMineInteViewModel requestWithIntegraDetailWithCurrentMonth:currentMonth currentType:currentType pageNo:pageNo CompleterBlock:^(CNLiveCMineInteDetailModel * _Nonnull listModel, NSArray * _Nonnull dataArray, NSError * _Nonnull error) { |
| 50 | [self addMainRefreshView]; | 52 | [self addMainRefreshView]; |
| 51 | if (!error && listModel) { | 53 | if (!error && listModel) { |
| 52 | listModel.currentInte = weakSelf.currentInte; | 54 | listModel.currentInte = weakSelf.currentInte; |
| 53 | weakSelf.listModel = listModel; | 55 | weakSelf.listModel = listModel; |
| 56 | + if (pageNo == 1) weakSelf.dataArray = dataArray.mutableCopy; | ||
| 57 | + if (pageNo > 1) [weakSelf.dataArray addObjectsFromArray:dataArray]; | ||
| 54 | weakSelf.detailVC.headerView.detailModel = listModel; | 58 | weakSelf.detailVC.headerView.detailModel = listModel; |
| 55 | [weakSelf.tableView reloadData]; | 59 | [weakSelf.tableView reloadData]; |
| 56 | [weakSelf.tableView.mj_footer endRefreshing]; | 60 | [weakSelf.tableView.mj_footer endRefreshing]; |
| @@ -101,7 +105,7 @@ | @@ -101,7 +105,7 @@ | ||
| 101 | -(void)layoutTableView | 105 | -(void)layoutTableView |
| 102 | { | 106 | { |
| 103 | [super layoutTableView]; | 107 | [super layoutTableView]; |
| 104 | - self.tableView.height = kScreenHeight - kNavigationBarHeight - 44; | 108 | + self.tableView.height = kScreenHeight - kNavigationBarHeight - kVerticalBottomSafeHeight - 44; |
| 105 | } | 109 | } |
| 106 | #pragma mark - DZNEmptyDataSetSource Methods | 110 | #pragma mark - DZNEmptyDataSetSource Methods |
| 107 | - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView | 111 | - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView |
| @@ -146,7 +150,7 @@ | @@ -146,7 +150,7 @@ | ||
| 146 | 150 | ||
| 147 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | 151 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section |
| 148 | { | 152 | { |
| 149 | - return self.listModel.integralList.count; | 153 | + return self.dataArray.count; |
| 150 | } | 154 | } |
| 151 | 155 | ||
| 152 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | 156 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
| @@ -155,7 +159,7 @@ | @@ -155,7 +159,7 @@ | ||
| 155 | if (!cell) { | 159 | if (!cell) { |
| 156 | cell = [[CNLiveCMineDetailTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; | 160 | cell = [[CNLiveCMineDetailTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; |
| 157 | } | 161 | } |
| 158 | - cell.listModel = self.listModel.integralList[indexPath.row]; | 162 | + cell.listModel = self.dataArray[indexPath.row]; |
| 159 | return cell; | 163 | return cell; |
| 160 | } | 164 | } |
| 161 | 165 | ||
| @@ -166,9 +170,11 @@ | @@ -166,9 +170,11 @@ | ||
| 166 | 170 | ||
| 167 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | 171 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath |
| 168 | { | 172 | { |
| 169 | - CNLiveCMineInteDetailListModel * listModel = self.listModel.integralList[indexPath.row]; | 173 | + CNLiveCMineInteDetailListModel * listModel = self.dataArray[indexPath.row]; |
| 170 | if ([listModel.state isEqualToString:@"1"]) { | 174 | if ([listModel.state isEqualToString:@"1"]) { |
| 171 | - [[CNLiveCMineService shareMineProtocol] pushCMineInteContentForCMainWebViewWithURL:cn_API_Managemall(@"/html/select_good/1/#/pointsExchangeRecords?type=3") statue:CNLiveCMineIntePushWebViewStatueTask]; | 175 | + [[CNLiveCMineService shareMineProtocol] pushCMineInteContentForCMainWebViewWithURL:@"" statue:CNLiveCMineIntePushWebViewStatueCoupons]; |
| 176 | + } else if ([listModel.state isEqualToString:@"2"]) { | ||
| 177 | + [[CNLiveCMineService shareMineProtocol] pushCMineInteContentForCMainWebViewWithURL:@"" statue:CNLiveCMineIntePushWebViewStatueOrderList]; | ||
| 172 | } | 178 | } |
| 173 | } | 179 | } |
| 174 | 180 |
CNLiveCMineModule/Classes/inte/Controller/CNLiveCMineInteTaskListViewController.m
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | -(void)layoutTableView | 69 | -(void)layoutTableView |
| 70 | { | 70 | { |
| 71 | [super layoutTableView]; | 71 | [super layoutTableView]; |
| 72 | - self.tableView.height = kScreenHeight - kNavigationBarHeight - 184; | 72 | + self.tableView.height = kScreenHeight - kNavigationBarHeight - kVerticalBottomSafeHeight - 184; |
| 73 | } | 73 | } |
| 74 | #pragma mark - DZNEmptyDataSetSource Methods | 74 | #pragma mark - DZNEmptyDataSetSource Methods |
| 75 | - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView | 75 | - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView |
CNLiveCMineModule/Classes/inte/Model/CNLiveCMineInteModel.h
| @@ -182,7 +182,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -182,7 +182,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 182 | @property (nonatomic, copy) NSString *currentInte; | 182 | @property (nonatomic, copy) NSString *currentInte; |
| 183 | @end | 183 | @end |
| 184 | @interface CNLiveCMineInteDetailListModel : NSObject<NSCoding> | 184 | @interface CNLiveCMineInteDetailListModel : NSObject<NSCoding> |
| 185 | -/**1-跳转 2-不跳转*/ | 185 | +/**1-跳转优惠券 2-跳订单列表 3-不跳转*/ |
| 186 | @property (nonatomic, copy) NSString *state; | 186 | @property (nonatomic, copy) NSString *state; |
| 187 | /**积分*/ | 187 | /**积分*/ |
| 188 | @property (nonatomic, copy) NSString *integral; | 188 | @property (nonatomic, copy) NSString *integral; |
CNLiveCMineModule/Classes/inte/View/CNLiveCMineInteCollectionViewCell.m
| @@ -169,8 +169,8 @@ | @@ -169,8 +169,8 @@ | ||
| 169 | self.dateLabel.text = listModel.exchangeTime; | 169 | self.dateLabel.text = listModel.exchangeTime; |
| 170 | self.coinsLabel.text = listModel.integral; | 170 | self.coinsLabel.text = listModel.integral; |
| 171 | self.coinsLabel.textColor = [listModel.integral cn_containsString:@"-"]?UIColorHex(0x00C657):UIColorHex(0xF5A623); | 171 | self.coinsLabel.textColor = [listModel.integral cn_containsString:@"-"]?UIColorHex(0x00C657):UIColorHex(0xF5A623); |
| 172 | - self.lookButton.hidden = [listModel.state isEqualToString:@"2"]; | ||
| 173 | - if ([listModel.state isEqualToString:@"1"]) { | 172 | + self.lookButton.hidden = [listModel.state isEqualToString:@"3"]; |
| 173 | + if ([listModel.state isEqualToString:@"1"] || [listModel.state isEqualToString:@"2"]) { | ||
| 174 | __weak typeof(self) weakSelf = self; | 174 | __weak typeof(self) weakSelf = self; |
| 175 | [self.coinsLabel mas_updateConstraints:^(MASConstraintMaker *make) { | 175 | [self.coinsLabel mas_updateConstraints:^(MASConstraintMaker *make) { |
| 176 | make.centerY.mas_equalTo(weakSelf.contentView).offset(-10); | 176 | make.centerY.mas_equalTo(weakSelf.contentView).offset(-10); |
CNLiveCMineModule/Classes/inte/View/CNLiveCMineInteHeaderSignView.m
| @@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
| 56 | [self.topView addSubview:coinsView]; | 56 | [self.topView addSubview:coinsView]; |
| 57 | 57 | ||
| 58 | CGFloat item_w = (SCREEN_WIDTH - 60)/7; | 58 | CGFloat item_w = (SCREEN_WIDTH - 60)/7; |
| 59 | - CGFloat item_h = item_w * 1.33; | 59 | + CGFloat item_h = 60.0f;//item_w * 1.33; |
| 60 | for (int i = 0; i < 7; i++) { | 60 | for (int i = 0; i < 7; i++) { |
| 61 | UIView * temp_v = [[UIView alloc] initWithFrame:CGRectMake(i * (item_w + 5), 0, item_w, 90)]; | 61 | UIView * temp_v = [[UIView alloc] initWithFrame:CGRectMake(i * (item_w + 5), 0, item_w, 90)]; |
| 62 | temp_v.backgroundColor = [UIColor clearColor]; | 62 | temp_v.backgroundColor = [UIColor clearColor]; |
| @@ -69,12 +69,12 @@ | @@ -69,12 +69,12 @@ | ||
| 69 | [temp_v addSubview:coinsV]; | 69 | [temp_v addSubview:coinsV]; |
| 70 | [self.coinsViews addObject:coinsV]; | 70 | [self.coinsViews addObject:coinsV]; |
| 71 | 71 | ||
| 72 | - UIImageView * coins = [[UIImageView alloc] initWithFrame:CGRectMake((item_w - 30)/2, 10, 30, 30)]; | 72 | + UIImageView * coins = [[UIImageView alloc] initWithFrame:CGRectMake((item_w - 30)/2, 5, 30, 30)]; |
| 73 | coins.image = [CNLiveCMineService imageWithMineName:@"c_mine_content_gold_coins"]; | 73 | coins.image = [CNLiveCMineService imageWithMineName:@"c_mine_content_gold_coins"]; |
| 74 | coins.backgroundColor = [UIColor clearColor]; | 74 | coins.backgroundColor = [UIColor clearColor]; |
| 75 | [coinsV addSubview:coins]; | 75 | [coinsV addSubview:coins]; |
| 76 | 76 | ||
| 77 | - UILabel * numberLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 40, item_w, 20)]; | 77 | + UILabel * numberLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 35, item_w, 20)]; |
| 78 | numberLabel.backgroundColor = [UIColor clearColor]; | 78 | numberLabel.backgroundColor = [UIColor clearColor]; |
| 79 | numberLabel.textColor = [UIColor whiteColor]; | 79 | numberLabel.textColor = [UIColor whiteColor]; |
| 80 | numberLabel.textAlignment = NSTextAlignmentCenter; | 80 | numberLabel.textAlignment = NSTextAlignmentCenter; |
| @@ -114,15 +114,18 @@ | @@ -114,15 +114,18 @@ | ||
| 114 | }]; | 114 | }]; |
| 115 | [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) { | 115 | [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 116 | make.centerY.mas_equalTo(weakSelf.bottemView).offset(5); | 116 | make.centerY.mas_equalTo(weakSelf.bottemView).offset(5); |
| 117 | - make.left.mas_equalTo(weakSelf.bottemView.mas_left).offset(30); | 117 | + make.left.mas_equalTo(weakSelf.bottemView.mas_left).offset(10); |
| 118 | + make.height.mas_equalTo(30); | ||
| 119 | + make.width.mas_equalTo(40); | ||
| 118 | }]; | 120 | }]; |
| 119 | [self.moreView mas_makeConstraints:^(MASConstraintMaker *make) { | 121 | [self.moreView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 120 | make.centerY.mas_equalTo(weakSelf.iconView); | 122 | make.centerY.mas_equalTo(weakSelf.iconView); |
| 121 | make.right.mas_equalTo(weakSelf.bottemView.mas_right).offset(-20); | 123 | make.right.mas_equalTo(weakSelf.bottemView.mas_right).offset(-20); |
| 124 | + make.size.mas_equalTo(20); | ||
| 122 | }]; | 125 | }]; |
| 123 | [self.annouLabel mas_makeConstraints:^(MASConstraintMaker *make) { | 126 | [self.annouLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 124 | make.centerY.mas_equalTo(weakSelf.iconView); | 127 | make.centerY.mas_equalTo(weakSelf.iconView); |
| 125 | - make.left.mas_equalTo(weakSelf.iconView.mas_right).offset(20); | 128 | + make.left.mas_equalTo(weakSelf.iconView.mas_right).offset(10); |
| 126 | make.right.mas_equalTo(weakSelf.moreView.mas_left).offset(-10); | 129 | make.right.mas_equalTo(weakSelf.moreView.mas_left).offset(-10); |
| 127 | }]; | 130 | }]; |
| 128 | [self.clearButton mas_makeConstraints:^(MASConstraintMaker *make) { | 131 | [self.clearButton mas_makeConstraints:^(MASConstraintMaker *make) { |
| @@ -232,7 +235,7 @@ | @@ -232,7 +235,7 @@ | ||
| 232 | { | 235 | { |
| 233 | if (!_iconView) { | 236 | if (!_iconView) { |
| 234 | _iconView = [[UIImageView alloc] initWithFrame:CGRectZero]; | 237 | _iconView = [[UIImageView alloc] initWithFrame:CGRectZero]; |
| 235 | - _iconView.contentMode = UIViewContentModeScaleAspectFill; | 238 | + _iconView.contentMode = UIViewContentModeScaleAspectFit; |
| 236 | _iconView.backgroundColor = [UIColor whiteColor]; | 239 | _iconView.backgroundColor = [UIColor whiteColor]; |
| 237 | _iconView.image = [CNLiveCMineService imageWithMineName:@"c_mine_content_announ"]; | 240 | _iconView.image = [CNLiveCMineService imageWithMineName:@"c_mine_content_announ"]; |
| 238 | } | 241 | } |
| @@ -242,7 +245,7 @@ | @@ -242,7 +245,7 @@ | ||
| 242 | { | 245 | { |
| 243 | if (!_moreView) { | 246 | if (!_moreView) { |
| 244 | _moreView = [[UIImageView alloc] initWithFrame:CGRectZero]; | 247 | _moreView = [[UIImageView alloc] initWithFrame:CGRectZero]; |
| 245 | - _moreView.contentMode = UIViewContentModeScaleAspectFill; | 248 | + _moreView.contentMode = UIViewContentModeScaleAspectFit; |
| 246 | _moreView.backgroundColor = [UIColor whiteColor]; | 249 | _moreView.backgroundColor = [UIColor whiteColor]; |
| 247 | _moreView.image = [CNLiveCMineService imageWithMineName:@"c_mine_skip_more"]; | 250 | _moreView.image = [CNLiveCMineService imageWithMineName:@"c_mine_skip_more"]; |
| 248 | } | 251 | } |
CNLiveCMineModule/Classes/inte/ViewModel/CNLiveCMineInteViewModel.h
| @@ -23,7 +23,9 @@ typedef enum : NSUInteger { | @@ -23,7 +23,9 @@ typedef enum : NSUInteger { | ||
| 23 | typedef enum : NSUInteger { | 23 | typedef enum : NSUInteger { |
| 24 | CNLiveCMineIntePushWebViewStatueMall,//商城 调主工程 | 24 | CNLiveCMineIntePushWebViewStatueMall,//商城 调主工程 |
| 25 | CNLiveCMineIntePushWebViewStatueRule,//积分规则 调主工程 | 25 | CNLiveCMineIntePushWebViewStatueRule,//积分规则 调主工程 |
| 26 | - CNLiveCMineIntePushWebViewStatueTask,//积分乐园 调主工程 | 26 | + CNLiveCMineIntePushWebViewStatueTask,//积分任务 调主工程 |
| 27 | + CNLiveCMineIntePushWebViewStatueCoupons,//优惠券 调主工程 | ||
| 28 | + CNLiveCMineIntePushWebViewStatueOrderList,//订单列表 调主工程 | ||
| 27 | CNLiveCMineIntePushWebViewStatueExchange,//积分兑换 调主工程 | 29 | CNLiveCMineIntePushWebViewStatueExchange,//积分兑换 调主工程 |
| 28 | CNLiveCMineIntePushWebViewStatueAnnotationDetail,//公告详情页 调主工程 | 30 | CNLiveCMineIntePushWebViewStatueAnnotationDetail,//公告详情页 调主工程 |
| 29 | } CNLiveCMineIntePushWebViewStatue; | 31 | } CNLiveCMineIntePushWebViewStatue; |
| @@ -45,7 +47,7 @@ typedef void(^ClickActionBlock)(CNLiveCMineInteScoreModel * scoreModel, | @@ -45,7 +47,7 @@ typedef void(^ClickActionBlock)(CNLiveCMineInteScoreModel * scoreModel, | ||
| 45 | /// @param currentType 1-全部 2-获取 3-支出 | 47 | /// @param currentType 1-全部 2-获取 3-支出 |
| 46 | /// @param pageNo 页码(默认1) | 48 | /// @param pageNo 页码(默认1) |
| 47 | /// @param completerBlock 结果返回 | 49 | /// @param completerBlock 结果返回 |
| 48 | -+(void)requestWithIntegraDetailWithCurrentMonth:(NSString *)currentMonth currentType:(NSInteger)currentType pageNo:(NSInteger)pageNo CompleterBlock:(void(^)(CNLiveCMineInteDetailModel * listModel,NSError *error))completerBlock; | 50 | ++(void)requestWithIntegraDetailWithCurrentMonth:(NSString *)currentMonth currentType:(NSInteger)currentType pageNo:(NSInteger)pageNo CompleterBlock:(void(^)(CNLiveCMineInteDetailModel * listModel,NSArray * dataArray,NSError *error))completerBlock; |
| 49 | 51 | ||
| 50 | @end | 52 | @end |
| 51 | 53 |
CNLiveCMineModule/Classes/inte/ViewModel/CNLiveCMineInteViewModel.m
| @@ -148,7 +148,7 @@ | @@ -148,7 +148,7 @@ | ||
| 148 | /// @param currentType 1-全部 2-获取 3-支出 | 148 | /// @param currentType 1-全部 2-获取 3-支出 |
| 149 | /// @param pageNo 页码(默认1) | 149 | /// @param pageNo 页码(默认1) |
| 150 | /// @param completerBlock 结果返回 | 150 | /// @param completerBlock 结果返回 |
| 151 | -+(void)requestWithIntegraDetailWithCurrentMonth:(NSString *)currentMonth currentType:(NSInteger)currentType pageNo:(NSInteger)pageNo CompleterBlock:(void(^)(CNLiveCMineInteDetailModel *, NSError *))completerBlock | 151 | ++(void)requestWithIntegraDetailWithCurrentMonth:(NSString *)currentMonth currentType:(NSInteger)currentType pageNo:(NSInteger)pageNo CompleterBlock:(void(^)(CNLiveCMineInteDetailModel *, NSArray *,NSError *))completerBlock |
| 152 | { | 152 | { |
| 153 | NSDictionary * paramDict = @{ | 153 | NSDictionary * paramDict = @{ |
| 154 | @"sid":[CNUserInfoManager manager].userInfoModel.uid, | 154 | @"sid":[CNUserInfoManager manager].userInfoModel.uid, |
| @@ -162,7 +162,8 @@ | @@ -162,7 +162,8 @@ | ||
| 162 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:cn_API_Host(@"/Daren/integral/integralRecordNew.action") Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | 162 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:cn_API_Host(@"/Daren/integral/integralRecordNew.action") Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { |
| 163 | CNLiveCMineInteDetailModel * listModel = [CNLiveCMineInteDetailModel mj_objectWithKeyValues:responseObject]; | 163 | CNLiveCMineInteDetailModel * listModel = [CNLiveCMineInteDetailModel mj_objectWithKeyValues:responseObject]; |
| 164 | listModel.date_string = currentMonth; | 164 | listModel.date_string = currentMonth; |
| 165 | - if (completerBlock) completerBlock(listModel,error); | 165 | + NSMutableArray * tempArray = listModel.integralList.mutableCopy; |
| 166 | + if (completerBlock) completerBlock(listModel,tempArray,error); | ||
| 166 | }]; | 167 | }]; |
| 167 | } | 168 | } |
| 168 | 169 |
Example/CNLiveCMineModule/CNLIVEAppDelegate.m
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | 28 | ||
| 29 | [super application:application didFinishLaunchingWithOptions:launchOptions]; | 29 | [super application:application didFinishLaunchingWithOptions:launchOptions]; |
| 30 | 30 | ||
| 31 | - [CNUserInfoManager manager].userInfoModel.uid = @"353001"; | 31 | + [CNUserInfoManager manager].userInfoModel.uid = @"10510277";//@"353001"; |
| 32 | 32 | ||
| 33 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | 33 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; |
| 34 | self.window.backgroundColor = [UIColor whiteColor]; | 34 | self.window.backgroundColor = [UIColor whiteColor]; |