Commit 07cbecbc63201bf78cca38ec442752162b63dcb9
1 parent
46c7d290
no message
Showing
1 changed file
with
91 additions
and
0 deletions
CNLiveIntegralModule/Classes/Module/CNLiveIntegralService.m
| ... | ... | @@ -8,7 +8,20 @@ |
| 8 | 8 | |
| 9 | 9 | #import "CNLiveIntegralService.h" |
| 10 | 10 | #import "CNLiveServices.h" |
| 11 | +// 任务列表 | |
| 11 | 12 | #import "CNLiveTaskListController.h" |
| 13 | +// 积分明细 | |
| 14 | +#import "CNLiveIntegralDetailsController.h" | |
| 15 | + | |
| 16 | +// 增加积分 | |
| 17 | +#import "CNLiveAddScoreManager.h" | |
| 18 | +#import "CNLiveAddScoreView.h" | |
| 19 | + | |
| 20 | +// 金币下落 | |
| 21 | +#import "CNLiveGoldWhereaboutsView.h" | |
| 22 | + | |
| 23 | +// 签到 | |
| 24 | +#import "CNLiveSignInView.h" | |
| 12 | 25 | |
| 13 | 26 | |
| 14 | 27 | @BeeHiveService(CNLiveMineServiceProtocol,CNLiveIntegralService) |
| ... | ... | @@ -18,6 +31,7 @@ |
| 18 | 31 | |
| 19 | 32 | @implementation CNLiveIntegralService |
| 20 | 33 | |
| 34 | +#pragma mark - 任务列表 | |
| 21 | 35 | // 任务列表 |
| 22 | 36 | - (UIViewController *)getTaskListViewController { |
| 23 | 37 | return [CNLiveTaskListController new]; |
| ... | ... | @@ -28,5 +42,82 @@ |
| 28 | 42 | // [CNLivePageJumpManager pushViewController:vc]; |
| 29 | 43 | } |
| 30 | 44 | |
| 45 | +#pragma mark - 积分明细 | |
| 46 | +// 积分明细 | |
| 47 | +- (UIViewController *)getIntegralDetailsViewController { | |
| 48 | + return [CNLiveIntegralDetailsController new]; | |
| 49 | +} | |
| 50 | + | |
| 51 | +- (void)pushToIntegralDetailsViewController { | |
| 52 | + CNLiveIntegralDetailsController *vc = [[CNLiveIntegralDetailsController alloc]init]; | |
| 53 | +// [CNLivePageJumpManager pushViewController:vc]; | |
| 54 | +} | |
| 55 | + | |
| 56 | +#pragma mark - 增加积分 | |
| 57 | +// 请求 | |
| 58 | +//延时调用 | |
| 59 | +- (void)requestTime:(NSInteger)time taskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block{ | |
| 60 | + [[CNLiveAddScoreManager manager] requestTime:time taskId:taskId contentId:contentId block:block]; | |
| 61 | +} | |
| 62 | +//取消延时 | |
| 63 | +- (void)cancelSendRequest{ | |
| 64 | + [[CNLiveAddScoreManager manager] cancelSendRequest]; | |
| 65 | +} | |
| 66 | + | |
| 67 | +//首次登录加积分 | |
| 68 | +- (void)firstLogin:(RequestCompleted _Nullable)block{ | |
| 69 | + [CNLiveAddScoreManager firstLogin:block]; | |
| 70 | +} | |
| 71 | + | |
| 72 | +//直接调用 | |
| 73 | +- (void)requestTaskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block{ | |
| 74 | + [CNLiveAddScoreManager requestTaskId:taskId contentId:contentId block:block]; | |
| 75 | +} | |
| 76 | + | |
| 77 | +- (BOOL)judgeIsAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{ | |
| 78 | + return [CNLiveAddScoreManager judgeIsAddScoreJson:name taskType:taskType taskId:taskId]; | |
| 79 | +} | |
| 80 | + | |
| 81 | +- (BOOL)writeJsonName:(NSString *)name dic:(NSDictionary *)dic{ | |
| 82 | + return [CNLiveAddScoreManager writeJsonName:name dic:dic]; | |
| 83 | +} | |
| 84 | + | |
| 85 | +// 视图 | |
| 86 | ++ (void)showAddScoreViewWithDesc:(NSString *)desc score:(NSString *)score{ | |
| 87 | + [CNLiveAddScoreView showAddScoreViewWithDesc:desc score:score]; | |
| 88 | +} | |
| 89 | ++ (void)showAddScoreViewWithDesc:(NSString *)desc login:(NSString *)login delegate:(id<CNLiveAddScoreViewDelegate>)delegate{ | |
| 90 | + [CNLiveAddScoreView showAddScoreViewWithDesc:desc login:login delegate:delegate]; | |
| 91 | +} | |
| 92 | + | |
| 93 | ++ (void)hideAddScoreView{ | |
| 94 | + [CNLiveAddScoreView hide]; | |
| 95 | +} | |
| 96 | + | |
| 97 | +#pragma mark - 金币下落 | |
| 98 | +// 游客模式浏览加积分 | |
| 99 | ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc delegate:(id<CNLiveGoldWhereaboutsViewDelegate>) delegate{ | |
| 100 | + [CNLiveGoldWhereaboutsView showGoldWhereaboutsViewWithDesc:desc delegate:delegate]; | |
| 101 | +} | |
| 102 | + | |
| 103 | +// 默认展示添加积分视图 | |
| 104 | ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc score:(NSString *)score{ | |
| 105 | + [CNLiveGoldWhereaboutsView showGoldWhereaboutsViewWithDesc:desc score:score]; | |
| 106 | + | |
| 107 | +} | |
| 108 | + | |
| 109 | +// 默认签到 | |
| 110 | ++ (void)showGoldWhereaboutsViewModel:(CNLiveScoreModel *)model controller:(id<CNLiveSignInViewDelegate>)controller{ | |
| 111 | + [CNLiveGoldWhereaboutsView showGoldWhereaboutsViewModel:model controller:controller]; | |
| 112 | + | |
| 113 | +} | |
| 114 | ++ (void)hideGoldWhereaboutsView{ | |
| 115 | + [CNLiveGoldWhereaboutsView hide]; | |
| 116 | +} | |
| 117 | + | |
| 118 | +#pragma mark - 签到 | |
| 119 | ++ (void)showSignInView:(NSString *)score scores:(NSString *)scores day:(NSInteger)day url:(NSString *)url delegate:(id<CNLiveSignInViewDelegate>)delegate{ | |
| 120 | + [CNLiveSignInView showSignInView:score scores:scores day:day url:url delegate:delegate]; | |
| 121 | +} | |
| 31 | 122 | |
| 32 | 123 | @end | ... | ... |