Commit 63f27162d9a8e84d48b7b6ebe20cab51b71982cc

Authored by iOS-Xiaowen
1 parent 37b62239

no message

CNLiveBMineModule/Classes/Controller/CNLiveBMineController.h renamed to CNLiveBMineModule/Classes/Controller/CNLiveMineController.h
1 1 //
2   -// CNLiveBMineController.h
  2 +// CNLiveMineController.h
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
... ... @@ -14,7 +14,7 @@
14 14  
15 15 NS_ASSUME_NONNULL_BEGIN
16 16  
17   -@interface CNLiveBMineController : CNCommonViewController
  17 +@interface CNLiveMineController : CNCommonViewController
18 18  
19 19 @end
20 20  
... ...
CNLiveBMineModule/Classes/Controller/CNLiveBMineController.m renamed to CNLiveBMineModule/Classes/Controller/CNLiveMineController.m
... ... @@ -6,7 +6,7 @@
6 6 // Copyright (c) 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
9   -#import "CNLiveBMineController.h"
  9 +#import "CNLiveMineController.h"
10 10  
11 11 #import "MJExtension.h"
12 12 #import "QMUIKit.h"
... ... @@ -17,22 +17,22 @@
17 17 //#import "CNLiveEnvironment.h"
18 18 #import "CNLiveCategory.h"
19 19  
20   -#import "CNLiveBMineHeaderView.h"
21   -#import "CNLiveBMineCell.h"
22   -#import "CNLiveBMineModel.h"
23   -#import "CNLiveBMineRequest.h"
  20 +#import "CNLiveMineHeaderView.h"
  21 +#import "CNLiveMineCell.h"
  22 +#import "CNLiveMineModel.h"
  23 +#import "CNLiveMineRequest.h"
24 24  
25 25 #import "CNLiveUserInfoController.h"
26 26 #import "CNLiveSettingController.h"
27 27  
28   -@interface CNLiveBMineController()<UITableViewDelegate, UITableViewDataSource, CNLiveBMineHeaderViewDelegate, CNLiveBMineCellDelegate>
  28 +@interface CNLiveMineController()<UITableViewDelegate, UITableViewDataSource, CNLiveMineHeaderViewDelegate, CNLiveMineCellDelegate>
29 29 @property (nonatomic, strong) UITableView *tableView;
30   -@property (nonatomic, weak) CNLiveBMineHeaderView *headerView;
  30 +@property (nonatomic, weak) CNLiveMineHeaderView *headerView;
31 31 @property (nonatomic, strong) NSMutableArray *data;
32 32  
33 33 @end
34 34  
35   -@implementation CNLiveBMineController
  35 +@implementation CNLiveMineController
36 36 static const NSInteger kHEIGHT = 253;
37 37 static const CGFloat timeValue = 1.5;
38 38  
... ... @@ -53,7 +53,7 @@ static const CGFloat timeValue = 1.5;
53 53 }
54 54 ];
55 55 for(NSDictionary *dic in data){
56   - CNLiveBMineModel *model = [CNLiveBMineModel mj_objectWithKeyValues:dic];
  56 + CNLiveMineModel *model = [CNLiveMineModel mj_objectWithKeyValues:dic];
57 57 [self.data addObject:model];
58 58 }
59 59 [self.tableView reloadData];
... ... @@ -65,7 +65,7 @@ static const CGFloat timeValue = 1.5;
65 65 [super viewWillAppear:animated];
66 66 self.navigationController.navigationBarHidden = YES;
67 67  
68   - [self requestCertification];
  68 +// [self requestCertification];
69 69 if(self.headerView){
70 70 self.headerView.frame = CGRectMake(0, -kHEIGHT, SCREEN_WIDTH, kHEIGHT);
71 71 }
... ... @@ -88,7 +88,7 @@ static const CGFloat timeValue = 1.5;
88 88  
89 89 - (void)createSubViews {
90 90 [self.view addSubview:self.tableView];
91   - CNLiveBMineHeaderView *headerView = [[CNLiveBMineHeaderView alloc]initWithFrame:CGRectMake(0, -kHEIGHT, SCREEN_WIDTH, kHEIGHT)];
  91 + CNLiveMineHeaderView *headerView = [[CNLiveMineHeaderView alloc]initWithFrame:CGRectMake(0, -kHEIGHT, SCREEN_WIDTH, kHEIGHT)];
92 92 headerView.delegate = self;
93 93 headerView.tag = 666;
94 94 [self.tableView addSubview:headerView];
... ... @@ -116,7 +116,7 @@ static const CGFloat timeValue = 1.5;
116 116 }
117 117  
118 118 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
119   - CNLiveBMineCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBMineCell];
  119 + CNLiveMineCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveMineCell];
120 120 cell.selectionStyle = UITableViewCellSelectionStyleNone;
121 121 cell.delegate = self;
122 122 cell.model = self.data[indexPath.row];
... ... @@ -129,15 +129,15 @@ static const CGFloat timeValue = 1.5;
129 129 }
130 130  
131 131 #pragma mark - CNLiveBMineHeaderViewDelegate
132   -- (void)headerView:(CNLiveBMineHeaderView *)headerView pushToController:(CNLiveBMineHeaderViewType)type{
  132 +- (void)headerView:(CNLiveMineHeaderView *)headerView pushToController:(CNLiveMineHeaderViewType)type{
133 133 switch (type) {
134   - case CNLiveBMineHeaderViewTypeUerInfo:
  134 + case CNLiveMineHeaderViewTypeUerInfo:
135 135 {
136 136 CNLiveUserInfoController *vc = [[CNLiveUserInfoController alloc]init];
137 137 [self.navigationController pushViewController:vc animated:YES];
138 138 }
139 139 break;
140   - case CNLiveBMineHeaderViewTypeHome:
  140 + case CNLiveMineHeaderViewTypeHome:
141 141 {
142 142  
143 143 }
... ... @@ -146,34 +146,9 @@ static const CGFloat timeValue = 1.5;
146 146 }
147 147  
148 148 #pragma mark - 请求方法
149   -// 请求签到赚积分
150   -- (void)requestSignIn{
151   - self.headerView.interactionEnabled = NO;
152   - [CNLiveBMineRequest signIn:^(BOOL isSuccess, NSDictionary * _Nonnull data, NSError * _Nonnull error) {
153   - if (error.code == -1001 || error.code == -1009) {
154   - [QMUITips showError:@"网络连接已断开" inView:self.view hideAfterDelay:timeValue];
155   - return ;
156   - }
157   - if (isSuccess) {
158   - id<CNLiveIntegralServiceProtocol> service = [[BeeHive shareInstance] createService:@protocol(CNLiveIntegralServiceProtocol)];
159   - NSInteger status = [data[@"status"] integerValue];
160   - if (status == 1) {
161   - [service showGoldWhereaboutsViewWithDic:data];
162   - }else{
163   - [service showSignInViewWithDic:data];
164   - }
165   -
166   - }else{
167   - [QMUITips showError:@"签到失败" inView:self.view hideAfterDelay:timeValue];
168   -
169   - }
170   - self.headerView.interactionEnabled = YES;
171   - }];
172   -}
173   -
174 149 // 请求用户认证
175 150 - (void)requestCertification{
176   - [CNLiveBMineRequest certification:^(BOOL isSuccess, NSDictionary * _Nonnull data, NSError * _Nonnull error) {
  151 + [CNLiveMineRequest certification:^(BOOL isSuccess, NSDictionary * _Nonnull data, NSError * _Nonnull error) {
177 152 if (error.code == -1001 || error.code == -1009) {
178 153 [QMUITips showError:@"网络连接已断开" inView:self.view hideAfterDelay:timeValue];
179 154 return ;
... ... @@ -193,8 +168,8 @@ static const CGFloat timeValue = 1.5;
193 168 }];
194 169 }
195 170  
196   -#pragma mark - CNLiveBMineCellDelegate
197   -- (void)cell:(CNLiveBMineCell *)cell didSelectItemAtItem:(NSInteger)item{
  171 +#pragma mark - CNLiveMineCellDelegate
  172 +- (void)cell:(CNLiveMineCell *)cell didSelectItemAtItem:(NSInteger)item{
198 173 // switch (cell.model.type) {
199 174 // case CNLiveBMineCellTypeOrder:
200 175 // {
... ... @@ -316,7 +291,7 @@ static const CGFloat timeValue = 1.5;
316 291 _tableView.estimatedRowHeight = 0;
317 292 _tableView.estimatedSectionHeaderHeight = 0;
318 293 _tableView.estimatedSectionFooterHeight = 0;
319   - [_tableView registerClass:[CNLiveBMineCell class] forCellReuseIdentifier:kCNLiveBMineCell];
  294 + [_tableView registerClass:[CNLiveMineCell class] forCellReuseIdentifier:kCNLiveMineCell];
320 295 _tableView.contentInset = UIEdgeInsetsMake(kHEIGHT, 0, 0, 0);
321 296 }
322 297 return _tableView;
... ...
CNLiveBMineModule/Classes/Model/CNLiveBMineModel.h renamed to CNLiveBMineModule/Classes/Model/CNLiveMineModel.h
1 1 //
2   -// CNLiveBMineModel.h
  2 +// CNLiveMineModel.h
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
... ... @@ -10,7 +10,7 @@
10 10  
11 11 NS_ASSUME_NONNULL_BEGIN
12 12  
13   -@interface CNLiveBMineModel : NSObject
  13 +@interface CNLiveMineModel : NSObject
14 14 @property (nonatomic, copy) NSString *name;
15 15 @property (nonatomic, copy) NSString *image;
16 16  
... ...
CNLiveBMineModule/Classes/Model/CNLiveBMineModel.m renamed to CNLiveBMineModule/Classes/Model/CNLiveMineModel.m
1 1 //
2   -// CNLiveBMineModel.m
  2 +// CNLiveMineModel.m
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
6 6 // Copyright © 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
9   -#import "CNLiveBMineModel.h"
  9 +#import "CNLiveMineModel.h"
10 10  
11   -@implementation CNLiveBMineModel
  11 +@implementation CNLiveMineModel
12 12  
13 13  
14 14 @end
... ...
CNLiveBMineModule/Classes/Model/CNLiveBMineRequest.h renamed to CNLiveBMineModule/Classes/Model/CNLiveMineRequest.h
1 1 //
2   -// CNLiveBMineRequest.h
  2 +// CNLiveMineRequest.h
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
... ... @@ -10,17 +10,12 @@
10 10  
11 11 NS_ASSUME_NONNULL_BEGIN
12 12 typedef void(^CertificationBlock)(BOOL isSuccess, NSDictionary *data, NSError *error);
13   -typedef void(^SignInBlock)(BOOL isSuccess, NSDictionary *data, NSError *error);
14 13  
15   -@interface CNLiveBMineRequest : NSObject
  14 +@interface CNLiveMineRequest : NSObject
16 15  
17 16 // 请求用户认证
18 17 + (void)certification:(CertificationBlock)block;
19 18  
20   -
21   -// 签到
22   -+ (void)signIn:(SignInBlock)block;
23   -
24 19 @end
25 20  
26 21 NS_ASSUME_NONNULL_END
... ...
CNLiveBMineModule/Classes/Model/CNLiveBMineRequest.m renamed to CNLiveBMineModule/Classes/Model/CNLiveMineRequest.m
1 1 //
2   -// CNLiveBMineRequest.m
  2 +// CNLiveMineRequest.m
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
6 6 // Copyright © 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
9   -#import "CNLiveBMineRequest.h"
  9 +#import "CNLiveMineRequest.h"
10 10 #import "CNLiveCategory.h"
11 11 #import "CNLiveNetworking.h"
12 12 #import "CNLiveEnvironment.h"
13 13 #import "CNUserInfoManager.h"
14 14  
15   -@implementation CNLiveBMineRequest
  15 +@implementation CNLiveMineRequest
16 16 // 请求用户认证
17 17 + (void)certification:(CertificationBlock)block {
18 18 NSDictionary *params = @{
... ... @@ -33,20 +33,4 @@
33 33  
34 34 }
35 35  
36   -+ (void)signIn:(SignInBlock)block {
37   - NSDictionary *params = @{@"sid":CNUserShareModel.uid};
38   - [CNLiveNetworking setAllowRequestDefaultArgument:YES];
39   - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNIntegralSignInUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
40   - if (responseObject && [responseObject isKindOfClass:[NSDictionary class]] && responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]) {
41   - NSString *errorCode = [NSString stringWithFormat:@"%@", responseObject[@"errorCode"]];
42   - NSDictionary *data = responseObject[@"data"];
43   - block?block([errorCode isEqualToString:@"0"], data, error):@"";
44   - }else{
45   - block?block(NO, @{}, error):@"";
46   -
47   - }
48   -
49   - }];
50   -}
51   -
52 36 @end
... ...
CNLiveBMineModule/Classes/Module/CNLiveBMineService.m
... ... @@ -10,7 +10,7 @@
10 10 #import "CNLiveServices.h"
11 11 #import "CNLivePageJumpManager.h"
12 12  
13   -#import "CNLiveBMineController.h"
  13 +#import "CNLiveMineController.h"
14 14 #import "CNLiveUserInfoController.h"
15 15  
16 16 //@BeeHiveService(CNLiveBMineServiceProtocol,CNLiveBMineService)
... ... @@ -23,11 +23,11 @@
23 23  
24 24 // 我的
25 25 - (UIViewController *)getMineViewController {
26   - return [CNLiveBMineController new];
  26 + return [CNLiveMineController new];
27 27 }
28 28  
29 29 - (void)pushToMineViewController {
30   - CNLiveBMineController *vc = [[CNLiveBMineController alloc]init];
  30 + CNLiveMineController *vc = [[CNLiveMineController alloc]init];
31 31 [CNLivePageJumpManager pushViewController:vc];
32 32 }
33 33  
... ...
CNLiveBMineModule/Classes/UserInfo/CNLiveUserInfoCell.m
... ... @@ -49,14 +49,9 @@ static const NSInteger margin = 12;
49 49 - (void)setModel:(CNLiveUserInfoModel *)model{
50 50 _model = model;
51 51 _title.text = model.title;
52   -
53 52 _content.text = model.info;
54 53  
55 54 if(model.dataType == CNLiveUserInfoDataTypeHeader){
56   - _pic.backgroundColor = [UIColor whiteColor];
57   - _pic.contentMode = UIViewContentModeScaleToFill;
58   - _pic.layer.masksToBounds = YES;
59   - _pic.layer.cornerRadius = 5.0;
60 55 UIImage *xw_image = [self getImageWithImageName:@"default_avatar_y" bundleName:@"CNLiveBMineModule" targetClass:[self class]];
61 56 [_pic sd_setImageWithURL:[NSURL URLWithString:model.info] placeholderImage:xw_image];
62 57  
... ... @@ -71,13 +66,6 @@ static const NSInteger margin = 12;
71 66 }else{
72 67 _content.text = @"未知";
73 68 }
74   -
75   - }else if (model.dataType == CNLiveUserInfoDataTypeCode){
76   -
77   - }else if (model.dataType == CNLiveUserInfoDataTypeAddress){
78   -
79   - }else if (model.dataType == CNLiveUserInfoDataTypeIntroduction){
80   -
81 69 }
82 70  
83 71 [self xw_layoutSubviews];
... ... @@ -120,7 +108,6 @@ static const NSInteger margin = 12;
120 108 make.left.equalTo(self.title.mas_right).with.offset(margin);
121 109 make.right.equalTo(self.front.mas_left).with.offset(-margin);
122 110 make.height.equalTo(self.title.mas_height);
123   -
124 111 }];
125 112 }
126 113 break;
... ... @@ -133,9 +120,10 @@ static const NSInteger margin = 12;
133 120 make.top.equalTo(self.contentView.mas_top).with.offset(margin);
134 121 make.right.equalTo(self.front.mas_left).with.offset(-margin);
135 122 make.width.height.offset(height);
136   -
137 123 }];
138   -
  124 + _pic.contentMode = UIViewContentModeScaleToFill;
  125 + _pic.layer.masksToBounds = YES;
  126 + _pic.layer.cornerRadius = height/2.0;
139 127 }
140 128 break;
141 129  
... ...
CNLiveBMineModule/Classes/UserInfo/CNLiveUserInfoController.m
... ... @@ -58,7 +58,7 @@
58 58 },
59 59 @{
60 60 @"layout":@"1",
61   - @"data":@"4",
  61 + @"data":@"3",
62 62 @"title":@"地区",
63 63 @"info":CNUserShareModel.location?CNUserShareModel.location:@"",
64 64 @"height":@"60",
... ...
CNLiveBMineModule/Classes/UserInfo/CNLiveUserInfoModel.m
... ... @@ -37,17 +37,9 @@
37 37  
38 38 }
39 39 else if([self.data isEqualToString:@"3"]){
40   - return CNLiveUserInfoDataTypeCode;
41   -
42   - }
43   - else if([self.data isEqualToString:@"4"]){
44 40 return CNLiveUserInfoDataTypeAddress;
45 41  
46 42 }
47   - else if([self.data isEqualToString:@"5"]){
48   - return CNLiveUserInfoDataTypeIntroduction;
49   -
50   - }
51 43 return CNLiveUserInfoDataTypeNickname;
52 44 }
53 45  
... ...
CNLiveBMineModule/Classes/View/CNLiveBMineCell.h renamed to CNLiveBMineModule/Classes/View/CNLiveMineCell.h
1 1 //
2   -// CNLiveBMineCell.h
  2 +// CNLiveMineCell.h
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
... ... @@ -7,21 +7,21 @@
7 7 //
8 8  
9 9 #import <UIKit/UIKit.h>
10   -#import "CNLiveBMineModel.h"
  10 +#import "CNLiveMineModel.h"
11 11  
12 12 NS_ASSUME_NONNULL_BEGIN
13   -@class CNLiveBMineCell;
  13 +@class CNLiveMineCell;
14 14  
15   -static NSString * const kCNLiveBMineCell = @"CNLiveBMineCell";
16   -@protocol CNLiveBMineCellDelegate <NSObject>
  15 +static NSString * const kCNLiveMineCell = @"CNLiveMineCell";
  16 +@protocol CNLiveMineCellDelegate <NSObject>
17 17 @optional
18   -- (void)cell:(CNLiveBMineCell *)cell didSelectItemAtItem:(NSInteger)item;
  18 +- (void)cell:(CNLiveMineCell *)cell didSelectItemAtItem:(NSInteger)item;
19 19  
20 20 @end
21 21  
22   -@interface CNLiveBMineCell : UITableViewCell
23   -@property (nonatomic, strong) CNLiveBMineModel *model;
24   -@property (nonatomic, weak) id<CNLiveBMineCellDelegate> delegate;
  22 +@interface CNLiveMineCell : UITableViewCell
  23 +@property (nonatomic, strong) CNLiveMineModel *model;
  24 +@property (nonatomic, weak) id<CNLiveMineCellDelegate> delegate;
25 25  
26 26 @end
27 27  
... ...
CNLiveBMineModule/Classes/View/CNLiveBMineCell.m renamed to CNLiveBMineModule/Classes/View/CNLiveMineCell.m
1 1 //
2   -// CNLiveBMineCell.m
  2 +// CNLiveMineCell.m
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
6 6 // Copyright © 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
9   -#import "CNLiveBMineCell.h"
  9 +#import "CNLiveMineCell.h"
10 10 #import <Masonry/Masonry.h>
11 11 #import "QMUIKit.h"
12 12 #import "CNLiveCategory.h"
13 13 #import "CNLiveBaseKit.h"
14 14  
15   -@interface CNLiveBMineCell()
  15 +@interface CNLiveMineCell()
16 16 @property (nonatomic, strong) UIImageView *leftImage;
17 17 @property (nonatomic, strong) UILabel *title;
18 18 @property (nonatomic, strong) UIImageView *rightImage;
... ... @@ -20,7 +20,7 @@
20 20  
21 21 @end
22 22  
23   -@implementation CNLiveBMineCell
  23 +@implementation CNLiveMineCell
24 24 static const CGFloat margin = 10;
25 25  
26 26 - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
... ... @@ -39,10 +39,10 @@ static const CGFloat margin = 10;
39 39 [self.contentView addSubview:self.line];
40 40 }
41 41  
42   -- (void)setModel:(CNLiveBMineModel *)model{
  42 +- (void)setModel:(CNLiveMineModel *)model{
43 43 _model = model;
44 44  
45   - UIImage *xw_image = [self getImageWithImageName:model.image bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineCell class]];
  45 + UIImage *xw_image = [self getImageWithImageName:model.image bundleName:@"CNLiveBMineModule" targetClass:[CNLiveMineCell class]];
46 46 _leftImage.image = xw_image;
47 47  
48 48 _title.text = model.name;
... ... @@ -120,7 +120,7 @@ static const CGFloat margin = 10;
120 120 _rightImage.backgroundColor = [UIColor whiteColor];
121 121 _rightImage.layer.masksToBounds = NO;
122 122 _rightImage.layer.shadowColor = [UIColor blackColor].CGColor;
123   - UIImage *xw_image = [self getImageWithImageName:@"mine_into" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineCell class]];
  123 + UIImage *xw_image = [self getImageWithImageName:@"mine_into" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveMineCell class]];
124 124 _rightImage.image = xw_image;
125 125 _rightImage.contentMode = UIViewContentModeCenter;
126 126 }
... ...
CNLiveBMineModule/Classes/View/CNLiveBMineHeaderView.h renamed to CNLiveBMineModule/Classes/View/CNLiveMineHeaderView.h
1 1 //
2   -// CNLiveBMineHeaderView.h
  2 +// CNLiveMineHeaderView.h
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
... ... @@ -9,19 +9,19 @@
9 9 #import <UIKit/UIKit.h>
10 10  
11 11 NS_ASSUME_NONNULL_BEGIN
12   -typedef NS_ENUM(NSInteger, CNLiveBMineHeaderViewType) {
13   - CNLiveBMineHeaderViewTypeUerInfo = 0,
14   - CNLiveBMineHeaderViewTypeHome = 1
  12 +typedef NS_ENUM(NSInteger, CNLiveMineHeaderViewType) {
  13 + CNLiveMineHeaderViewTypeUerInfo = 0,
  14 + CNLiveMineHeaderViewTypeHome = 1
15 15 };
16   -@class CNLiveBMineHeaderView;
  16 +@class CNLiveMineHeaderView;
17 17  
18   -@protocol CNLiveBMineHeaderViewDelegate <NSObject>
  18 +@protocol CNLiveMineHeaderViewDelegate <NSObject>
19 19 @optional
20   -- (void)headerView:(CNLiveBMineHeaderView *)headerView pushToController:(CNLiveBMineHeaderViewType)type;
  20 +- (void)headerView:(CNLiveMineHeaderView *)headerView pushToController:(CNLiveMineHeaderViewType)type;
21 21  
22 22 @end
23   -@interface CNLiveBMineHeaderView : UIView
24   -@property (nonatomic, weak) id<CNLiveBMineHeaderViewDelegate> delegate;
  23 +@interface CNLiveMineHeaderView : UIView
  24 +@property (nonatomic, weak) id<CNLiveMineHeaderViewDelegate> delegate;
25 25 @property (nonatomic, assign) BOOL interactionEnabled;
26 26 @property (nonatomic, assign) BOOL isRefresh;
27 27  
... ...
CNLiveBMineModule/Classes/View/CNLiveBMineHeaderView.m renamed to CNLiveBMineModule/Classes/View/CNLiveMineHeaderView.m
1 1 //
2   -// CNLiveBMineHeaderView.m
  2 +// CNLiveMineHeaderView.m
3 3 // CNLiveBMineModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
6 6 // Copyright © 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
9   -#import "CNLiveBMineHeaderView.h"
  9 +#import "CNLiveMineHeaderView.h"
10 10 #import <Masonry/Masonry.h>
11 11 #import <SDWebImage/SDWebImage.h>
12 12 #import "QMUIKit.h"
... ... @@ -16,7 +16,7 @@
16 16 #import "CNUserInfoManager.h"
17 17 #import "CNLiveUserInfoNotification.h"
18 18  
19   -@interface CNLiveBMineHeaderView ()
  19 +@interface CNLiveMineHeaderView ()
20 20 @property (nonatomic, strong) UIImageView *bgView;
21 21 @property (nonatomic, strong) UIImageView *bgTopView;
22 22  
... ... @@ -29,7 +29,7 @@
29 29  
30 30 @end
31 31  
32   -@implementation CNLiveBMineHeaderView
  32 +@implementation CNLiveMineHeaderView
33 33 static const NSInteger margin = 20;
34 34  
35 35 - (instancetype)initWithFrame:(CGRect)frame{
... ... @@ -48,7 +48,7 @@ static const NSInteger margin = 20;
48 48 CNLiveUserInfoDataType type = [[dic objectForKey:@"dataType"] integerValue];
49 49 NSString *info = [dic objectForKey:@"info"];
50 50 if(type == CNLiveUserInfoDataTypeHeader){
51   - UIImage *xw_image = [self getImageWithImageName:@"default_avatar_y" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineHeaderView class]];
  51 + UIImage *xw_image = [self getImageWithImageName:@"default_avatar_y" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveMineHeaderView class]];
52 52 [_header sd_setImageWithURL:[NSURL URLWithString:info] placeholderImage:xw_image];
53 53  
54 54 }else if(type == CNLiveUserInfoDataTypeNickname){
... ... @@ -218,20 +218,20 @@ static const NSInteger margin = 20;
218 218 #pragma mark - 响应方法
219 219 - (void)headerTapDidClicked:(UITapGestureRecognizer *)tap{
220 220 if (self.delegate && [self.delegate respondsToSelector:@selector(headerView:pushToController:)]) {
221   - [self.delegate headerView:self pushToController:CNLiveBMineHeaderViewTypeUerInfo];
  221 + [self.delegate headerView:self pushToController:CNLiveMineHeaderViewTypeUerInfo];
222 222 }
223 223 }
224 224  
225 225 - (void)nameTapDidClicked:(UITapGestureRecognizer *)tap{
226 226 if (self.delegate && [self.delegate respondsToSelector:@selector(headerView:pushToController:)]) {
227   - [self.delegate headerView:self pushToController:CNLiveBMineHeaderViewTypeUerInfo];
  227 + [self.delegate headerView:self pushToController:CNLiveMineHeaderViewTypeUerInfo];
228 228 }
229 229 }
230 230  
231 231 - (void)homeDidClicked:(UIButton *)btn{
232 232 if (self.delegate && [self.delegate respondsToSelector:@selector(headerView:pushToController:)]) {
233 233 btn.userInteractionEnabled = NO;
234   - [self.delegate headerView:self pushToController:CNLiveBMineHeaderViewTypeHome];
  234 + [self.delegate headerView:self pushToController:CNLiveMineHeaderViewTypeHome];
235 235 }
236 236 }
237 237  
... ... @@ -239,7 +239,7 @@ static const NSInteger margin = 20;
239 239 - (UIButton *)home {
240 240 if (!_home) {
241 241 _home = [UIButton buttonWithType:UIButtonTypeCustom];
242   - UIImage *xw_image = [self getImageWithImageName:@"mine_zy" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineHeaderView class]];
  242 + UIImage *xw_image = [self getImageWithImageName:@"mine_zy" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveMineHeaderView class]];
243 243 _home.imageView.contentMode = UIViewContentModeScaleAspectFit;
244 244 [_home setBackgroundImage:xw_image forState:UIControlStateNormal];
245 245 _home.adjustsImageWhenHighlighted = NO;
... ... @@ -251,7 +251,7 @@ static const NSInteger margin = 20;
251 251 if (!_bgView) {
252 252 _bgView = [[UIImageView alloc] init];
253 253 _bgView.userInteractionEnabled = YES;
254   - UIImage *xw_image = [self getImageWithImageName:@"mine_bg" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineHeaderView class]];
  254 + UIImage *xw_image = [self getImageWithImageName:@"mine_bg" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveMineHeaderView class]];
255 255 _bgView.image = xw_image;
256 256 }
257 257 return _bgView;
... ... @@ -261,7 +261,7 @@ static const NSInteger margin = 20;
261 261 if (!_bgTopView) {
262 262 _bgTopView = [[UIImageView alloc] init];
263 263 _bgTopView.userInteractionEnabled = YES;
264   - UIImage *xw_image = [self getImageWithImageName:@"mine_bg_top" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineHeaderView class]];
  264 + UIImage *xw_image = [self getImageWithImageName:@"mine_bg_top" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveMineHeaderView class]];
265 265 _bgTopView.image = xw_image;
266 266 }
267 267 return _bgTopView;
... ... @@ -272,7 +272,7 @@ static const NSInteger margin = 20;
272 272 _header.userInteractionEnabled = YES;
273 273 _header.layer.masksToBounds = YES;
274 274 _header.layer.cornerRadius = 28;
275   - UIImage *xw_image = [self getImageWithImageName:@"default_avatar_y" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineHeaderView class]];
  275 + UIImage *xw_image = [self getImageWithImageName:@"default_avatar_y" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveMineHeaderView class]];
276 276 [_header sd_setImageWithURL:[NSURL URLWithString:CNUserShareModel.faceUrl] placeholderImage:xw_image];
277 277 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(headerTapDidClicked:)];
278 278 [_header addGestureRecognizer:tap];
... ...
Example/CNLiveBMineModule.xcodeproj/project.pbxproj
... ... @@ -207,8 +207,8 @@
207 207 6003F586195388D20070C39A /* Sources */,
208 208 6003F587195388D20070C39A /* Frameworks */,
209 209 6003F588195388D20070C39A /* Resources */,
210   - 7F2868A8838A138BFAEF325B /* [CP] Embed Pods Frameworks */,
211   - A802B5426A66E6F7713552F1 /* [CP] Copy Pods Resources */,
  210 + AFC35ACF88EE06568BFA31DA /* [CP] Embed Pods Frameworks */,
  211 + 327AC9F7FC5C7A4913A86E4A /* [CP] Copy Pods Resources */,
212 212 );
213 213 buildRules = (
214 214 );
... ... @@ -321,7 +321,27 @@
321 321 shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
322 322 showEnvVarsInLog = 0;
323 323 };
324   - 7F2868A8838A138BFAEF325B /* [CP] Embed Pods Frameworks */ = {
  324 + 327AC9F7FC5C7A4913A86E4A /* [CP] Copy Pods Resources */ = {
  325 + isa = PBXShellScriptBuildPhase;
  326 + buildActionMask = 2147483647;
  327 + files = (
  328 + );
  329 + inputPaths = (
  330 + "${PODS_ROOT}/Target Support Files/Pods-CNLiveBMineModule_Example/Pods-CNLiveBMineModule_Example-resources.sh",
  331 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveBMineModule/CNLiveBMineModule.bundle",
  332 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveUserAgreementManager/CNLiveUserAgreementManager.bundle",
  333 + );
  334 + name = "[CP] Copy Pods Resources";
  335 + outputPaths = (
  336 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveBMineModule.bundle",
  337 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveUserAgreementManager.bundle",
  338 + );
  339 + runOnlyForDeploymentPostprocessing = 0;
  340 + shellPath = /bin/sh;
  341 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveBMineModule_Example/Pods-CNLiveBMineModule_Example-resources.sh\"\n";
  342 + showEnvVarsInLog = 0;
  343 + };
  344 + AFC35ACF88EE06568BFA31DA /* [CP] Embed Pods Frameworks */ = {
325 345 isa = PBXShellScriptBuildPhase;
326 346 buildActionMask = 2147483647;
327 347 files = (
... ... @@ -334,7 +354,6 @@
334 354 "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework",
335 355 "${BUILT_PRODUCTS_DIR}/CNLiveBaseTools/CNLiveBaseTools.framework",
336 356 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework",
337   - "${BUILT_PRODUCTS_DIR}/CNLiveBusinessBaseModule/CNLiveBusinessBaseModule.framework",
338 357 "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework",
339 358 "${BUILT_PRODUCTS_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework",
340 359 "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
... ... @@ -369,7 +388,6 @@
369 388 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework",
370 389 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseTools.framework",
371 390 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework",
372   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessBaseModule.framework",
373 391 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework",
374 392 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCacheManagerKit.framework",
375 393 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
... ... @@ -401,26 +419,6 @@
401 419 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveBMineModule_Example/Pods-CNLiveBMineModule_Example-frameworks.sh\"\n";
402 420 showEnvVarsInLog = 0;
403 421 };
404   - A802B5426A66E6F7713552F1 /* [CP] Copy Pods Resources */ = {
405   - isa = PBXShellScriptBuildPhase;
406   - buildActionMask = 2147483647;
407   - files = (
408   - );
409   - inputPaths = (
410   - "${PODS_ROOT}/Target Support Files/Pods-CNLiveBMineModule_Example/Pods-CNLiveBMineModule_Example-resources.sh",
411   - "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveBMineModule/CNLiveBMineModule.bundle",
412   - "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveUserAgreementManager/CNLiveUserAgreementManager.bundle",
413   - );
414   - name = "[CP] Copy Pods Resources";
415   - outputPaths = (
416   - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveBMineModule.bundle",
417   - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveUserAgreementManager.bundle",
418   - );
419   - runOnlyForDeploymentPostprocessing = 0;
420   - shellPath = /bin/sh;
421   - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveBMineModule_Example/Pods-CNLiveBMineModule_Example-resources.sh\"\n";
422   - showEnvVarsInLog = 0;
423   - };
424 422 C07FCC71144256C0D7D38641 /* [CP] Check Pods Manifest.lock */ = {
425 423 isa = PBXShellScriptBuildPhase;
426 424 buildActionMask = 2147483647;
... ...
Example/CNLiveBMineModule/CNLIVEAppDelegate.m
... ... @@ -7,14 +7,30 @@
7 7 //
8 8  
9 9 #import "CNLIVEAppDelegate.h"
10   -#import "CNLiveBMineController.h"
  10 +#import "CNLiveMineController.h"
11 11 #import "CNUserInfoManager.h"
12 12 #import "CNLiveEnvironment.h"
13 13 #import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h>
14 14 #import <CNLiveRequestBastKit/CNLiveNetworking.h>
15 15  
16 16 @implementation CNLIVEAppDelegate
  17 +- (void)networkParamAction{
  18 + NSMutableDictionary * mDict = [[NSMutableDictionary alloc] init];
  19 + [mDict setValue:@"10514405" forKey:@"loginSid"];
17 20  
  21 + [mDict setValue:BundleId forKey:@"platform_id"];
  22 +
  23 + [mDict setValue:[[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""] forKey:@"uuid"];
  24 + [mDict setValue:@"i" forKey:@"plat"];
  25 + [mDict setValue:@"1.7.8.19.10.30.15"forKey:@"ver"];
  26 + [mDict setObject:AppId forKey:@"appId"];
  27 + [CNLiveNetworking setupDefaultParam:mDict];
  28 + [CNLiveNetworking setupShowResult:NO];
  29 + [CNLiveNetworking setupSignKey:APPKey];
  30 + [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  31 + [CNLiveNetworking setResponseSerializerType:CNLiveResponseSerializerJSON];
  32 +
  33 +}
18 34 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
19 35 {
20 36 // Override point for customization after application launch.
... ... @@ -25,7 +41,7 @@
25 41 if ([CNUserShareManager isLogin]) {
26 42 [CNLiveUserSystemCenter setUserId:CNUserShareModel.uid];
27 43 }
28   -// [self networkParamAction];
  44 + [self networkParamAction];
29 45  
30 46 [CNUserInfoManager saveUserinfoDic:@{
31 47 @"bigFaceUrl":@"http://yweb0.cnliveimg.com/images/headImg/2019/1030/1572439148697.jpg",
... ... @@ -48,7 +64,7 @@
48 64 @"wxUid":@""
49 65 }];
50 66 [[NSUserDefaults standardUserDefaults] setObject:@"RkFYeLkl/u5S7tW8UcOkT3rfLTP/Ua8NIkdEsKlcolvl/yxTMNbAYXmmJyhKGpkj" forKey:@"CNLiveAuthToken"];
51   - CNLiveBMineController *vc = [[CNLiveBMineController alloc] init];
  67 + CNLiveMineController *vc = [[CNLiveMineController alloc] init];
52 68 UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
53 69 self.window.rootViewController = nav;//设置根视图控制器
54 70 [self.window makeKeyAndVisible];
... ...