Commit dc0a557f419c607de9d3df63d3b1105f02eb0214
1 parent
21685f37
修复积分bug0.3.0
Showing
4 changed files
with
24 additions
and
1 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.2.9' | 11 | + s.version = '0.3.0' |
| 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/CNCMine/Present/CNMinePresent.h
| @@ -59,6 +59,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -59,6 +59,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 59 | /// @param block 返回是否展示状态 | 59 | /// @param block 返回是否展示状态 |
| 60 | + (void)requestCommunitySucceed:(void(^)(BOOL isCommunity))block; | 60 | + (void)requestCommunitySucceed:(void(^)(BOOL isCommunity))block; |
| 61 | 61 | ||
| 62 | ++ (void)getTaskList; | ||
| 62 | @end | 63 | @end |
| 63 | 64 | ||
| 64 | NS_ASSUME_NONNULL_END | 65 | NS_ASSUME_NONNULL_END |
CNLiveCMineModule/Classes/CNCMine/Present/CNMinePresent.m
| @@ -640,4 +640,21 @@ | @@ -640,4 +640,21 @@ | ||
| 640 | 640 | ||
| 641 | }]; | 641 | }]; |
| 642 | } | 642 | } |
| 643 | + | ||
| 644 | ++ (void)getTaskList | ||
| 645 | +{ | ||
| 646 | + NSDictionary *params = @{@"sid":CNUserShareModel.uid?CNUserShareModel.uid:@""}; | ||
| 647 | + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNIntegralGetTasksUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | ||
| 648 | + if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { | ||
| 649 | + if([responseObject isKindOfClass:[NSDictionary class]]){ | ||
| 650 | + //存入任务列表 | ||
| 651 | + if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){ | ||
| 652 | + [CNCSubMinePresent writeJsonName:@"TaskList.json" dic:responseObject[@"data"]]; | ||
| 653 | + } | ||
| 654 | + } | ||
| 655 | + } | ||
| 656 | + | ||
| 657 | + }]; | ||
| 658 | +} | ||
| 659 | + | ||
| 643 | @end | 660 | @end |
CNLiveCMineModule/Classes/CNCMine/ViewController/CNLiveMineVC.m
| @@ -88,7 +88,9 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -88,7 +88,9 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 88 | self.toolView.frame = CGRectMake(self.orderView.left, self.activityView.bottom + DS_adapt_length(16), self.orderView.width, DS_adapt_length(145 + 42*RATIO)); | 88 | self.toolView.frame = CGRectMake(self.orderView.left, self.activityView.bottom + DS_adapt_length(16), self.orderView.width, DS_adapt_length(145 + 42*RATIO)); |
| 89 | self.versionLabel.frame = CGRectMake(self.orderView.left, self.toolView.bottom + DS_adapt_length(16), kScreenWidth, DS_adapt_length(16)); | 89 | self.versionLabel.frame = CGRectMake(self.orderView.left, self.toolView.bottom + DS_adapt_length(16), kScreenWidth, DS_adapt_length(16)); |
| 90 | self.bgScrollView.contentSize = CGSizeMake(kScreenWidth, self.versionLabel.bottom + DS_adapt_length(8)); | 90 | self.bgScrollView.contentSize = CGSizeMake(kScreenWidth, self.versionLabel.bottom + DS_adapt_length(8)); |
| 91 | + [self getTaskList]; | ||
| 91 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addTolks) name:CNSobotNotification_NewMessage object:nil]; | 92 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addTolks) name:CNSobotNotification_NewMessage object:nil]; |
| 93 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getTaskList) name:UIApplicationDidBecomeActiveNotification object:nil]; | ||
| 92 | } | 94 | } |
| 93 | 95 | ||
| 94 | - (void)viewWillAppear:(BOOL)animated | 96 | - (void)viewWillAppear:(BOOL)animated |
| @@ -155,6 +157,9 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -155,6 +157,9 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 155 | { | 157 | { |
| 156 | return YES; | 158 | return YES; |
| 157 | } | 159 | } |
| 160 | +- (void)getTaskList{ | ||
| 161 | + [CNMinePresent getTaskList]; | ||
| 162 | +} | ||
| 158 | - (void)addTolks{ | 163 | - (void)addTolks{ |
| 159 | if ([[CNLiveCMineService shareMineProtocol] haveUnreadMessage]) { | 164 | if ([[CNLiveCMineService shareMineProtocol] haveUnreadMessage]) { |
| 160 | self.topImageView.codesView.model = [CNMinePresent dataSourceCodesModel:@"."]; | 165 | self.topImageView.codesView.model = [CNMinePresent dataSourceCodesModel:@"."]; |