Commit 46c7d29057df33084a85605377a531af7ec51835

Authored by zhangxiaowen
1 parent b73ae247

no message

Showing 29 changed files with 260 additions and 379 deletions
CNLiveIntegralModule.podspec
@@ -41,11 +41,13 @@ TODO: 网家家-积分模块. @@ -41,11 +41,13 @@ TODO: 网家家-积分模块.
41 # Controller 41 # Controller
42 s.subspec 'Controller' do |ss| 42 s.subspec 'Controller' do |ss|
43 ss.source_files = 'CNLiveIntegralModule/Classes/Controller/*.{h,m}' 43 ss.source_files = 'CNLiveIntegralModule/Classes/Controller/*.{h,m}'
  44 + ss.dependency 'CNLiveIntegralModule/Tools'
44 end 45 end
45 46
46 # View 47 # View
47 s.subspec 'View' do |ss| 48 s.subspec 'View' do |ss|
48 ss.source_files = 'CNLiveIntegralModule/Classes/View/*.{h,m}' 49 ss.source_files = 'CNLiveIntegralModule/Classes/View/*.{h,m}'
  50 + ss.dependency 'CNLiveIntegralModule/Model'
49 end 51 end
50 52
51 # Model 53 # Model
@@ -53,6 +55,12 @@ TODO: 网家家-积分模块. @@ -53,6 +55,12 @@ TODO: 网家家-积分模块.
53 ss.source_files = 'CNLiveIntegralModule/Classes/Model/*.{h,m}' 55 ss.source_files = 'CNLiveIntegralModule/Classes/Model/*.{h,m}'
54 end 56 end
55 57
  58 + # Tools
  59 + s.subspec 'Tools' do |ss|
  60 + ss.source_files = 'CNLiveIntegralModule/Classes/Tools/*.{h,m}'
  61 + ss.dependency 'CNLiveIntegralModule/View'
  62 + end
  63 +
56 s.resource_bundles = { 64 s.resource_bundles = {
57 'CNLiveIntegralModule' => ['CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets'] 65 'CNLiveIntegralModule' => ['CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets']
58 } 66 }
CNLiveIntegralModule/Classes/Controller/CNLiveIntegralDetailsController.m
@@ -19,9 +19,8 @@ @@ -19,9 +19,8 @@
19 #import "CNUserInfoManager.h" 19 #import "CNUserInfoManager.h"
20 #import "CNLiveUserAgreementManager.h" 20 #import "CNLiveUserAgreementManager.h"
21 21
22 -#import "CNIntegralDetailsTableViewCell.h"  
23 -#import "CNScoreModel.h"  
24 -#import "CNLiveIntegralRulesController.h" 22 +#import "CNLiveIntegralDetailsTableViewCell.h"
  23 +#import "CNLiveScoreModel.h"
25 #import "CNLiveIntegralNavigationBar.h" 24 #import "CNLiveIntegralNavigationBar.h"
26 25
27 @interface CNLiveIntegralDetailsController ()<UITableViewDelegate,UITableViewDataSource,CNLiveIntegralNavigationBarDelegate> 26 @interface CNLiveIntegralDetailsController ()<UITableViewDelegate,UITableViewDataSource,CNLiveIntegralNavigationBarDelegate>
@@ -66,7 +65,7 @@ @@ -66,7 +65,7 @@
66 if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { 65 if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {
67 _isRefreshing = NO; 66 _isRefreshing = NO;
68 _pageNo++; 67 _pageNo++;
69 - NSArray *arr = [CNScoreModel mj_objectArrayWithKeyValuesArray:responseObject[@"data"][@"list"]]; 68 + NSArray *arr = [CNLiveScoreModel mj_objectArrayWithKeyValuesArray:responseObject[@"data"][@"list"]];
70 [self.data addObjectsFromArray:arr]; 69 [self.data addObjectsFromArray:arr];
71 if (arr.count < 10) { 70 if (arr.count < 10) {
72 [self.tableView.mj_footer endRefreshingWithNoMoreData]; 71 [self.tableView.mj_footer endRefreshingWithNoMoreData];
@@ -95,6 +94,7 @@ @@ -95,6 +94,7 @@
95 } 94 }
96 } 95 }
97 96
  97 +#pragma mark - 生命周期
98 - (void)viewWillAppear:(BOOL)animated{ 98 - (void)viewWillAppear:(BOOL)animated{
99 [super viewWillAppear:animated]; 99 [super viewWillAppear:animated];
100 self.navigationController.navigationBar.hidden = YES; 100 self.navigationController.navigationBar.hidden = YES;
@@ -133,7 +133,7 @@ @@ -133,7 +133,7 @@
133 133
134 } 134 }
135 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 135 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
136 - CNIntegralDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNIntegralDetailsTableViewCell forIndexPath:indexPath]; 136 + CNLiveIntegralDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveIntegralDetailsTableViewCell forIndexPath:indexPath];
137 cell.selectionStyle = UITableViewCellSelectionStyleNone; 137 cell.selectionStyle = UITableViewCellSelectionStyleNone;
138 cell.model = self.data[indexPath.row]; 138 cell.model = self.data[indexPath.row];
139 return cell; 139 return cell;
@@ -191,7 +191,7 @@ @@ -191,7 +191,7 @@
191 _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 191 _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
192 _tableView.showsVerticalScrollIndicator = NO; 192 _tableView.showsVerticalScrollIndicator = NO;
193 _tableView.showsHorizontalScrollIndicator = NO; 193 _tableView.showsHorizontalScrollIndicator = NO;
194 - [_tableView registerClass:[CNIntegralDetailsTableViewCell class] forCellReuseIdentifier:kCNIntegralDetailsTableViewCell]; 194 + [_tableView registerClass:[CNLiveIntegralDetailsTableViewCell class] forCellReuseIdentifier:kCNLiveIntegralDetailsTableViewCell];
195 __weak __typeof(self)weakSelf = self; 195 __weak __typeof(self)weakSelf = self;
196 MJRefreshAutoNormalFooter *refreshView = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ 196 MJRefreshAutoNormalFooter *refreshView = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
197 [weakSelf loadMoreData]; 197 [weakSelf loadMoreData];
CNLiveIntegralModule/Classes/Controller/CNLiveIntegralRulesController.h deleted 100644 → 0
1 -//  
2 -// CNLiveIntegralRulesController.h  
3 -// CNLiveIntegralModule  
4 -//  
5 -// Created by CNLive-zxw on 2019/3/12.  
6 -// Copyright © 2019年 cnlive. All rights reserved.  
7 -//  
8 -  
9 -// 积分规则  
10 -  
11 -#import "CNCommonViewController.h"  
12 -  
13 -NS_ASSUME_NONNULL_BEGIN  
14 -  
15 -@interface CNLiveIntegralRulesController : CNCommonViewController  
16 -@property (nonatomic, copy) NSString *url;  
17 -@property (nonatomic, copy) NSString *name;  
18 -@end  
19 -  
20 -NS_ASSUME_NONNULL_END  
CNLiveIntegralModule/Classes/Controller/CNLiveIntegralRulesController.m deleted 100644 → 0
1 -//  
2 -// CNLiveIntegralRulesController.m  
3 -// CNLiveIntegralModule  
4 -//  
5 -// Created by CNLive-zxw on 2019/3/12.  
6 -// Copyright © 2019年 cnlive. All rights reserved.  
7 -//  
8 -  
9 -#import "CNLiveIntegralRulesController.h"  
10 -#import <WebKit/WebKit.h>  
11 -#import "QMUIKit.h"  
12 -#import <Masonry/Masonry.h>  
13 -#import <SDWebImage/SDWebImage.h>  
14 -  
15 -@interface CNLiveIntegralRulesController ()<WKNavigationDelegate,WKUIDelegate>  
16 -@property (nonatomic, weak) WKWebView *webView;  
17 -  
18 -@end  
19 -  
20 -@implementation CNLiveIntegralRulesController  
21 -#pragma mark - Data  
22 -- (void)setData{  
23 - [QMUITips showLoadingInView:self.view];  
24 - [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];  
25 -}  
26 -- (void)viewDidLoad {  
27 - [super viewDidLoad];  
28 - // Do any additional setup after loading the view.  
29 - [self createUI];  
30 - [self layoutUI];  
31 - [self setData];  
32 -  
33 -}  
34 -- (void)dealloc{  
35 -  
36 -}  
37 -#pragma mark - UI  
38 -- (void)createUI{  
39 - self.title = self.name;  
40 -  
41 - WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc]init];  
42 - config.preferences = [WKPreferences new];  
43 - config.preferences.javaScriptEnabled = YES;  
44 - config.preferences.minimumFontSize = 15;  
45 - config.preferences.javaScriptCanOpenWindowsAutomatically = YES;  
46 -  
47 - WKUserContentController *userController = [WKUserContentController new];  
48 - NSString *js = @"var script = document.createElement('meta');"  
49 - "script.name = 'viewport';"  
50 - "script.content=\"width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no\";"  
51 - "document.getElementsByTagName('body')[0].appendChild(script);";  
52 - WKUserScript *script = [[WKUserScript alloc] initWithSource:js injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:NO];  
53 -  
54 - NSMutableString *javascript = [NSMutableString string];  
55 - [javascript appendString:@"document.documentElement.style.webkitTouchCallout='none';"];//禁止长按  
56 - [javascript appendString:@"document.documentElement.style.webkitUserSelect='none';"];//禁止选择  
57 - WKUserScript *noneSelectScript = [[WKUserScript alloc] initWithSource:javascript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];  
58 - [userController addUserScript:script];  
59 - [userController addUserScript:noneSelectScript];  
60 - config.userContentController = userController;  
61 -  
62 - WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:config];  
63 - webView.navigationDelegate = self;  
64 - webView.UIDelegate = self;  
65 - webView.scrollView.bounces = NO;  
66 - webView.scrollView.exclusiveTouch = NO;  
67 - webView.scrollView.showsVerticalScrollIndicator = NO;  
68 - webView.scrollView.showsHorizontalScrollIndicator = NO;  
69 - [self.view addSubview:webView];  
70 - _webView = webView;  
71 -  
72 -}  
73 -- (void)layoutUI{  
74 - [_webView mas_makeConstraints:^(MASConstraintMaker *make) {  
75 - make.top.equalTo(self.view.mas_top).with.offset(0);  
76 - make.left.equalTo(self.view.mas_left).with.offset(0);  
77 - make.right.equalTo(self.view.mas_right).with.offset(-0);  
78 - make.bottom.equalTo(self.view.mas_bottom).with.offset(-0);  
79 -  
80 - }];  
81 -  
82 -}  
83 -#pragma mark - WKNavigationDelegate  
84 -// 页面加载完成之后调用  
85 -- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{  
86 - [QMUITips hideAllTipsInView:self.view];  
87 -  
88 -}  
89 -  
90 -// 页面加载失败时调用  
91 -- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(nonnull NSError *)error{  
92 - [QMUITips hideAllTipsInView:self.view];  
93 -  
94 - NSString *errorMsg = @"接口请求失败,请稍后再试!";  
95 - //404->102->返回按钮  
96 - if (error.code==-1009||error.code==102) {  
97 - errorMsg = @"网络连接失败,请稍后再试!";  
98 - [self showEmptyViewWithImage:[UIImage imageNamed:@"wufalianjie"] text:errorMsg detailText:@" " buttonTitle:@" 返回 " buttonAction:@selector(goBack)];  
99 - self.emptyView.backgroundColor = [UIColor whiteColor];  
100 -  
101 - } else {  
102 - [self showEmptyViewWithImage:[UIImage imageNamed:@"wufalianjie"] text:errorMsg detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(setData)];  
103 - self.emptyView.backgroundColor = [UIColor whiteColor];  
104 -  
105 - }  
106 - [self setCNAPIErrorEmptyView];  
107 -  
108 -}  
109 -- (void)goBack{  
110 - [self.navigationController popViewControllerAnimated:YES];  
111 -  
112 -}  
113 -/*  
114 -#pragma mark - Navigation  
115 -  
116 -// In a storyboard-based application, you will often want to do a little preparation before navigation  
117 -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {  
118 - // Get the new view controller using [segue destinationViewController].  
119 - // Pass the selected object to the new view controller.  
120 -}  
121 -*/  
122 -  
123 -@end  
CNLiveIntegralModule/Classes/Controller/CNLiveTaskListController.m
@@ -16,10 +16,10 @@ @@ -16,10 +16,10 @@
16 #import "CNLiveServices.h" 16 #import "CNLiveServices.h"
17 17
18 //#import "CNLiveMineNavigationBar.h" 18 //#import "CNLiveMineNavigationBar.h"
19 -#import "CNTaskListTableViewCell.h"  
20 -#import "CNTaskListModel.h"  
21 -#import "CNGoldWhereaboutsView.h"//金币下落  
22 -#import "CNAddScoreView.h" 19 +#import "CNLiveTaskListTableViewCell.h"
  20 +#import "CNLiveTaskListModel.h"
  21 +#import "CNLiveGoldWhereaboutsView.h"//金币下落
  22 +#import "CNLiveAddScoreView.h"
23 23
24 #import "CNLiveNetworking.h" 24 #import "CNLiveNetworking.h"
25 #import "CNLiveEnvironment.h" 25 #import "CNLiveEnvironment.h"
@@ -35,16 +35,16 @@ @@ -35,16 +35,16 @@
35 //#import "CNFirendNewListViewController.h"//生活圈 35 //#import "CNFirendNewListViewController.h"//生活圈
36 //#import "CNReportAndComplaintWebController.h"//帮助与反馈 36 //#import "CNReportAndComplaintWebController.h"//帮助与反馈
37 //#import "CNGifFaceListHeaderView.h" 37 //#import "CNGifFaceListHeaderView.h"
38 -#import "CNTaskListHeadView.h" 38 +#import "CNLiveTaskListHeadView.h"
39 #import "CNLiveIntegralDetailsController.h"//积分明细 39 #import "CNLiveIntegralDetailsController.h"//积分明细
40 -#import "CNAddScoreManager.h" 40 +#import "CNLiveAddScoreManager.h"
41 //#import "CNTouristsLoginTipsView.h" 41 //#import "CNTouristsLoginTipsView.h"
42 //#import "CNWebRedirectHandle.h" 42 //#import "CNWebRedirectHandle.h"
43 43
44 -//@interface CNLiveTaskListController ()<UITableViewDelegate,UITableViewDataSource,CNTaskListTableViewCellDelegate,CNTaskListHeadViewDelegate,TouristsLoginTipsViewDelegate>  
45 -@interface CNLiveTaskListController ()<UITableViewDelegate,UITableViewDataSource,CNTaskListTableViewCellDelegate,CNTaskListHeadViewDelegate> 44 +//@interface CNLiveTaskListController ()<UITableViewDelegate,UITableViewDataSource,CNTaskListTableViewCellDelegate,CNLiveTaskListHeadViewDelegate,TouristsLoginTipsViewDelegate>
  45 +@interface CNLiveTaskListController ()<UITableViewDelegate,UITableViewDataSource,CNLiveTaskListTableViewCellDelegate,CNLiveTaskListHeadViewDelegate>
46 @property (nonatomic, strong) UITableView *tableView; 46 @property (nonatomic, strong) UITableView *tableView;
47 -@property (nonatomic, strong) CNTaskListHeadView *headView; 47 +@property (nonatomic, strong) CNLiveTaskListHeadView *headView;
48 @property (nonatomic, strong) NSMutableArray *data; 48 @property (nonatomic, strong) NSMutableArray *data;
49 49
50 @property (nonatomic, strong) UIButton *backButton; 50 @property (nonatomic, strong) UIButton *backButton;
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 56
57 @implementation CNLiveTaskListController 57 @implementation CNLiveTaskListController
58 #pragma mark - CNTaskListTableViewCellDelegate 58 #pragma mark - CNTaskListTableViewCellDelegate
59 -- (void)clickedCellButton:(CNTaskListTableViewCell *)cell type:(NSString *)type{ 59 +- (void)clickedCellButton:(CNLiveTaskListTableViewCell *)cell type:(NSString *)type{
60 if([type isEqualToString:@"update_face"]||[type isEqualToString:@"update_nick"]){//头像 昵称 60 if([type isEqualToString:@"update_face"]||[type isEqualToString:@"update_nick"]){//头像 昵称
61 // CNMinePersonInfoController *infoVC = [[CNMinePersonInfoController alloc] init]; 61 // CNMinePersonInfoController *infoVC = [[CNMinePersonInfoController alloc] init];
62 // [[AppDelegate sharedAppDelegate] pushViewController:infoVC withBackTitle:@" "]; 62 // [[AppDelegate sharedAppDelegate] pushViewController:infoVC withBackTitle:@" "];
@@ -229,7 +229,7 @@ @@ -229,7 +229,7 @@
229 return; 229 return;
230 } 230 }
231 if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){ 231 if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){
232 - CNTaskListModel *model = [CNTaskListModel mj_objectWithKeyValues:responseObject[@"data"]]; 232 + CNLiveTaskListModel *model = [CNLiveTaskListModel mj_objectWithKeyValues:responseObject[@"data"]];
233 [self.data addObject:model]; 233 [self.data addObject:model];
234 self.headView.score = model.integral; 234 self.headView.score = model.integral;
235 [self.tableView reloadData]; 235 [self.tableView reloadData];
@@ -237,7 +237,7 @@ @@ -237,7 +237,7 @@
237 if([responseObject isKindOfClass:[NSDictionary class]]){ 237 if([responseObject isKindOfClass:[NSDictionary class]]){
238 //存入任务列表 238 //存入任务列表
239 if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){ 239 if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){
240 - [CNAddScoreManager writeJsonName:@"TaskList.json" dic:responseObject[@"data"]]; 240 + [CNLiveAddScoreManager writeJsonName:@"TaskList.json" dic:responseObject[@"data"]];
241 } 241 }
242 } 242 }
243 243
@@ -283,7 +283,7 @@ @@ -283,7 +283,7 @@
283 //改变任务次数 283 //改变任务次数
284 NSArray *arr = [self.tableView indexPathsForVisibleRows]; 284 NSArray *arr = [self.tableView indexPathsForVisibleRows];
285 for (NSIndexPath *indexPath in arr) { 285 for (NSIndexPath *indexPath in arr) {
286 - CNTaskListTableViewCell *cell = (CNTaskListTableViewCell *)[self.tableView cellForRowAtIndexPath:indexPath]; 286 + CNLiveTaskListTableViewCell *cell = (CNLiveTaskListTableViewCell *)[self.tableView cellForRowAtIndexPath:indexPath];
287 if([taskId isEqualToString:cell.model.taskId]){ 287 if([taskId isEqualToString:cell.model.taskId]){
288 cell.model.times++; 288 cell.model.times++;
289 cell.model = cell.model; 289 cell.model = cell.model;
@@ -331,11 +331,11 @@ @@ -331,11 +331,11 @@
331 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 331 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
332 if(self.data.count > 0){ 332 if(self.data.count > 0){
333 if(section == 0){ 333 if(section == 0){
334 - CNTaskListModel *model = self.data[0]; 334 + CNLiveTaskListModel *model = self.data[0];
335 return model.dailyTask.count; 335 return model.dailyTask.count;
336 336
337 }else if(section == 1){ 337 }else if(section == 1){
338 - CNTaskListModel *model = self.data[0]; 338 + CNLiveTaskListModel *model = self.data[0];
339 return model.firstTask.count; 339 return model.firstTask.count;
340 340
341 } 341 }
@@ -344,10 +344,10 @@ @@ -344,10 +344,10 @@
344 344
345 } 345 }
346 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 346 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
347 - CNTaskListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNTaskListTableViewCell forIndexPath:indexPath]; 347 + CNLiveTaskListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveTaskListTableViewCell forIndexPath:indexPath];
348 cell.delegate = self; 348 cell.delegate = self;
349 if(self.data.count > 0){ 349 if(self.data.count > 0){
350 - CNTaskListModel *model = self.data[0]; 350 + CNLiveTaskListModel *model = self.data[0];
351 if(indexPath.section == 0){ 351 if(indexPath.section == 0){
352 cell.model = model.dailyTask[indexPath.row]; 352 cell.model = model.dailyTask[indexPath.row];
353 353
@@ -387,8 +387,8 @@ @@ -387,8 +387,8 @@
387 387
388 } 388 }
389 389
390 -#pragma mark - CNTaskListHeadViewDelegate  
391 -- (void)clickedDetailButton:(CNTaskListHeadView *)view{ 390 +#pragma mark - CNLiveTaskListHeadViewDelegate
  391 +- (void)clickedDetailButton:(CNLiveTaskListHeadView *)view{
392 CNLiveIntegralDetailsController *vc = [[CNLiveIntegralDetailsController alloc] init]; 392 CNLiveIntegralDetailsController *vc = [[CNLiveIntegralDetailsController alloc] init];
393 [self.navigationController pushViewController:vc animated:YES]; 393 [self.navigationController pushViewController:vc animated:YES];
394 } 394 }
@@ -467,8 +467,7 @@ @@ -467,8 +467,7 @@
467 _tableView.showsVerticalScrollIndicator = NO; 467 _tableView.showsVerticalScrollIndicator = NO;
468 _tableView.showsHorizontalScrollIndicator = NO; 468 _tableView.showsHorizontalScrollIndicator = NO;
469 _tableView.bounces = NO; 469 _tableView.bounces = NO;
470 - [_tableView registerClass:[CNTaskListTableViewCell class] forCellReuseIdentifier:kCNTaskListTableViewCell];  
471 -// [_tableView registerClass:[CNGifFaceListHeaderView class] forHeaderFooterViewReuseIdentifier:kCNGifFaceListHeaderView]; 470 + [_tableView registerClass:[CNLiveTaskListTableViewCell class] forCellReuseIdentifier:kCNLiveTaskListTableViewCell];
472 } 471 }
473 return _tableView; 472 return _tableView;
474 } 473 }
@@ -480,9 +479,9 @@ @@ -480,9 +479,9 @@
480 return _data; 479 return _data;
481 } 480 }
482 481
483 -- (CNTaskListHeadView *)headView{ 482 +- (CNLiveTaskListHeadView *)headView{
484 if (!_headView) { 483 if (!_headView) {
485 - _headView = [[CNTaskListHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop+SCREEN_WIDTH*100/375.0)]; 484 + _headView = [[CNLiveTaskListHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop+SCREEN_WIDTH*100/375.0)];
486 _headView.backgroundColor = [UIColor whiteColor]; 485 _headView.backgroundColor = [UIColor whiteColor];
487 UIImage *image = [self xw_getImageName:@"integrate_list_bg" bundleName:@"CNLiveIntegralModule" targetClass:[CNLiveTaskListController class]]; 486 UIImage *image = [self xw_getImageName:@"integrate_list_bg" bundleName:@"CNLiveIntegralModule" targetClass:[CNLiveTaskListController class]];
488 _headView.image = image; 487 _headView.image = image;
CNLiveIntegralModule/Classes/Model/CNScoreModel.h renamed to CNLiveIntegralModule/Classes/Model/CNLiveScoreModel.h
1 // 1 //
2 -// CNScoreModel.h 2 +// CNLiveScoreModel.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/2. 5 // Created by CNLive-zxw on 2019/3/2.
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 12
13 -@interface CNScoreModel : NSObject 13 +@interface CNLiveScoreModel : NSObject
14 //积分明细 14 //积分明细
15 @property (nonatomic, copy) NSString *date; 15 @property (nonatomic, copy) NSString *date;
16 @property (nonatomic, copy) NSString *integral; 16 @property (nonatomic, copy) NSString *integral;
CNLiveIntegralModule/Classes/Model/CNScoreModel.m renamed to CNLiveIntegralModule/Classes/Model/CNLiveScoreModel.m
1 // 1 //
2 -// CNScoreModel.m 2 +// CNLiveScoreModel.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/2. 5 // Created by CNLive-zxw on 2019/3/2.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNScoreModel.h" 9 +#import "CNLiveScoreModel.h"
10 10
11 -@implementation CNScoreModel 11 +@implementation CNLiveScoreModel
12 12
13 13
14 @end 14 @end
CNLiveIntegralModule/Classes/Model/CNTaskListModel.h renamed to CNLiveIntegralModule/Classes/Model/CNLiveTaskListModel.h
1 // 1 //
2 -// CNTaskListModel.h 2 +// CNLiveTaskListModel.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/26. 5 // Created by CNLive-zxw on 2019/2/26.
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 -@interface CNTaskListItemModel : NSObject 12 +@interface CNLiveTaskListItemModel : NSObject
13 @property (nonatomic, copy) NSString *icon; 13 @property (nonatomic, copy) NSString *icon;
14 @property (nonatomic, copy) NSString *score; 14 @property (nonatomic, copy) NSString *score;
15 @property (nonatomic, copy) NSString *status; 15 @property (nonatomic, copy) NSString *status;
@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
22 @property (nonatomic, copy) NSString *url; 22 @property (nonatomic, copy) NSString *url;
23 23
24 @end 24 @end
25 -@interface CNTaskListModel : NSObject 25 +@interface CNLiveTaskListModel : NSObject
26 @property (nonatomic, copy) NSString *integral; 26 @property (nonatomic, copy) NSString *integral;
27 @property (nonatomic, strong) NSArray *dailyTask; 27 @property (nonatomic, strong) NSArray *dailyTask;
28 @property (nonatomic, strong) NSArray *firstTask; 28 @property (nonatomic, strong) NSArray *firstTask;
CNLiveIntegralModule/Classes/Model/CNTaskListModel.m renamed to CNLiveIntegralModule/Classes/Model/CNLiveTaskListModel.m
1 // 1 //
2 -// CNTaskListModel.m 2 +// CNLiveTaskListModel.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/26. 5 // Created by CNLive-zxw on 2019/2/26.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNTaskListModel.h" 9 +#import "CNLiveTaskListModel.h"
10 10
11 -@implementation CNTaskListItemModel 11 +@implementation CNLiveTaskListItemModel
12 12
13 @end 13 @end
14 -@implementation CNTaskListModel 14 +@implementation CNLiveTaskListModel
15 + (NSDictionary *)mj_objectClassInArray{ 15 + (NSDictionary *)mj_objectClassInArray{
16 return @{ 16 return @{
17 - @"dailyTask" : @"CNTaskListItemModel",@"firstTask" : @"CNTaskListItemModel" 17 + @"dailyTask" : @"CNLiveTaskListItemModel",@"firstTask" : @"CNLiveTaskListItemModel"
18 }; 18 };
19 } 19 }
20 @end 20 @end
CNLiveIntegralModule/Classes/Model/CNAddScoreManager.h renamed to CNLiveIntegralModule/Classes/Tools/CNLiveAddScoreManager.h
1 // 1 //
2 -// CNAddScoreManager.h 2 +// CNLiveAddScoreManager.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/5. 5 // Created by CNLive-zxw on 2019/3/5.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
  9 +/**
  10 + * 增加请求
  11 + */
  12 +
9 #import <Foundation/Foundation.h> 13 #import <Foundation/Foundation.h>
10 14
11 NS_ASSUME_NONNULL_BEGIN 15 NS_ASSUME_NONNULL_BEGIN
12 typedef void(^RequestCompleted) (BOOL isSuccess, NSString *desc, NSString *score); 16 typedef void(^RequestCompleted) (BOOL isSuccess, NSString *desc, NSString *score);
13 -@interface CNAddScoreManager : NSObject 17 +@interface CNLiveAddScoreManager : NSObject
14 @property (nonatomic, copy) RequestCompleted block; 18 @property (nonatomic, copy) RequestCompleted block;
15 19
16 //延时调用 20 //延时调用
CNLiveIntegralModule/Classes/Model/CNAddScoreManager.m renamed to CNLiveIntegralModule/Classes/Tools/CNLiveAddScoreManager.m
1 // 1 //
2 -// CNAddScoreManager.m 2 +// CNLiveAddScoreManager.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/5. 5 // Created by CNLive-zxw on 2019/3/5.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNAddScoreManager.h" 9 +#import "CNLiveAddScoreManager.h"
10 10
11 #import "MJExtension.h" 11 #import "MJExtension.h"
12 12
@@ -14,19 +14,19 @@ @@ -14,19 +14,19 @@
14 #import "CNUserInfoManager.h" 14 #import "CNUserInfoManager.h"
15 #import "CNLiveEnvironment.h" 15 #import "CNLiveEnvironment.h"
16 16
17 -#import "CNScoreModel.h"  
18 -#import "CNTaskListModel.h" 17 +#import "CNLiveScoreModel.h"
  18 +#import "CNLiveTaskListModel.h"
19 19
20 -@interface CNAddScoreManager() 20 +@interface CNLiveAddScoreManager()
21 @property (nonatomic, weak) NSTimer *timer; 21 @property (nonatomic, weak) NSTimer *timer;
22 @property (nonatomic, copy) NSString *taskId; 22 @property (nonatomic, copy) NSString *taskId;
23 @property (nonatomic, copy) NSString *contentId; 23 @property (nonatomic, copy) NSString *contentId;
24 24
25 @end 25 @end
26 -@implementation CNAddScoreManager 26 +@implementation CNLiveAddScoreManager
27 #pragma mark - 单例 27 #pragma mark - 单例
28 + (instancetype)manager { 28 + (instancetype)manager {
29 - static CNAddScoreManager *_singleton = nil; 29 + static CNLiveAddScoreManager *_singleton = nil;
30 static dispatch_once_t onceToken; 30 static dispatch_once_t onceToken;
31 dispatch_once(&onceToken, ^{ 31 dispatch_once(&onceToken, ^{
32 //不能再使用alloc方法 32 //不能再使用alloc方法
@@ -37,15 +37,15 @@ @@ -37,15 +37,15 @@
37 } 37 }
38 // 防止外部调用alloc 或者 new 38 // 防止外部调用alloc 或者 new
39 + (instancetype)allocWithZone:(struct _NSZone *)zone { 39 + (instancetype)allocWithZone:(struct _NSZone *)zone {
40 - return [CNAddScoreManager manager]; 40 + return [CNLiveAddScoreManager manager];
41 } 41 }
42 // 防止外部调用copy 42 // 防止外部调用copy
43 - (id)copyWithZone:(nullable NSZone *)zone { 43 - (id)copyWithZone:(nullable NSZone *)zone {
44 - return [CNAddScoreManager manager]; 44 + return [CNLiveAddScoreManager manager];
45 } 45 }
46 // 防止外部调用mutableCopy 46 // 防止外部调用mutableCopy
47 - (id)mutableCopyWithZone:(nullable NSZone *)zone { 47 - (id)mutableCopyWithZone:(nullable NSZone *)zone {
48 - return [CNAddScoreManager manager]; 48 + return [CNLiveAddScoreManager manager];
49 } 49 }
50 50
51 #pragma mark - 工具方法 51 #pragma mark - 工具方法
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 */ 57 */
58 #pragma mark - 延时请求加分接口 58 #pragma mark - 延时请求加分接口
59 - (void)requestTime:(NSInteger)time taskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block{ 59 - (void)requestTime:(NSInteger)time taskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block{
60 - CNAddScoreManager *manager = [CNAddScoreManager manager]; 60 + CNLiveAddScoreManager *manager = [CNLiveAddScoreManager manager];
61 manager.taskId = taskId; 61 manager.taskId = taskId;
62 manager.contentId = contentId; 62 manager.contentId = contentId;
63 manager.block = block; 63 manager.block = block;
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 65
66 } 66 }
67 - (void)sendRequest{ 67 - (void)sendRequest{
68 - [CNAddScoreManager requestTaskId:self.taskId contentId:self.contentId block:self.block]; 68 + [CNLiveAddScoreManager requestTaskId:self.taskId contentId:self.contentId block:self.block];
69 } 69 }
70 #pragma mark - 取消延时请求加分接口 70 #pragma mark - 取消延时请求加分接口
71 - (void)cancelSendRequest{ 71 - (void)cancelSendRequest{
@@ -91,8 +91,8 @@ @@ -91,8 +91,8 @@
91 91
92 if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { 92 if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {
93 //完成次数加一 93 //完成次数加一
94 - [CNAddScoreManager updateAddScoreJson:@"TaskList.json" taskType:@"firstTask" taskId:@"first_login"];  
95 - CNScoreModel *model = [CNScoreModel mj_objectWithKeyValues:responseObject[@"data"]]; 94 + [CNLiveAddScoreManager updateAddScoreJson:@"TaskList.json" taskType:@"firstTask" taskId:@"first_login"];
  95 + CNLiveScoreModel *model = [CNLiveScoreModel mj_objectWithKeyValues:responseObject[@"data"]];
96 96
97 //发送通知 97 //发送通知
98 [[NSNotificationCenter defaultCenter] postNotificationName:@"AddScoreRequestSuccess" object:nil userInfo:@{@"taskType":@"firstTask", @"taskId":@"first_login", @"score":model.score}]; 98 [[NSNotificationCenter defaultCenter] postNotificationName:@"AddScoreRequestSuccess" object:nil userInfo:@{@"taskType":@"firstTask", @"taskId":@"first_login", @"score":model.score}];
@@ -179,7 +179,7 @@ @@ -179,7 +179,7 @@
179 } 179 }
180 180
181 //判断是否可以请求加分 181 //判断是否可以请求加分
182 - BOOL isOk = [CNAddScoreManager judgeIsAddScoreJson:@"TaskList.json" taskType:taskType taskId:taskId]; 182 + BOOL isOk = [CNLiveAddScoreManager judgeIsAddScoreJson:@"TaskList.json" taskType:taskType taskId:taskId];
183 if(isOk){ 183 if(isOk){
184 NSDictionary *params = @{@"sid":CNUserShareModel.uid,@"taskId":taskId,@"contentId":!contentId?@"":contentId}; 184 NSDictionary *params = @{@"sid":CNUserShareModel.uid,@"taskId":taskId,@"contentId":!contentId?@"":contentId};
185 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 185 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
@@ -188,8 +188,8 @@ @@ -188,8 +188,8 @@
188 188
189 if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { 189 if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {
190 //完成次数加一 190 //完成次数加一
191 - [CNAddScoreManager updateAddScoreJson:@"TaskList.json" taskType:taskType taskId:taskId];  
192 - CNScoreModel *model = [CNScoreModel mj_objectWithKeyValues:responseObject[@"data"]]; 191 + [CNLiveAddScoreManager updateAddScoreJson:@"TaskList.json" taskType:taskType taskId:taskId];
  192 + CNLiveScoreModel *model = [CNLiveScoreModel mj_objectWithKeyValues:responseObject[@"data"]];
193 193
194 //发送通知 194 //发送通知
195 [[NSNotificationCenter defaultCenter] postNotificationName:@"AddScoreRequestSuccess" object:nil userInfo:@{@"taskType":taskType, @"taskId":taskId, @"score":model.score}]; 195 [[NSNotificationCenter defaultCenter] postNotificationName:@"AddScoreRequestSuccess" object:nil userInfo:@{@"taskType":taskType, @"taskId":taskId, @"score":model.score}];
@@ -210,17 +210,17 @@ @@ -210,17 +210,17 @@
210 210
211 #pragma mark - 判断是否完成任务 211 #pragma mark - 判断是否完成任务
212 + (BOOL)judgeIsAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{ 212 + (BOOL)judgeIsAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{
213 - CNTaskListModel *model = [CNAddScoreManager readJson:name taskType:taskType taskId:taskId]; 213 + CNLiveTaskListModel *model = [CNLiveAddScoreManager readJson:name taskType:taskType taskId:taskId];
214 214
215 if([taskType isEqualToString:@"dailyTask"]){ 215 if([taskType isEqualToString:@"dailyTask"]){
216 - for (CNTaskListItemModel *smodel in model.dailyTask) { 216 + for (CNLiveTaskListItemModel *smodel in model.dailyTask) {
217 if([smodel.taskId isEqualToString:taskId]){ 217 if([smodel.taskId isEqualToString:taskId]){
218 return smodel.times < smodel.totalCount;//能分享 218 return smodel.times < smodel.totalCount;//能分享
219 } 219 }
220 } 220 }
221 } 221 }
222 if([taskType isEqualToString:@"firstTask"]){ 222 if([taskType isEqualToString:@"firstTask"]){
223 - for (CNTaskListItemModel *smodel in model.firstTask) { 223 + for (CNLiveTaskListItemModel *smodel in model.firstTask) {
224 if([smodel.taskId isEqualToString:taskId]){ 224 if([smodel.taskId isEqualToString:taskId]){
225 return smodel.times < smodel.totalCount;//能分享 225 return smodel.times < smodel.totalCount;//能分享
226 } 226 }
@@ -232,33 +232,33 @@ @@ -232,33 +232,33 @@
232 232
233 #pragma mark - 更新本地完成任务次数 233 #pragma mark - 更新本地完成任务次数
234 + (BOOL)updateAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{ 234 + (BOOL)updateAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{
235 - CNTaskListModel *model = [CNAddScoreManager readJson:name taskType:taskType taskId:taskId]; 235 + CNLiveTaskListModel *model = [CNLiveAddScoreManager readJson:name taskType:taskType taskId:taskId];
236 236
237 if([taskType isEqualToString:@"dailyTask"]){ 237 if([taskType isEqualToString:@"dailyTask"]){
238 - for (CNTaskListItemModel *smodel in model.dailyTask) { 238 + for (CNLiveTaskListItemModel *smodel in model.dailyTask) {
239 if([smodel.taskId isEqualToString:taskId]){ 239 if([smodel.taskId isEqualToString:taskId]){
240 smodel.times++; 240 smodel.times++;
241 } 241 }
242 } 242 }
243 } 243 }
244 if([taskType isEqualToString:@"firstTask"]){ 244 if([taskType isEqualToString:@"firstTask"]){
245 - for (CNTaskListItemModel *smodel in model.firstTask) { 245 + for (CNLiveTaskListItemModel *smodel in model.firstTask) {
246 if([smodel.taskId isEqualToString:taskId]){ 246 if([smodel.taskId isEqualToString:taskId]){
247 smodel.times++; 247 smodel.times++;
248 } 248 }
249 } 249 }
250 } 250 }
251 NSDictionary *dic = [model mj_keyValues]; 251 NSDictionary *dic = [model mj_keyValues];
252 - return [CNAddScoreManager writeJsonName:name dic:dic]; 252 + return [CNLiveAddScoreManager writeJsonName:name dic:dic];
253 253
254 } 254 }
255 255
256 #pragma mark - 读取本地json 256 #pragma mark - 读取本地json
257 -+ (CNTaskListModel *)readJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{ 257 ++ (CNLiveTaskListModel *)readJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{
258 NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; 258 NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
259 NSString *filePath = [docPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@/%@",CNUserShareModel.uid,name]]; 259 NSString *filePath = [docPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@/%@",CNUserShareModel.uid,name]];
260 NSDictionary *jsonObject = [NSDictionary dictionaryWithContentsOfFile:filePath]; 260 NSDictionary *jsonObject = [NSDictionary dictionaryWithContentsOfFile:filePath];
261 - CNTaskListModel *model = [CNTaskListModel mj_objectWithKeyValues:jsonObject]; 261 + CNLiveTaskListModel *model = [CNLiveTaskListModel mj_objectWithKeyValues:jsonObject];
262 return model; 262 return model;
263 263
264 } 264 }
CNLiveIntegralModule/Classes/View/CNAddScoreView.h renamed to CNLiveIntegralModule/Classes/Tools/CNLiveAddScoreView.h
1 // 1 //
2 -// CNAddScoreView.h 2 +// CNLiveAddScoreView.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/28. 5 // Created by CNLive-zxw on 2019/2/28.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
  9 +/**
  10 + * 增加积分
  11 + */
  12 +
9 #import <UIKit/UIKit.h> 13 #import <UIKit/UIKit.h>
10 14
11 NS_ASSUME_NONNULL_BEGIN 15 NS_ASSUME_NONNULL_BEGIN
12 -@protocol CNAddScoreViewDelegate <NSObject> 16 +@protocol CNLiveAddScoreViewDelegate <NSObject>
13 @optional 17 @optional
14 - (void)login; 18 - (void)login;
15 @end 19 @end
16 20
17 -@interface CNAddScoreView : UIView  
18 -@property (nonatomic, weak) id<CNAddScoreViewDelegate> delegate; 21 +@interface CNLiveAddScoreView : UIView
  22 +@property (nonatomic, weak) id<CNLiveAddScoreViewDelegate> delegate;
19 23
20 + (void)showAddScoreViewWithDesc:(NSString *)desc score:(NSString *)score; 24 + (void)showAddScoreViewWithDesc:(NSString *)desc score:(NSString *)score;
21 -+ (void)showAddScoreViewWithDesc:(NSString *)desc login:(NSString *)login delegate:(id<CNAddScoreViewDelegate>)delegate; 25 ++ (void)showAddScoreViewWithDesc:(NSString *)desc login:(NSString *)login delegate:(id<CNLiveAddScoreViewDelegate>)delegate;
22 26
23 + (void)hide; 27 + (void)hide;
24 28
CNLiveIntegralModule/Classes/View/CNAddScoreView.m renamed to CNLiveIntegralModule/Classes/Tools/CNLiveAddScoreView.m
1 // 1 //
2 -// CNAddScoreView.m 2 +// CNLiveAddScoreView.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/28. 5 // Created by CNLive-zxw on 2019/2/28.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNAddScoreView.h" 9 +#import "CNLiveAddScoreView.h"
10 10
11 #import <Masonry/Masonry.h> 11 #import <Masonry/Masonry.h>
12 #import <SDWebImage/SDWebImage.h> 12 #import <SDWebImage/SDWebImage.h>
@@ -15,9 +15,9 @@ @@ -15,9 +15,9 @@
15 15
16 #import "NSString+CNLiveExtension.h" 16 #import "NSString+CNLiveExtension.h"
17 17
18 -#import "CNGoldWhereaboutsView.h" 18 +#import "CNLiveGoldWhereaboutsView.h"
19 19
20 -@interface CNAddScoreView() 20 +@interface CNLiveAddScoreView()
21 @property (nonatomic, strong) UIImageView *midImage; 21 @property (nonatomic, strong) UIImageView *midImage;
22 @property (nonatomic, strong) UIButton *scoreBtn; 22 @property (nonatomic, strong) UIButton *scoreBtn;
23 @property (nonatomic, strong) UILabel *scoreLabel; 23 @property (nonatomic, strong) UILabel *scoreLabel;
@@ -31,18 +31,18 @@ @@ -31,18 +31,18 @@
31 31
32 @end 32 @end
33 33
34 -@implementation CNAddScoreView 34 +@implementation CNLiveAddScoreView
35 #pragma mark - Using Method 35 #pragma mark - Using Method
36 + (void)showAddScoreViewWithDesc:(NSString *)desc score:(NSString *)score{ 36 + (void)showAddScoreViewWithDesc:(NSString *)desc score:(NSString *)score{
37 - CNAddScoreView *view = [[CNAddScoreView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; 37 + CNLiveAddScoreView *view = [[CNLiveAddScoreView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
38 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 38 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
39 view.desc = desc; 39 view.desc = desc;
40 view.score = score; 40 view.score = score;
41 [[UIApplication sharedApplication].keyWindow addSubview:view]; 41 [[UIApplication sharedApplication].keyWindow addSubview:view];
42 42
43 } 43 }
44 -+ (void)showAddScoreViewWithDesc:(NSString *)desc login:(NSString *)login delegate:(id<CNAddScoreViewDelegate>)delegate {  
45 - CNAddScoreView *view = [[CNAddScoreView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; 44 ++ (void)showAddScoreViewWithDesc:(NSString *)desc login:(NSString *)login delegate:(id<CNLiveAddScoreViewDelegate>)delegate {
  45 + CNLiveAddScoreView *view = [[CNLiveAddScoreView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
46 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 46 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
47 view.desc = desc; 47 view.desc = desc;
48 view.login = login; 48 view.login = login;
@@ -224,14 +224,14 @@ @@ -224,14 +224,14 @@
224 #pragma mark - Action 224 #pragma mark - Action
225 + (void)hide { 225 + (void)hide {
226 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { 226 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) {
227 - if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ 227 + if([view isKindOfClass:[CNLiveGoldWhereaboutsView class]]){
228 [view removeAllSubviews]; 228 [view removeAllSubviews];
229 [view removeFromSuperview]; 229 [view removeFromSuperview];
230 230
231 } 231 }
232 } 232 }
233 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { 233 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) {
234 - if([view isKindOfClass:[CNAddScoreView class]]){ 234 + if([view isKindOfClass:[CNLiveAddScoreView class]]){
235 [view removeAllSubviews]; 235 [view removeAllSubviews];
236 [view removeFromSuperview]; 236 [view removeFromSuperview];
237 237
@@ -243,7 +243,7 @@ @@ -243,7 +243,7 @@
243 [self hiddenAction]; 243 [self hiddenAction];
244 244
245 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { 245 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) {
246 - if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ 246 + if([view isKindOfClass:[CNLiveGoldWhereaboutsView class]]){
247 [view removeFromSuperview]; 247 [view removeFromSuperview];
248 248
249 } 249 }
CNLiveIntegralModule/Classes/View/CNGoldWhereaboutsView.h renamed to CNLiveIntegralModule/Classes/Tools/CNLiveGoldWhereaboutsView.h
1 // 1 //
2 -// CNGoldWhereaboutsView.h 2 +// CNLiveGoldWhereaboutsView.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/28. 5 // Created by CNLive-zxw on 2019/2/28.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
  9 +/**
  10 + * 金币下落
  11 + */
  12 +
9 #import "CAEmitterLayerView.h" 13 #import "CAEmitterLayerView.h"
10 -#import "CNSignInView.h" 14 +#import "CNLiveSignInView.h"
11 15
12 NS_ASSUME_NONNULL_BEGIN 16 NS_ASSUME_NONNULL_BEGIN
13 -@class CNScoreModel;  
14 -@protocol CNGoldWhereaboutsViewDelegate <NSObject> 17 +@class CNLiveScoreModel;
  18 +@protocol CNLiveGoldWhereaboutsViewDelegate <NSObject>
15 @optional 19 @optional
16 - (void)login; 20 - (void)login;
17 @end 21 @end
18 22
19 -typedef NS_ENUM(NSUInteger, CNGoldWhereaboutsViewType) {  
20 - CNGoldWhereaboutsViewTypeDefault,//熊猫  
21 - CNGoldWhereaboutsViewTypeSignIn,//签到  
22 - CNGoldWhereaboutsViewTypeLogin,//熊猫 23 +typedef NS_ENUM(NSUInteger, CNLiveGoldWhereaboutsViewType) {
  24 + CNLiveGoldWhereaboutsViewTypeDefault,//熊猫
  25 + CNLiveGoldWhereaboutsViewTypeSignIn,//签到
  26 + CNLiveGoldWhereaboutsViewTypeLogin,//游客登录
23 27
24 }; 28 };
25 29
26 -@interface CNGoldWhereaboutsView : CAEmitterLayerView  
27 -@property (nonatomic, weak) id<CNGoldWhereaboutsViewDelegate> delegate; 30 +@interface CNLiveGoldWhereaboutsView : CAEmitterLayerView
  31 +@property (nonatomic, weak) id<CNLiveGoldWhereaboutsViewDelegate> delegate;
28 32
29 // 游客模式浏览加积分 33 // 游客模式浏览加积分
30 -+ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc delegate:(id<CNGoldWhereaboutsViewDelegate>) delegate; 34 ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc delegate:(id<CNLiveGoldWhereaboutsViewDelegate>) delegate;
31 35
32 // 默认展示添加积分视图 36 // 默认展示添加积分视图
33 + (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc score:(NSString *)score; 37 + (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc score:(NSString *)score;
34 38
35 // 默认签到 39 // 默认签到
36 -+ (void)showGoldWhereaboutsViewModel:(CNScoreModel *)model controller:(id<CNSignInViewDelegate>)controller; 40 ++ (void)showGoldWhereaboutsViewModel:(CNLiveScoreModel *)model controller:(id<CNLiveSignInViewDelegate>)controller;
37 + (void)hide; 41 + (void)hide;
38 42
39 @end 43 @end
CNLiveIntegralModule/Classes/View/CNGoldWhereaboutsView.m renamed to CNLiveIntegralModule/Classes/Tools/CNLiveGoldWhereaboutsView.m
1 // 1 //
2 -// CNGoldWhereaboutsView.m 2 +// CNLiveGoldWhereaboutsView.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/28. 5 // Created by CNLive-zxw on 2019/2/28.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNGoldWhereaboutsView.h"  
10 -#import "CNAddScoreView.h"  
11 -#import "CNSignInView.h"  
12 -#import "CNScoreModel.h" 9 +#import "CNLiveGoldWhereaboutsView.h"
  10 +#import <AVFoundation/AVFoundation.h>
  11 +
13 //#import "CNAudioOrVideoMananger.h" 12 //#import "CNAudioOrVideoMananger.h"
14 //#import "CNAudioPlayerManager.h" 13 //#import "CNAudioPlayerManager.h"
15 //#import "LVCPlayer.h" 14 //#import "LVCPlayer.h"
16 -#import <AVFoundation/AVFoundation.h>  
17 15
18 -@interface CNGoldWhereaboutsView()<CNAddScoreViewDelegate> 16 +#import "CNLiveAddScoreView.h"
  17 +#import "CNLiveSignInView.h"
  18 +#import "CNLiveScoreModel.h"
  19 +
  20 +@interface CNLiveGoldWhereaboutsView()<CNLiveAddScoreViewDelegate>
19 @property (nonatomic, copy) NSString *desc; 21 @property (nonatomic, copy) NSString *desc;
20 @property (nonatomic, copy) NSString *score; 22 @property (nonatomic, copy) NSString *score;
21 23
22 -@property (nonatomic, weak) id<CNSignInViewDelegate> controller;  
23 -@property (nonatomic, strong) CNScoreModel *model; 24 +@property (nonatomic, weak) id<CNLiveSignInViewDelegate> controller;
  25 +@property (nonatomic, strong) CNLiveScoreModel *model;
24 26
25 @end 27 @end
26 -@implementation CNGoldWhereaboutsView 28 +@implementation CNLiveGoldWhereaboutsView
27 #pragma mark - Using Method 29 #pragma mark - Using Method
28 -+ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc delegate:(id<CNGoldWhereaboutsViewDelegate>) delegate{//浏览加积分  
29 - CNGoldWhereaboutsView *sView = [[CNGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; 30 ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc delegate:(id<CNLiveGoldWhereaboutsViewDelegate>) delegate{//浏览加积分
  31 + CNLiveGoldWhereaboutsView *sView = [[CNLiveGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
30 sView.desc = desc; 32 sView.desc = desc;
31 sView.delegate = delegate; 33 sView.delegate = delegate;
32 [[UIApplication sharedApplication].keyWindow addSubview:sView]; 34 [[UIApplication sharedApplication].keyWindow addSubview:sView];
33 - [sView show:CNGoldWhereaboutsViewTypeLogin]; 35 + [sView show:CNLiveGoldWhereaboutsViewTypeLogin];
34 } 36 }
35 37
36 + (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc score:(NSString *)score{ 38 + (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc score:(NSString *)score{
37 - CNGoldWhereaboutsView *sView = [[CNGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; 39 + CNLiveGoldWhereaboutsView *sView = [[CNLiveGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
38 sView.desc = desc; 40 sView.desc = desc;
39 sView.score = score; 41 sView.score = score;
40 [[UIApplication sharedApplication].keyWindow addSubview:sView]; 42 [[UIApplication sharedApplication].keyWindow addSubview:sView];
41 - [sView show:CNGoldWhereaboutsViewTypeDefault]; 43 + [sView show:CNLiveGoldWhereaboutsViewTypeDefault];
42 44
43 } 45 }
44 -+ (void)showGoldWhereaboutsViewModel:(CNScoreModel *)model controller:(id<CNSignInViewDelegate>)controller{  
45 - CNGoldWhereaboutsView *sView = [[CNGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; 46 ++ (void)showGoldWhereaboutsViewModel:(CNLiveScoreModel *)model controller:(id<CNLiveSignInViewDelegate>)controller{
  47 + CNLiveGoldWhereaboutsView *sView = [[CNLiveGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
46 sView.model = model; 48 sView.model = model;
47 sView.controller = controller; 49 sView.controller = controller;
48 [[UIApplication sharedApplication].keyWindow addSubview:sView]; 50 [[UIApplication sharedApplication].keyWindow addSubview:sView];
49 - [sView show:CNGoldWhereaboutsViewTypeSignIn]; 51 + [sView show:CNLiveGoldWhereaboutsViewTypeSignIn];
50 } 52 }
51 53
52 #pragma mark - Init 54 #pragma mark - Init
@@ -70,7 +72,7 @@ @@ -70,7 +72,7 @@
70 } 72 }
71 73
72 #pragma mark - Private Methods 74 #pragma mark - Private Methods
73 -- (void)show:(CNGoldWhereaboutsViewType)type { 75 +- (void)show:(CNLiveGoldWhereaboutsViewType)type {
74 76
75 self.emitterLayer.birthRate = 4; 77 self.emitterLayer.birthRate = 4;
76 78
@@ -127,30 +129,30 @@ @@ -127,30 +129,30 @@
127 if (!(sounds && [sounds isEqualToString:@"1"])) { 129 if (!(sounds && [sounds isEqualToString:@"1"])) {
128 // if(![CNAudioOrVideoMananger IsEnter] && ![[CNAudioPlayerManager sharedInstance] isPlaying]){//不在语音通话 130 // if(![CNAudioOrVideoMananger IsEnter] && ![[CNAudioPlayerManager sharedInstance] isPlaying]){//不在语音通话
129 // //金币下落结束 131 // //金币下落结束
130 -// [[NSNotificationCenter defaultCenter] postNotificationName:@"CNGoldWhereaboutsViewEnd" object:nil]; 132 +// [[NSNotificationCenter defaultCenter] postNotificationName:@"CNLiveGoldWhereaboutsViewEnd" object:nil];
131 // } 133 // }
132 } 134 }
133 135
134 switch (type) { 136 switch (type) {
135 - case CNGoldWhereaboutsViewTypeDefault: 137 + case CNLiveGoldWhereaboutsViewTypeDefault:
136 { 138 {
137 if(self.score && ![self.score isEqualToString:@""] && self.desc && ![self.desc isEqualToString:@""]){ 139 if(self.score && ![self.score isEqualToString:@""] && self.desc && ![self.desc isEqualToString:@""]){
138 - [CNAddScoreView showAddScoreViewWithDesc:self.desc score:self.score]; 140 + [CNLiveAddScoreView showAddScoreViewWithDesc:self.desc score:self.score];
139 }else{ 141 }else{
140 [self hide]; 142 [self hide];
141 } 143 }
142 } 144 }
143 break; 145 break;
144 146
145 - case CNGoldWhereaboutsViewTypeSignIn: 147 + case CNLiveGoldWhereaboutsViewTypeSignIn:
146 { 148 {
147 - [CNSignInView showSignInView:_model.score scores:_model.scores.count>0?_model.scores[0]:@"1000,2000,3000,4000,5000,6000,7000" day:_model.times url:_model.url delegate:_controller]; 149 + [CNLiveSignInView showSignInView:_model.score scores:_model.scores.count>0?_model.scores[0]:@"1000,2000,3000,4000,5000,6000,7000" day:_model.times url:_model.url delegate:_controller];
148 } 150 }
149 break; 151 break;
150 - case CNGoldWhereaboutsViewTypeLogin: 152 + case CNLiveGoldWhereaboutsViewTypeLogin:
151 { 153 {
152 if(self.desc && ![self.desc isEqualToString:@""]){ 154 if(self.desc && ![self.desc isEqualToString:@""]){
153 - [CNAddScoreView showAddScoreViewWithDesc:self.desc login:@"立即登录" delegate:self]; 155 + [CNLiveAddScoreView showAddScoreViewWithDesc:self.desc login:@"立即登录" delegate:self];
154 }else{ 156 }else{
155 [self hide]; 157 [self hide];
156 } 158 }
@@ -171,7 +173,7 @@ @@ -171,7 +173,7 @@
171 173
172 + (void)hide { 174 + (void)hide {
173 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { 175 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) {
174 - if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ 176 + if([view isKindOfClass:[CNLiveGoldWhereaboutsView class]]){
175 [view removeFromSuperview]; 177 [view removeFromSuperview];
176 178
177 } 179 }
@@ -228,7 +230,7 @@ @@ -228,7 +230,7 @@
228 } 230 }
229 */ 231 */
230 - (void)dealloc{ 232 - (void)dealloc{
231 - NSLog(@"CNGoldWhereaboutsView - dealloc"); 233 + NSLog(@"CNLiveGoldWhereaboutsView - dealloc");
232 } 234 }
233 - (void)login{ 235 - (void)login{
234 if (self.delegate && [self.delegate respondsToSelector:@selector(login)]) { 236 if (self.delegate && [self.delegate respondsToSelector:@selector(login)]) {
CNLiveIntegralModule/Classes/View/CNSignInView.h renamed to CNLiveIntegralModule/Classes/Tools/CNLiveSignInView.h
1 // 1 //
2 -// CNSignInView.h 2 +// CNLiveSignInView.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
  9 +/**
  10 + * 签到
  11 + */
  12 +
9 #import <UIKit/UIKit.h> 13 #import <UIKit/UIKit.h>
10 14
11 NS_ASSUME_NONNULL_BEGIN 15 NS_ASSUME_NONNULL_BEGIN
12 -@class CNSignInView;  
13 -@protocol CNSignInViewDelegate <NSObject>  
14 -- (void)clickedrRulesButton:(CNSignInView *)view; 16 +@class CNLiveSignInView;
  17 +@protocol CNLiveSignInViewDelegate <NSObject>
  18 +- (void)clickedrRulesButton:(CNLiveSignInView *)view;
15 19
16 @end 20 @end
17 -@interface CNSignInView : UIView  
18 -@property (nonatomic, weak) id<CNSignInViewDelegate> delegate; 21 +@interface CNLiveSignInView : UIView
  22 +@property (nonatomic, weak) id<CNLiveSignInViewDelegate> delegate;
19 @property (nonatomic, copy) NSString *url; 23 @property (nonatomic, copy) NSString *url;
20 24
21 -//+ (void)showSignInView:(NSString *)score;  
22 -//+ (void)showSignInViewDelegate:(id<CNSignInViewDelegate>)delegate;  
23 -//+ (void)showSignInView:(NSString *)score delegate:(id<CNSignInViewDelegate>)delegate;  
24 -//+ (void)showSignInView:(NSString *)score day:(NSInteger)day delegate:(id<CNSignInViewDelegate>)delegate;  
25 -//+ (void)showSignInView:(NSString *)score day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate;  
26 /** 25 /**
27 * 显示签到视图 26 * 显示签到视图
28 * 27 *
@@ -33,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -33,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
33 * @param delegate 代理 32 * @param delegate 代理
34 * 33 *
35 */ 34 */
36 -+ (void)showSignInView:(NSString *)score scores:(NSString *)scores day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate; 35 ++ (void)showSignInView:(NSString *)score scores:(NSString *)scores day:(NSInteger)day url:(NSString *)url delegate:(id<CNLiveSignInViewDelegate>)delegate;
37 36
38 @end 37 @end
39 38
CNLiveIntegralModule/Classes/View/CNSignInView.m renamed to CNLiveIntegralModule/Classes/Tools/CNLiveSignInView.m
1 // 1 //
2 -// CNSignInView.m 2 +// CNLiveSignInView.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNSignInView.h" 9 +#import "CNLiveSignInView.h"
10 #import "QMUIKit.h" 10 #import "QMUIKit.h"
11 #import "YYKit.h" 11 #import "YYKit.h"
12 #import <Masonry/Masonry.h> 12 #import <Masonry/Masonry.h>
13 #import <SDWebImage/SDWebImage.h> 13 #import <SDWebImage/SDWebImage.h>
14 14
15 -#import "CNSignInButtonView.h"  
16 -#import "CNGoldWhereaboutsView.h" 15 +#import "CNLiveSignInButtonView.h"
  16 +#import "CNLiveGoldWhereaboutsView.h"
17 17
18 -@interface CNSignInView() 18 +@interface CNLiveSignInView()
19 @property (nonatomic, strong) UIImageView *bgView; 19 @property (nonatomic, strong) UIImageView *bgView;
20 @property (nonatomic, strong) QMUIButton *scoreBtn; 20 @property (nonatomic, strong) QMUIButton *scoreBtn;
21 @property (nonatomic, strong) UIButton *rulesBtn; 21 @property (nonatomic, strong) UIButton *rulesBtn;
22 -@property (nonatomic, strong) CNSignInButtonView *signInButtonView; 22 +@property (nonatomic, strong) CNLiveSignInButtonView *signInButtonView;
23 @property (nonatomic, strong) UIButton *closeBtn; 23 @property (nonatomic, strong) UIButton *closeBtn;
24 24
25 @property (nonatomic, copy) NSString *score; 25 @property (nonatomic, copy) NSString *score;
@@ -28,10 +28,10 @@ @@ -28,10 +28,10 @@
28 28
29 @end 29 @end
30 30
31 -@implementation CNSignInView 31 +@implementation CNLiveSignInView
32 static const NSInteger margin = 15; 32 static const NSInteger margin = 15;
33 -+ (void)showSignInView:(NSString *)score scores:(NSString *)scores day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate{  
34 - CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 33 ++ (void)showSignInView:(NSString *)score scores:(NSString *)scores day:(NSInteger)day url:(NSString *)url delegate:(id<CNLiveSignInViewDelegate>)delegate{
  34 + CNLiveSignInView *view = [[CNLiveSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
35 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 35 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
36 view.score = score; 36 view.score = score;
37 view.scores = scores; 37 view.scores = scores;
@@ -40,8 +40,8 @@ static const NSInteger margin = 15; @@ -40,8 +40,8 @@ static const NSInteger margin = 15;
40 view.delegate = delegate; 40 view.delegate = delegate;
41 [[UIApplication sharedApplication].keyWindow addSubview:view]; 41 [[UIApplication sharedApplication].keyWindow addSubview:view];
42 } 42 }
43 -//+ (void)showSignInView:(NSString *)score day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate{  
44 -// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)]; 43 +//+ (void)showSignInView:(NSString *)score day:(NSInteger)day url:(NSString *)url delegate:(id<CNLiveSignInViewDelegate>)delegate{
  44 +// CNLiveSignInView *view = [[CNLiveSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)];
45 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 45 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
46 // view.score = score; 46 // view.score = score;
47 // view.day = day; 47 // view.day = day;
@@ -50,8 +50,8 @@ static const NSInteger margin = 15; @@ -50,8 +50,8 @@ static const NSInteger margin = 15;
50 // [[UIApplication sharedApplication].keyWindow addSubview:view]; 50 // [[UIApplication sharedApplication].keyWindow addSubview:view];
51 //} 51 //}
52 // 52 //
53 -//+ (void)showSignInView:(NSString *)score day:(NSInteger)day delegate:(id<CNSignInViewDelegate>)delegate{  
54 -// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)]; 53 +//+ (void)showSignInView:(NSString *)score day:(NSInteger)day delegate:(id<CNLiveSignInViewDelegate>)delegate{
  54 +// CNLiveSignInView *view = [[CNLiveSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)];
55 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 55 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
56 // view.score = score; 56 // view.score = score;
57 // view.day = day; 57 // view.day = day;
@@ -60,8 +60,8 @@ static const NSInteger margin = 15; @@ -60,8 +60,8 @@ static const NSInteger margin = 15;
60 // 60 //
61 //} 61 //}
62 // 62 //
63 -//+ (void)showSignInView:(NSString *)score delegate:(id<CNSignInViewDelegate>)delegate{  
64 -// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)]; 63 +//+ (void)showSignInView:(NSString *)score delegate:(id<CNLiveSignInViewDelegate>)delegate{
  64 +// CNLiveSignInView *view = [[CNLiveSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)];
65 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 65 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
66 // view.score = score; 66 // view.score = score;
67 // view.delegate = delegate; 67 // view.delegate = delegate;
@@ -69,8 +69,8 @@ static const NSInteger margin = 15; @@ -69,8 +69,8 @@ static const NSInteger margin = 15;
69 // 69 //
70 //} 70 //}
71 // 71 //
72 -//+ (void)showSignInViewDelegate:(id<CNSignInViewDelegate>)delegate{  
73 -// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 72 +//+ (void)showSignInViewDelegate:(id<CNLiveSignInViewDelegate>)delegate{
  73 +// CNLiveSignInView *view = [[CNLiveSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
74 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 74 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
75 // view.delegate = delegate; 75 // view.delegate = delegate;
76 // [[UIApplication sharedApplication].keyWindow addSubview:view]; 76 // [[UIApplication sharedApplication].keyWindow addSubview:view];
@@ -78,7 +78,7 @@ static const NSInteger margin = 15; @@ -78,7 +78,7 @@ static const NSInteger margin = 15;
78 //} 78 //}
79 // 79 //
80 //+ (void)showSignInView:(NSString *)score{ 80 //+ (void)showSignInView:(NSString *)score{
81 -// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 81 +// CNLiveSignInView *view = [[CNLiveSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
82 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 82 // view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
83 // view.score = score; 83 // view.score = score;
84 // [[UIApplication sharedApplication].keyWindow addSubview:view]; 84 // [[UIApplication sharedApplication].keyWindow addSubview:view];
@@ -186,7 +186,7 @@ static const NSInteger margin = 15; @@ -186,7 +186,7 @@ static const NSInteger margin = 15;
186 186
187 }]; 187 }];
188 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { 188 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) {
189 - if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ 189 + if([view isKindOfClass:[CNLiveGoldWhereaboutsView class]]){
190 [view removeFromSuperview]; 190 [view removeFromSuperview];
191 191
192 } 192 }
@@ -259,9 +259,9 @@ static const NSInteger margin = 15; @@ -259,9 +259,9 @@ static const NSInteger margin = 15;
259 return _scoreBtn; 259 return _scoreBtn;
260 260
261 } 261 }
262 -- (CNSignInButtonView *)signInButtonView{ 262 +- (CNLiveSignInButtonView *)signInButtonView{
263 if(_signInButtonView == nil){ 263 if(_signInButtonView == nil){
264 - _signInButtonView = [[CNSignInButtonView alloc]initWithFrame:CGRectMake(0, 0, 280*(SCREEN_WIDTH/375.0)+50, 160*(SCREEN_WIDTH/375.0)+30)]; 264 + _signInButtonView = [[CNLiveSignInButtonView alloc]initWithFrame:CGRectMake(0, 0, 280*(SCREEN_WIDTH/375.0)+50, 160*(SCREEN_WIDTH/375.0)+30)];
265 265
266 } 266 }
267 return _signInButtonView; 267 return _signInButtonView;
CNLiveIntegralModule/Classes/View/CNIntegralDetailsTableViewCell.h renamed to CNLiveIntegralModule/Classes/View/CNLiveIntegralDetailsTableViewCell.h
1 // 1 //
2 -// CNIntegralDetailsTableViewCell.h 2 +// CNLiveIntegralDetailsTableViewCell.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
@@ -10,11 +10,11 @@ @@ -10,11 +10,11 @@
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 12
13 -#define kCNIntegralDetailsTableViewCell @"CNIntegralDetailsTableViewCell"  
14 -@class CNScoreModel; 13 +#define kCNLiveIntegralDetailsTableViewCell @"CNLiveIntegralDetailsTableViewCell"
  14 +@class CNLiveScoreModel;
15 15
16 -@interface CNIntegralDetailsTableViewCell : UITableViewCell  
17 -@property (nonatomic, strong) CNScoreModel *model; 16 +@interface CNLiveIntegralDetailsTableViewCell : UITableViewCell
  17 +@property (nonatomic, strong) CNLiveScoreModel *model;
18 18
19 @end 19 @end
20 20
CNLiveIntegralModule/Classes/View/CNIntegralDetailsTableViewCell.m renamed to CNLiveIntegralModule/Classes/View/CNLiveIntegralDetailsTableViewCell.m
1 // 1 //
2 -// CNIntegralDetailsTableViewCell.m 2 +// CNLiveIntegralDetailsTableViewCell.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNIntegralDetailsTableViewCell.h" 9 +#import "CNLiveIntegralDetailsTableViewCell.h"
10 #import "QMUIKit.h" 10 #import "QMUIKit.h"
11 #import <Masonry/Masonry.h> 11 #import <Masonry/Masonry.h>
12 #import <SDWebImage/SDWebImage.h> 12 #import <SDWebImage/SDWebImage.h>
13 13
14 -#import "CNScoreModel.h" 14 +#import "CNLiveScoreModel.h"
15 15
16 -@interface CNIntegralDetailsTableViewCell() 16 +@interface CNLiveIntegralDetailsTableViewCell()
17 @property (nonatomic, strong) UILabel *titleLabel; 17 @property (nonatomic, strong) UILabel *titleLabel;
18 @property (nonatomic, strong) UILabel *timeLabel; 18 @property (nonatomic, strong) UILabel *timeLabel;
19 @property (nonatomic, strong) QMUIButton *scoresBtn; 19 @property (nonatomic, strong) QMUIButton *scoresBtn;
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 21
22 @end 22 @end
23 23
24 -@implementation CNIntegralDetailsTableViewCell 24 +@implementation CNLiveIntegralDetailsTableViewCell
25 static const NSInteger margin = 15; 25 static const NSInteger margin = 15;
26 26
27 #pragma mark - Init 27 #pragma mark - Init
@@ -30,7 +30,8 @@ static const NSInteger margin = 15; @@ -30,7 +30,8 @@ static const NSInteger margin = 15;
30 if (self) { 30 if (self) {
31 self.contentView.backgroundColor = [UIColor whiteColor]; 31 self.contentView.backgroundColor = [UIColor whiteColor];
32 [self setupUI]; 32 [self setupUI];
33 - 33 + [self xw_layoutSubviews];
  34 +
34 } 35 }
35 return self; 36 return self;
36 } 37 }
@@ -43,8 +44,7 @@ static const NSInteger margin = 15; @@ -43,8 +44,7 @@ static const NSInteger margin = 15;
43 [self.contentView addSubview:self.line]; 44 [self.contentView addSubview:self.line];
44 45
45 } 46 }
46 -- (void)layoutSubviews{  
47 - [super layoutSubviews]; 47 +- (void)xw_layoutSubviews{
48 [_scoresBtn mas_makeConstraints:^(MASConstraintMaker *make) { 48 [_scoresBtn mas_makeConstraints:^(MASConstraintMaker *make) {
49 make.centerY.equalTo(self.mas_centerY).with.offset(0); 49 make.centerY.equalTo(self.mas_centerY).with.offset(0);
50 make.right.equalTo(self.mas_right).with.offset(-margin); 50 make.right.equalTo(self.mas_right).with.offset(-margin);
@@ -78,7 +78,7 @@ static const NSInteger margin = 15; @@ -78,7 +78,7 @@ static const NSInteger margin = 15;
78 78
79 } 79 }
80 #pragma mark - Data 80 #pragma mark - Data
81 -- (void)setModel:(CNScoreModel *)model{ 81 +- (void)setModel:(CNLiveScoreModel *)model{
82 _model = model; 82 _model = model;
83 _titleLabel.text = model.title; 83 _titleLabel.text = model.title;
84 _timeLabel.text = model.date; 84 _timeLabel.text = model.date;
@@ -96,6 +96,7 @@ static const NSInteger margin = 15; @@ -96,6 +96,7 @@ static const NSInteger margin = 15;
96 96
97 // Configure the view for the selected state 97 // Configure the view for the selected state
98 } 98 }
  99 +
99 #pragma mark - Private Methods 100 #pragma mark - Private Methods
100 101
101 102
@@ -121,7 +122,8 @@ static const NSInteger margin = 15; @@ -121,7 +122,8 @@ static const NSInteger margin = 15;
121 return _timeLabel; 122 return _timeLabel;
122 123
123 } 124 }
124 -- ( QMUIButton *)scoresBtn{ 125 +
  126 +- (QMUIButton *)scoresBtn{
125 if(_scoresBtn == nil){ 127 if(_scoresBtn == nil){
126 _scoresBtn = [QMUIButton buttonWithType:UIButtonTypeCustom]; 128 _scoresBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
127 _scoresBtn.titleLabel.font = UIFontMake(14); 129 _scoresBtn.titleLabel.font = UIFontMake(14);
@@ -143,4 +145,5 @@ static const NSInteger margin = 15; @@ -143,4 +145,5 @@ static const NSInteger margin = 15;
143 return _line; 145 return _line;
144 146
145 } 147 }
  148 +
146 @end 149 @end
CNLiveIntegralModule/Classes/View/CNRewardRulesView.h renamed to CNLiveIntegralModule/Classes/View/CNLiveRewardRulesView.h
1 // 1 //
2 -// CNRewardRulesView.h 2 +// CNLiveRewardRulesView.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 12
13 -@interface CNRewardRulesView : UIView 13 +@interface CNLiveRewardRulesView : UIView
14 + (void)showRewardRulesView; 14 + (void)showRewardRulesView;
15 + (void)showRewardRulesView:(NSString *)url; 15 + (void)showRewardRulesView:(NSString *)url;
16 16
CNLiveIntegralModule/Classes/View/CNRewardRulesView.m renamed to CNLiveIntegralModule/Classes/View/CNLiveRewardRulesView.m
1 // 1 //
2 -// CNRewardRulesView.m 2 +// CNLiveRewardRulesView.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNRewardRulesView.h" 9 +#import "CNLiveRewardRulesView.h"
10 #import <WebKit/WebKit.h> 10 #import <WebKit/WebKit.h>
11 #import "QMUIKit.h" 11 #import "QMUIKit.h"
12 #import "YYKit.h" 12 #import "YYKit.h"
13 #import <Masonry/Masonry.h> 13 #import <Masonry/Masonry.h>
14 14
15 -#import "CNGoldWhereaboutsView.h" 15 +#import "CNLiveGoldWhereaboutsView.h"
16 16
17 -@interface CNRewardRulesView()<WKNavigationDelegate,WKUIDelegate> 17 +@interface CNLiveRewardRulesView()<WKNavigationDelegate,WKUIDelegate>
18 @property (nonatomic, strong) UIImageView *bgView; 18 @property (nonatomic, strong) UIImageView *bgView;
19 @property (nonatomic, strong) UIButton *closeBtn; 19 @property (nonatomic, strong) UIButton *closeBtn;
20 @property (nonatomic, strong) WKWebView *webView; 20 @property (nonatomic, strong) WKWebView *webView;
21 21
22 @end 22 @end
23 23
24 -@implementation CNRewardRulesView 24 +@implementation CNLiveRewardRulesView
25 static const NSInteger margin = 0; 25 static const NSInteger margin = 0;
  26 +
26 #pragma mark - Using Method 27 #pragma mark - Using Method
27 + (void)showRewardRulesView:(NSString *)url{ 28 + (void)showRewardRulesView:(NSString *)url{
28 - CNRewardRulesView *view = [[CNRewardRulesView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 29 + CNLiveRewardRulesView *view = [[CNLiveRewardRulesView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
29 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 30 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
30 [view.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]]; 31 [view.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
31 [[UIApplication sharedApplication].keyWindow addSubview:view]; 32 [[UIApplication sharedApplication].keyWindow addSubview:view];
32 33
33 } 34 }
34 + (void)showRewardRulesView{ 35 + (void)showRewardRulesView{
35 - CNRewardRulesView *view = [[CNRewardRulesView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 36 + CNLiveRewardRulesView *view = [[CNLiveRewardRulesView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
36 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; 37 view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f];
37 [[UIApplication sharedApplication].keyWindow addSubview:view]; 38 [[UIApplication sharedApplication].keyWindow addSubview:view];
38 39
@@ -113,7 +114,7 @@ static const NSInteger margin = 0; @@ -113,7 +114,7 @@ static const NSInteger margin = 0;
113 }]; 114 }];
114 115
115 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { 116 for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) {
116 - if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ 117 + if([view isKindOfClass:[CNLiveGoldWhereaboutsView class]]){
117 [view removeFromSuperview]; 118 [view removeFromSuperview];
118 119
119 } 120 }
CNLiveIntegralModule/Classes/View/CNSignInButtonSelectView.h renamed to CNLiveIntegralModule/Classes/View/CNLiveSignInButtonSelectView.h
1 // 1 //
2 -// CNSignInButtonSelectView.h 2 +// CNLiveSignInButtonSelectView.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 12
13 -@interface CNSignInButtonSelectView : UIView 13 +@interface CNLiveSignInButtonSelectView : UIView
14 14
15 @end 15 @end
16 16
CNLiveIntegralModule/Classes/View/CNSignInButtonSelectView.m renamed to CNLiveIntegralModule/Classes/View/CNLiveSignInButtonSelectView.m
1 // 1 //
2 -// CNSignInButtonSelectView.m 2 +// CNLiveSignInButtonSelectView.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNSignInButtonSelectView.h"  
10 -@interface CNSignInButtonSelectView() 9 +#import "CNLiveSignInButtonSelectView.h"
  10 +@interface CNLiveSignInButtonSelectView()
11 @property (nonatomic, strong) UIImageView *selectView; 11 @property (nonatomic, strong) UIImageView *selectView;
12 12
13 @end 13 @end
14 -@implementation CNSignInButtonSelectView 14 +
  15 +@implementation CNLiveSignInButtonSelectView
15 #pragma mark - Init 16 #pragma mark - Init
16 - (instancetype)initWithFrame:(CGRect)frame { 17 - (instancetype)initWithFrame:(CGRect)frame {
17 self = [super initWithFrame:frame]; 18 self = [super initWithFrame:frame];
18 if (self) { 19 if (self) {
19 self.userInteractionEnabled = YES; 20 self.userInteractionEnabled = YES;
20 self.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.6]; 21 self.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.6];
21 - [self setup]; 22 + [self addSubview:self.selectView];
22 } 23 }
23 return self; 24 return self;
24 } 25 }
25 -#pragma mark - UI  
26 -- (void)setup {  
27 - [self addSubview:self.selectView];  
28 -}  
29 /* 26 /*
30 // Only override drawRect: if you perform custom drawing. 27 // Only override drawRect: if you perform custom drawing.
31 // An empty implementation adversely affects performance during animation. 28 // An empty implementation adversely affects performance during animation.
CNLiveIntegralModule/Classes/View/CNSignInButtonView.h renamed to CNLiveIntegralModule/Classes/View/CNLiveSignInButtonView.h
1 // 1 //
2 -// CNSignInButtonView.h 2 +// CNLiveSignInButtonView.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
@@ -9,16 +9,16 @@ @@ -9,16 +9,16 @@
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 -@class CNSignInButtonView;  
13 -@protocol CNSignInButtonViewDelegate <NSObject>  
14 -- (void)clickedSignInButton:(CNSignInButtonView *)view day:(NSString *)day; 12 +@class CNLiveSignInButtonView;
  13 +@protocol CNLiveSignInButtonViewDelegate <NSObject>
  14 +- (void)clickedSignInButton:(CNLiveSignInButtonView *)view day:(NSString *)day;
15 15
16 @end 16 @end
17 -@interface CNSignInButtonView : UIView 17 +@interface CNLiveSignInButtonView : UIView
18 18
19 @property (nonatomic, assign) NSInteger day; 19 @property (nonatomic, assign) NSInteger day;
20 @property (nonatomic, copy) NSString *scores; 20 @property (nonatomic, copy) NSString *scores;
21 -@property (nonatomic, weak) id<CNSignInButtonViewDelegate> delegate; 21 +@property (nonatomic, weak) id<CNLiveSignInButtonViewDelegate> delegate;
22 22
23 - (instancetype)initWithFrame:(CGRect)frame; 23 - (instancetype)initWithFrame:(CGRect)frame;
24 24
CNLiveIntegralModule/Classes/View/CNSignInButtonView.m renamed to CNLiveIntegralModule/Classes/View/CNLiveSignInButtonView.m
1 // 1 //
2 -// CNSignInButtonView.m 2 +// CNLiveSignInButtonView.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/3/1. 5 // Created by CNLive-zxw on 2019/3/1.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNSignInButtonView.h" 9 +#import "CNLiveSignInButtonView.h"
10 10
11 #import "QMUIKit.h" 11 #import "QMUIKit.h"
12 #import "YYKit.h" 12 #import "YYKit.h"
13 13
14 -#import "CNSignInButtonSelectView.h" 14 +#import "CNLiveSignInButtonSelectView.h"
15 15
16 -@interface CNSignInButtonView() 16 +@interface CNLiveSignInButtonView()
17 @property (nonatomic, strong) NSMutableArray *btnsArr; 17 @property (nonatomic, strong) NSMutableArray *btnsArr;
18 18
19 @end 19 @end
20 -@implementation CNSignInButtonView 20 +@implementation CNLiveSignInButtonView
21 static const NSInteger margin = 6; 21 static const NSInteger margin = 6;
22 #pragma mark - Init 22 #pragma mark - Init
23 - (instancetype)initWithFrame:(CGRect)frame { 23 - (instancetype)initWithFrame:(CGRect)frame {
@@ -50,7 +50,7 @@ static const NSInteger margin = 6; @@ -50,7 +50,7 @@ static const NSInteger margin = 6;
50 50
51 } 51 }
52 52
53 - CNSignInButtonSelectView *view = [[CNSignInButtonSelectView alloc]initWithFrame:btn.bounds]; 53 + CNLiveSignInButtonSelectView *view = [[CNLiveSignInButtonSelectView alloc]initWithFrame:btn.bounds];
54 view.hidden = !btn.selected; 54 view.hidden = !btn.selected;
55 [btn addSubview:view]; 55 [btn addSubview:view];
56 56
@@ -103,7 +103,7 @@ static const NSInteger margin = 6; @@ -103,7 +103,7 @@ static const NSInteger margin = 6;
103 if(i >= day) break; 103 if(i >= day) break;
104 UIButton *btn = self.btnsArr[i]; 104 UIButton *btn = self.btnsArr[i];
105 for (UIView *view in btn.subviews) { 105 for (UIView *view in btn.subviews) {
106 - if([view isKindOfClass:[CNSignInButtonSelectView class]]){ 106 + if([view isKindOfClass:[CNLiveSignInButtonSelectView class]]){
107 view.hidden = NO; 107 view.hidden = NO;
108 btn.userInteractionEnabled = NO; 108 btn.userInteractionEnabled = NO;
109 } 109 }
@@ -122,7 +122,7 @@ static const NSInteger margin = 6; @@ -122,7 +122,7 @@ static const NSInteger margin = 6;
122 - (void)clickBtn:(UIButton *)btn{ 122 - (void)clickBtn:(UIButton *)btn{
123 // btn.selected = !btn.selected; 123 // btn.selected = !btn.selected;
124 for (UIView *view in btn.subviews) { 124 for (UIView *view in btn.subviews) {
125 - if([view isKindOfClass:[CNSignInButtonSelectView class]]){ 125 + if([view isKindOfClass:[CNLiveSignInButtonSelectView class]]){
126 view.hidden = NO; 126 view.hidden = NO;
127 btn.userInteractionEnabled = NO; 127 btn.userInteractionEnabled = NO;
128 } 128 }
CNLiveIntegralModule/Classes/View/CNTaskListHeadView.h renamed to CNLiveIntegralModule/Classes/View/CNLiveTaskListHeadView.h
1 // 1 //
2 -// CNTaskListHeadView.h 2 +// CNLiveTaskListHeadView.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/28. 5 // Created by CNLive-zxw on 2019/2/28.
@@ -9,13 +9,13 @@ @@ -9,13 +9,13 @@
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 -@class CNTaskListHeadView;  
13 -@protocol CNTaskListHeadViewDelegate <NSObject>  
14 -- (void)clickedDetailButton:(CNTaskListHeadView *)view; 12 +@class CNLiveTaskListHeadView;
  13 +@protocol CNLiveTaskListHeadViewDelegate <NSObject>
  14 +- (void)clickedDetailButton:(CNLiveTaskListHeadView *)view;
15 15
16 @end 16 @end
17 -@interface CNTaskListHeadView : UIImageView  
18 -@property (nonatomic, weak) id<CNTaskListHeadViewDelegate> delegate; 17 +@interface CNLiveTaskListHeadView : UIImageView
  18 +@property (nonatomic, weak) id<CNLiveTaskListHeadViewDelegate> delegate;
19 @property (nonatomic, copy) NSString *score; 19 @property (nonatomic, copy) NSString *score;
20 20
21 @end 21 @end
CNLiveIntegralModule/Classes/View/CNTaskListHeadView.m renamed to CNLiveIntegralModule/Classes/View/CNLiveTaskListHeadView.m
1 // 1 //
2 -// CNTaskListHeadView.m 2 +// CNLiveTaskListHeadView.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/28. 5 // Created by CNLive-zxw on 2019/2/28.
6 // Copyright © 2019年 cnlive. All rights reserved. 6 // Copyright © 2019年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNTaskListHeadView.h" 9 +#import "CNLiveTaskListHeadView.h"
10 #import "QMUIKit.h" 10 #import "QMUIKit.h"
11 #import <Masonry/Masonry.h> 11 #import <Masonry/Masonry.h>
12 #import <SDWebImage/SDWebImage.h> 12 #import <SDWebImage/SDWebImage.h>
13 13
14 -@interface CNTaskListHeadView() 14 +@interface CNLiveTaskListHeadView()
15 @property (nonatomic, strong) UIImageView *headView; 15 @property (nonatomic, strong) UIImageView *headView;
16 @property (nonatomic, strong) UILabel *currentScore; 16 @property (nonatomic, strong) UILabel *currentScore;
17 @property (nonatomic, strong) UILabel *getScore; 17 @property (nonatomic, strong) UILabel *getScore;
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 19
20 @end 20 @end
21 21
22 -@implementation CNTaskListHeadView 22 +@implementation CNLiveTaskListHeadView
23 static const NSInteger margin = 15; 23 static const NSInteger margin = 15;
24 #pragma mark - Init 24 #pragma mark - Init
25 - (instancetype)initWithFrame:(CGRect)frame { 25 - (instancetype)initWithFrame:(CGRect)frame {
@@ -31,6 +31,7 @@ static const NSInteger margin = 15; @@ -31,6 +31,7 @@ static const NSInteger margin = 15;
31 } 31 }
32 return self; 32 return self;
33 } 33 }
  34 +
34 #pragma mark - UI 35 #pragma mark - UI
35 - (void)setup { 36 - (void)setup {
36 [self addSubview:self.headView]; 37 [self addSubview:self.headView];
@@ -39,6 +40,7 @@ static const NSInteger margin = 15; @@ -39,6 +40,7 @@ static const NSInteger margin = 15;
39 [self addSubview:self.detailBtn]; 40 [self addSubview:self.detailBtn];
40 41
41 } 42 }
  43 +
42 - (void)layoutSubviews{ 44 - (void)layoutSubviews{
43 [super layoutSubviews]; 45 [super layoutSubviews];
44 [_headView mas_makeConstraints:^(MASConstraintMaker *make) { 46 [_headView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -128,6 +130,7 @@ static const NSInteger margin = 15; @@ -128,6 +130,7 @@ static const NSInteger margin = 15;
128 - (QMUIButton *)detailBtn{ 130 - (QMUIButton *)detailBtn{
129 if(_detailBtn == nil){ 131 if(_detailBtn == nil){
130 _detailBtn = [QMUIButton buttonWithType:UIButtonTypeCustom]; 132 _detailBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
  133 + _detailBtn.adjustsButtonWhenHighlighted = NO;
131 _detailBtn.titleLabel.font = UIFontMake(12); 134 _detailBtn.titleLabel.font = UIFontMake(12);
132 [_detailBtn addTarget:self action:@selector(clickedDetailButton:) forControlEvents:UIControlEventTouchUpInside]; 135 [_detailBtn addTarget:self action:@selector(clickedDetailButton:) forControlEvents:UIControlEventTouchUpInside];
133 [_detailBtn setTitle:@"明细" forState:UIControlStateNormal]; 136 [_detailBtn setTitle:@"明细" forState:UIControlStateNormal];
CNLiveIntegralModule/Classes/View/CNTaskListTableViewCell.h renamed to CNLiveIntegralModule/Classes/View/CNLiveTaskListTableViewCell.h
1 // 1 //
2 -// CNTaskListTableViewCell.h 2 +// CNLiveTaskListTableViewCell.h
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 // Created by CNLive-zxw on 2019/2/26. 5 // Created by CNLive-zxw on 2019/2/26.
@@ -9,17 +9,17 @@ @@ -9,17 +9,17 @@
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 -#define kCNTaskListTableViewCell @"CNTaskListTableViewCell"  
13 -@class CNTaskListItemModel;  
14 -@class CNTaskListTableViewCell; 12 +#define kCNLiveTaskListTableViewCell @"CNLiveTaskListTableViewCell"
  13 +@class CNLiveTaskListItemModel;
  14 +@class CNLiveTaskListTableViewCell;
15 15
16 -@protocol CNTaskListTableViewCellDelegate <NSObject>  
17 -- (void)clickedCellButton:(CNTaskListTableViewCell *)cell type:(NSString *)type; 16 +@protocol CNLiveTaskListTableViewCellDelegate <NSObject>
  17 +- (void)clickedCellButton:(CNLiveTaskListTableViewCell *)cell type:(NSString *)type;
18 18
19 @end 19 @end
20 -@interface CNTaskListTableViewCell : UITableViewCell  
21 -@property (nonatomic, strong) CNTaskListItemModel *model;  
22 -@property (nonatomic, weak) id<CNTaskListTableViewCellDelegate> delegate; 20 +@interface CNLiveTaskListTableViewCell : UITableViewCell
  21 +@property (nonatomic, strong) CNLiveTaskListItemModel *model;
  22 +@property (nonatomic, weak) id<CNLiveTaskListTableViewCellDelegate> delegate;
23 23
24 @end 24 @end
25 25
CNLiveIntegralModule/Classes/View/CNTaskListTableViewCell.m renamed to CNLiveIntegralModule/Classes/View/CNLiveTaskListTableViewCell.m
1 // 1 //
2 -// CNTaskListTableViewCell.m 2 +// CNLiveTaskListTableViewCell.m
3 // CNLiveIntegralModule 3 // CNLiveIntegralModule
4 // 4 //
5 -// Created by CNLive-zxw on 2019/2/26.  
6 -// Copyright © 2019年 cnlive. All rights reserved. 5 +// Created by CNLiveLive-zxw on 2019/2/26.
  6 +// Copyright © 2019年 CNLivelive. All rights reserved.
7 // 7 //
8 8
9 -#import "CNTaskListTableViewCell.h" 9 +#import "CNLiveTaskListTableViewCell.h"
10 #import <Masonry/Masonry.h> 10 #import <Masonry/Masonry.h>
11 #import <SDWebImage/SDWebImage.h> 11 #import <SDWebImage/SDWebImage.h>
12 #import "QMUIKit.h" 12 #import "QMUIKit.h"
13 13
14 -#import "CNTaskListModel.h" 14 +#import "CNLiveTaskListModel.h"
15 15
16 -@interface CNTaskListTableViewCell() 16 +@interface CNLiveTaskListTableViewCell()
17 @property (nonatomic, strong) UIImageView *leftImage; 17 @property (nonatomic, strong) UIImageView *leftImage;
18 @property (nonatomic, strong) UILabel *titleLabel; 18 @property (nonatomic, strong) UILabel *titleLabel;
19 @property (nonatomic, strong) UILabel *pointLabel; 19 @property (nonatomic, strong) UILabel *pointLabel;
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 23
24 @end 24 @end
25 25
26 -@implementation CNTaskListTableViewCell 26 +@implementation CNLiveTaskListTableViewCell
27 static const NSInteger margin = 20; 27 static const NSInteger margin = 20;
28 28
29 #pragma mark - Init 29 #pragma mark - Init
@@ -130,7 +130,7 @@ static const NSInteger margin = 20; @@ -130,7 +130,7 @@ static const NSInteger margin = 20;
130 } 130 }
131 131
132 } 132 }
133 -- (void)setModel:(CNTaskListItemModel *)model{ 133 +- (void)setModel:(CNLiveTaskListItemModel *)model{
134 _model = model; 134 _model = model;
135 [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.icon] completed:nil]; 135 [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.icon] completed:nil];
136 _titleLabel.text = model.title; 136 _titleLabel.text = model.title;