Commit 8d03d2c8643edffe077d5a48760fdd0c6f07c231

Authored by yanglingyu
1 parent 52616964

修复问题

CNLiveCMineModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveCMineModule' 10 s.name = 'CNLiveCMineModule'
11 - s.version = '0.1.4' 11 + s.version = '0.1.5'
12 s.summary = '网家家C端个人中心' 12 s.summary = '网家家C端个人中心'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveCMineModule/Assets/CNLiveCMineModule.bundle/c_mine_login_qq@2x.png deleted 100644 → 0

3.25 KB

CNLiveCMineModule/Assets/CNLiveCMineModule.bundle/c_mine_login_qq@3x.png deleted 100644 → 0

6.58 KB

CNLiveCMineModule/Assets/CNLiveCMineModule.bundle/c_mine_login_wechat@2x.png deleted 100644 → 0

3.9 KB

CNLiveCMineModule/Assets/CNLiveCMineModule.bundle/c_mine_login_wechat@3x.png deleted 100644 → 0

7.83 KB

CNLiveCMineModule/Assets/CNLiveCMineModule.bundle/c_mine_login_weibo@2x.png deleted 100644 → 0

6.38 KB

CNLiveCMineModule/Assets/CNLiveCMineModule.bundle/c_mine_login_weibo@3x.png deleted 100644 → 0

12.4 KB

CNLiveCMineModule/Classes/CNCMine/Present/CNMinePresent.h
@@ -32,8 +32,6 @@ typedef enum { @@ -32,8 +32,6 @@ typedef enum {
32 32
33 33
34 } CNGetAgreementH5Type; 34 } CNGetAgreementH5Type;
35 -typedef void(^SuccessBlock)(NSString *h5,NSString *title);  
36 -typedef void(^FailureBlock)(NSError *error);  
37 NS_ASSUME_NONNULL_BEGIN 35 NS_ASSUME_NONNULL_BEGIN
38 @interface CNMinePresent : NSObject 36 @interface CNMinePresent : NSObject
39 /// 返回包含扫码、客服、设置的数组 37 /// 返回包含扫码、客服、设置的数组
@@ -56,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -56,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
56 /// @param responseBlock 返回数据 54 /// @param responseBlock 返回数据
57 + (void)requestFeedback:(NSString *)message secceedBlock:(void(^)(void))responseBlock; 55 + (void)requestFeedback:(NSString *)message secceedBlock:(void(^)(void))responseBlock;
58 56
59 -+ (void)getAgreementH5WithType:(CNGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure; 57 ++ (void)getAgreementH5WithType:(CNGetAgreementH5Type)type success:(void(^)(NSString *h5,NSString *title))success failure:(void(^)(NSError *error))failure;
60 /// 是否展示社区按钮 58 /// 是否展示社区按钮
61 /// @param block 返回是否展示状态 59 /// @param block 返回是否展示状态
62 + (void)requestCommunitySucceed:(void(^)(BOOL isCommunity))block; 60 + (void)requestCommunitySucceed:(void(^)(BOOL isCommunity))block;
CNLiveCMineModule/Classes/CNCMine/Present/CNMinePresent.m
@@ -448,7 +448,7 @@ @@ -448,7 +448,7 @@
448 }]; 448 }];
449 } 449 }
450 450
451 -+ (void)getAgreementH5WithType:(CNGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure { 451 ++ (void)getAgreementH5WithType:(CNGetAgreementH5Type)type success:(void(^)(NSString *h5,NSString *title))success failure:(void(^)(NSError *error))failure{
452 452
453 [CNLiveNetworking setAllowRequestDefaultArgument:NO]; 453 [CNLiveNetworking setAllowRequestDefaultArgument:NO];
454 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNGetAgreementH5Url Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { 454 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNGetAgreementH5Url Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
CNLiveCMineModule/Classes/CNCMine/View/CNListCollectionView.m
@@ -184,7 +184,7 @@ static NSString *CNWalletCellID = @"CNWalletCellID"; @@ -184,7 +184,7 @@ static NSString *CNWalletCellID = @"CNWalletCellID";
184 } 184 }
185 }else if (_model.type == 5){ 185 }else if (_model.type == 5){
186 CNMineListModel *listModel = [CNMineListModel mj_objectWithKeyValues:self.model.lists[indexPath.row]]; 186 CNMineListModel *listModel = [CNMineListModel mj_objectWithKeyValues:self.model.lists[indexPath.row]];
187 - if ([listModel.title isEqualToString:@"小家音"]) { 187 + if ([listModel.title isEqualToString:@"小家音"]) {
188 [[CNLiveCMineService shareMineProtocol] pushCMinePagesEvent:@"config_click_xiaojia"]; 188 [[CNLiveCMineService shareMineProtocol] pushCMinePagesEvent:@"config_click_xiaojia"];
189 CNLiveAddDeviceController *addDeviceVC = [[CNLiveAddDeviceController alloc]init]; 189 CNLiveAddDeviceController *addDeviceVC = [[CNLiveAddDeviceController alloc]init];
190 [[BaseAppDelegate sharedAppDelegate] pushViewController:addDeviceVC]; 190 [[BaseAppDelegate sharedAppDelegate] pushViewController:addDeviceVC];
CNLiveCMineModule/Classes/CNCMine/View/CNTopImageView.m
@@ -37,6 +37,10 @@ @@ -37,6 +37,10 @@
37 [self addSubview:self.titleLabel]; 37 [self addSubview:self.titleLabel];
38 [self addSubview:self.mineListView]; 38 [self addSubview:self.mineListView];
39 [self uploadViewLayout]; 39 [self uploadViewLayout];
  40 + weakself
  41 + [CNMinePresent requestCommunitySucceed:^(BOOL isCommunity) {
  42 + weakSelf.myCommuintyBtn.hidden = !isCommunity;
  43 + }];
40 } 44 }
41 return self; 45 return self;
42 } 46 }
@@ -101,10 +105,6 @@ @@ -101,10 +105,6 @@
101 } else { 105 } else {
102 self.titleLabel.text = @"昵称"; 106 self.titleLabel.text = @"昵称";
103 } 107 }
104 - weakself  
105 - [CNMinePresent requestCommunitySucceed:^(BOOL isCommunity) {  
106 - weakSelf.myCommuintyBtn.hidden = !isCommunity;  
107 - }];  
108 } 108 }
109 #pragma mark - Action 109 #pragma mark - Action
110 - (void)buttonAction:(UIButton *)sender{ 110 - (void)buttonAction:(UIButton *)sender{
@@ -135,9 +135,9 @@ @@ -135,9 +135,9 @@
135 { 135 {
136 if (!_iconImage) { 136 if (!_iconImage) {
137 _iconImage = [[UIImageView alloc] init]; 137 _iconImage = [[UIImageView alloc] init];
138 - _iconImage.layer.cornerRadius = 30; 138 + _iconImage.layer.cornerRadius = DS_adapt_length(30);
139 _iconImage.contentMode = UIViewContentModeScaleAspectFill; 139 _iconImage.contentMode = UIViewContentModeScaleAspectFill;
140 - _iconImage.image = [CNLiveCMineService imageWithMineName:@"mine_no_Avatar"]; 140 + [_iconImage sd_setImageWithURL:[NSURL URLWithString:CNUserShareModel.faceUrl] placeholderImage:[CNLiveCMineService imageWithMineName:@"mine_no_Avatar"]];
141 _iconImage.userInteractionEnabled = YES; 141 _iconImage.userInteractionEnabled = YES;
142 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id _Nonnull sender) { 142 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id _Nonnull sender) {
143 CNMinePersonInfoController *infoVC = [[CNMinePersonInfoController alloc] init]; 143 CNMinePersonInfoController *infoVC = [[CNMinePersonInfoController alloc] init];
@@ -194,7 +194,11 @@ @@ -194,7 +194,11 @@
194 _titleLabel.textColor = kWhiteColor; 194 _titleLabel.textColor = kWhiteColor;
195 _titleLabel.textAlignment = NSTextAlignmentLeft; 195 _titleLabel.textAlignment = NSTextAlignmentLeft;
196 _titleLabel.font = UIFontCNMake(17); 196 _titleLabel.font = UIFontCNMake(17);
197 - _titleLabel.text = @"我的昵称"; 197 + if (![NSString isEmpty:CNUserShareModel.nickname]) {
  198 + [_titleLabel setText:CNUserShareModel.nickname];
  199 + } else {
  200 + _titleLabel.text = @"昵称";
  201 + }
198 } 202 }
199 return _titleLabel; 203 return _titleLabel;
200 } 204 }
CNLiveCMineModule/Classes/CNCMine/ViewController/CNLiveMineVC.m
@@ -172,6 +172,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne @@ -172,6 +172,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne
172 make.left.equalTo(self.view).offset(DS_adapt_length( 12)); 172 make.left.equalTo(self.view).offset(DS_adapt_length( 12));
173 make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)); 173 make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28));
174 }]; 174 }];
  175 + self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)];
175 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { 176 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) {
176 make.top.equalTo(self.view).offset(kStatusHeight); 177 make.top.equalTo(self.view).offset(kStatusHeight);
177 make.right.equalTo(self.view).offset(-DS_adapt_length(10)); 178 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
@@ -187,6 +188,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne @@ -187,6 +188,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne
187 make.left.equalTo(self.view).offset(DS_adapt_length(12)); 188 make.left.equalTo(self.view).offset(DS_adapt_length(12));
188 make.width.height.mas_equalTo(DS_adapt_length(32)); 189 make.width.height.mas_equalTo(DS_adapt_length(32));
189 }]; 190 }];
  191 + self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(32)];
190 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { 192 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) {
191 make.top.equalTo(self.view).offset(kStatusHeight); 193 make.top.equalTo(self.view).offset(kStatusHeight);
192 make.right.equalTo(self.view).offset(-DS_adapt_length(10)); 194 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
@@ -202,6 +204,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne @@ -202,6 +204,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne
202 make.left.equalTo(self.topImageView).offset(DS_adapt_length(12)); 204 make.left.equalTo(self.topImageView).offset(DS_adapt_length(12));
203 make.width.height.mas_equalTo(DS_adapt_length(60)); 205 make.width.height.mas_equalTo(DS_adapt_length(60));
204 }]; 206 }];
  207 + self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60)];
205 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { 208 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) {
206 make.top.equalTo(self.topImageView).offset(kStatusHeight); 209 make.top.equalTo(self.topImageView).offset(kStatusHeight);
207 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10)); 210 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10));
@@ -210,6 +213,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne @@ -210,6 +213,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne
210 }]; 213 }];
211 } 214 }
212 } 215 }
  216 +-(CAShapeLayer *)maskLayerWithWidth:(CGFloat)width{
  217 + UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, width, width) cornerRadius:(width)/2];
  218 + CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  219 + maskLayer.path = path.CGPath;
  220 + return maskLayer;
  221 +}
213 #pragma mark - Getting 222 #pragma mark - Getting
214 - (UIScrollView *)bgScrollView 223 - (UIScrollView *)bgScrollView
215 { 224 {
CNLiveCMineModule/Classes/CNCSubMine/Present/CNCSubMinePresent.m
@@ -42,11 +42,11 @@ @@ -42,11 +42,11 @@
42 NSNumber *rowHeight = @56; 42 NSNumber *rowHeight = @56;
43 NSString *isHidden = @"0"; 43 NSString *isHidden = @"0";
44 NSDictionary *dic = [[NSUserDefaults standardUserDefaults] objectForKey:CNWjjAddSourceTime]; 44 NSDictionary *dic = [[NSUserDefaults standardUserDefaults] objectForKey:CNWjjAddSourceTime];
45 -// if(!dic[@"isShowIntegral"]||[dic[@"isShowIntegral"] isEqualToString:@"false"]||[dic[@"isShowIntegral"] isEqualToString:@"0"]){  
46 -// //隐藏  
47 -// rowHeight = @0;  
48 -// isHidden = @"1";  
49 -// } 45 + if(!dic[@"isShowIntegral"]||[dic[@"isShowIntegral"] isEqualToString:@"false"]||[dic[@"isShowIntegral"] isEqualToString:@"0"]){
  46 + //隐藏
  47 + rowHeight = @0;
  48 + isHidden = @"1";
  49 + }
50 NSArray *array = @[ 50 NSArray *array = @[
51 @{ 51 @{
52 @"title":@"更换手机号", 52 @"title":@"更换手机号",
CNLiveCMineModule/Classes/CNCSubMine/ViewController/CNMineSettingVC.m
@@ -164,12 +164,7 @@ static NSString *settingListCellId = @"settingListCellId"; @@ -164,12 +164,7 @@ static NSString *settingListCellId = @"settingListCellId";
164 #pragma mark - UITableViewDelegate 164 #pragma mark - UITableViewDelegate
165 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 165 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
166 [self.tableView qmui_clearsSelection]; 166 [self.tableView qmui_clearsSelection];
167 - NSDictionary *dic = [[NSUserDefaults standardUserDefaults] objectForKey:CNWjjAddSourceTime];  
168 - NSInteger i = 0;  
169 - if(!dic[@"isShowIntegral"]||[dic[@"isShowIntegral"] isEqualToString:@"false"]||[dic[@"isShowIntegral"] isEqualToString:@"0"]){  
170 - //隐藏  
171 - i = 1;  
172 - } 167 + NSInteger i = 1;
173 if (indexPath.row == 0) { 168 if (indexPath.row == 0) {
174 // 更换手机号 169 // 更换手机号
175 CNMineChangePhoneNumController *cpnVC = [[CNMineChangePhoneNumController alloc] init]; 170 CNMineChangePhoneNumController *cpnVC = [[CNMineChangePhoneNumController alloc] init];
Example/CNLiveCMineModule/CNLiveCMineViewModuleImpl.m
@@ -64,6 +64,9 @@ @@ -64,6 +64,9 @@
64 // UIImage *image = [SGQRCodeGenerateManager generateWithLogoQRCodeData:jsonStr logoImageName:@"ewm_lcon" logoScaleToSuperView:0.2]; 64 // UIImage *image = [SGQRCodeGenerateManager generateWithLogoQRCodeData:jsonStr logoImageName:@"ewm_lcon" logoScaleToSuperView:0.2];
65 return [UIImage new]; 65 return [UIImage new];
66 } 66 }
  67 +- (void)addressSendVCType:(CNLiveAddressType)type block:(nullable void(^)(id addressObj) ) block{
  68 +
  69 +}
67 - (void)appLoginOut:(BOOL)closePush{ 70 - (void)appLoginOut:(BOOL)closePush{
68 // //退出登录 71 // //退出登录
69 // [CNLiveBBASMModuleService accountLogout]; 72 // [CNLiveBBASMModuleService accountLogout];