Commit 7a8aa0b9fbac5cc2b01ec426c0c933231269a436
1 parent
b91440a1
no message
Showing
10 changed files
with
33 additions
and
12 deletions
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_overbadge.imageset/mine_overbadge@2x.png deleted
100644 → 0
1.91 KB
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_overbadge.imageset/mine_overbadge@3x.png deleted
100644 → 0
3.61 KB
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_overbadge.imageset/Contents.json renamed to CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_qiye.imageset/Contents.json
| @@ -5,18 +5,18 @@ | @@ -5,18 +5,18 @@ | ||
| 5 | "scale" : "1x" | 5 | "scale" : "1x" |
| 6 | }, | 6 | }, |
| 7 | { | 7 | { |
| 8 | + "filename" : "mine_qiye@2x.png", | ||
| 8 | "idiom" : "universal", | 9 | "idiom" : "universal", |
| 9 | - "filename" : "mine_overbadge@2x.png", | ||
| 10 | "scale" : "2x" | 10 | "scale" : "2x" |
| 11 | }, | 11 | }, |
| 12 | { | 12 | { |
| 13 | + "filename" : "mine_qiye@3x.png", | ||
| 13 | "idiom" : "universal", | 14 | "idiom" : "universal", |
| 14 | - "filename" : "mine_overbadge@3x.png", | ||
| 15 | "scale" : "3x" | 15 | "scale" : "3x" |
| 16 | } | 16 | } |
| 17 | ], | 17 | ], |
| 18 | "info" : { | 18 | "info" : { |
| 19 | - "version" : 1, | ||
| 20 | - "author" : "xcode" | 19 | + "author" : "xcode", |
| 20 | + "version" : 1 | ||
| 21 | } | 21 | } |
| 22 | -} | ||
| 23 | \ No newline at end of file | 22 | \ No newline at end of file |
| 23 | +} |
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_qiye.imageset/mine_qiye@2x.png
0 → 100644
887 Bytes
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_qiye.imageset/mine_qiye@3x.png
0 → 100644
2.8 KB
CNLiveBMineModule/Classes/Setting/BindingManage/CNLiveBindingManageCell.h
| @@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 16 | @protocol CNLiveBindingManageCellDelegate <NSObject> | 16 | @protocol CNLiveBindingManageCellDelegate <NSObject> |
| 17 | //isBinding YES 绑定操作 NO 解除绑定操作 | 17 | //isBinding YES 绑定操作 NO 解除绑定操作 |
| 18 | - (void)clickedBindingButton:(CNLiveBindingManageCell *)cell isBinding:(BOOL)isBinding; | 18 | - (void)clickedBindingButton:(CNLiveBindingManageCell *)cell isBinding:(BOOL)isBinding; |
| 19 | +- (void)jumpBingdingTel; | ||
| 19 | 20 | ||
| 20 | @end | 21 | @end |
| 21 | 22 |
CNLiveBMineModule/Classes/Setting/BindingManage/CNLiveBindingManageCell.m
| @@ -161,6 +161,11 @@ static NSInteger const margin = 15; | @@ -161,6 +161,11 @@ static NSInteger const margin = 15; | ||
| 161 | #pragma mark - Action | 161 | #pragma mark - Action |
| 162 | - (void)manageDidClicked:(UIButton *)btn{ | 162 | - (void)manageDidClicked:(UIButton *)btn{ |
| 163 | if([self.model.thirdPartyPlat isEqualToString:@"10"]){ | 163 | if([self.model.thirdPartyPlat isEqualToString:@"10"]){ |
| 164 | + if([self.model.isBinding isEqualToString:@"0"]){ | ||
| 165 | + if (self.delegate && [self.delegate respondsToSelector:@selector(jumpBingdingTel)]) { | ||
| 166 | + [self.delegate jumpBingdingTel]; | ||
| 167 | + } | ||
| 168 | + } | ||
| 164 | return; | 169 | return; |
| 165 | } | 170 | } |
| 166 | if(![CNLiveNetworking isNetworking]){ | 171 | if(![CNLiveNetworking isNetworking]){ |
CNLiveBMineModule/Classes/Setting/BindingManage/CNLiveBindingManageController.m
| @@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
| 13 | #import "CNLiveBaseKit.h" | 13 | #import "CNLiveBaseKit.h" |
| 14 | #import "CNLiveNavigationBar.h" | 14 | #import "CNLiveNavigationBar.h" |
| 15 | 15 | ||
| 16 | +#import "CNLiveUpdateTelController.h" | ||
| 16 | #import "CNLiveBindingManageHeaderView.h" | 17 | #import "CNLiveBindingManageHeaderView.h" |
| 17 | #import "CNLiveBindingManageCell.h" | 18 | #import "CNLiveBindingManageCell.h" |
| 18 | #import "CNLiveBindingManageModel.h" | 19 | #import "CNLiveBindingManageModel.h" |
| @@ -28,6 +29,11 @@ | @@ -28,6 +29,11 @@ | ||
| 28 | 29 | ||
| 29 | @implementation CNLiveBindingManageController | 30 | @implementation CNLiveBindingManageController |
| 30 | #pragma mark - CNLiveBindingManageCellDelegate | 31 | #pragma mark - CNLiveBindingManageCellDelegate |
| 32 | +- (void)jumpBingdingTel{ | ||
| 33 | + CNLiveUpdateTelController *vc = [[CNLiveUpdateTelController alloc] init]; | ||
| 34 | + [self.navigationController pushViewController:vc animated:YES]; | ||
| 35 | +} | ||
| 36 | + | ||
| 31 | - (void)clickedBindingButton:(CNLiveBindingManageCell *)cell isBinding:(BOOL)isBinding{ | 37 | - (void)clickedBindingButton:(CNLiveBindingManageCell *)cell isBinding:(BOOL)isBinding{ |
| 32 | if(isBinding){ | 38 | if(isBinding){ |
| 33 | //绑定操作 | 39 | //绑定操作 |
CNLiveBMineModule/Classes/Setting/BindingManage/CNLiveBindingManageRequest.m
| @@ -188,15 +188,24 @@ | @@ -188,15 +188,24 @@ | ||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | //请求绑定数据 | 190 | //请求绑定数据 |
| 191 | +//请求绑定数据 | ||
| 191 | + (void)requestModels:(CNLiveBindingArrayBlock)block{ | 192 | + (void)requestModels:(CNLiveBindingArrayBlock)block{ |
| 192 | NSMutableArray *bindingData = [[NSMutableArray alloc] init]; | 193 | NSMutableArray *bindingData = [[NSMutableArray alloc] init]; |
| 193 | NSMutableArray *unBindingData = [[NSMutableArray alloc] init]; | 194 | NSMutableArray *unBindingData = [[NSMutableArray alloc] init]; |
| 194 | CNLiveBindingManageModel *tmodel = [[CNLiveBindingManageModel alloc]init]; | 195 | CNLiveBindingManageModel *tmodel = [[CNLiveBindingManageModel alloc]init]; |
| 195 | tmodel.title = @"手机号"; | 196 | tmodel.title = @"手机号"; |
| 196 | tmodel.image = @"mine_telephone"; | 197 | tmodel.image = @"mine_telephone"; |
| 197 | - NSString *mobile = [CNUserShareModel.mobile stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"]; | ||
| 198 | - tmodel.desc = mobile; | ||
| 199 | - tmodel.isBinding = @"1"; | 198 | + if(CNUserShareModel.mobile&&![CNUserShareModel.mobile isEqualToString:@""]){ |
| 199 | + if (CNUserShareModel.mobile.length > 10) { | ||
| 200 | + NSString *mobile = [CNUserShareModel.mobile stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"]; | ||
| 201 | + tmodel.desc = mobile; | ||
| 202 | + } | ||
| 203 | + tmodel.thirdPartyId = CNUserShareModel.qqUid; | ||
| 204 | + tmodel.isBinding = @"1"; | ||
| 205 | + }else{ | ||
| 206 | + tmodel.desc = @"未绑定手机号"; | ||
| 207 | + tmodel.isBinding = @"0"; | ||
| 208 | + } | ||
| 200 | tmodel.thirdPartyPlat = @"10"; | 209 | tmodel.thirdPartyPlat = @"10"; |
| 201 | tmodel.thirdPartyId = CNUserShareModel.uid; | 210 | tmodel.thirdPartyId = CNUserShareModel.uid; |
| 202 | [bindingData addObject:tmodel]; | 211 | [bindingData addObject:tmodel]; |
CNLiveBMineModule/Classes/View/CNLiveMineHeaderView.m
| @@ -55,7 +55,7 @@ static const NSInteger margin = 20; | @@ -55,7 +55,7 @@ static const NSInteger margin = 20; | ||
| 55 | _name.text = info; | 55 | _name.text = info; |
| 56 | 56 | ||
| 57 | }else if(type == CNLiveUserInfoDataTypeAddress){ | 57 | }else if(type == CNLiveUserInfoDataTypeAddress){ |
| 58 | - _address.attributedText = [self createAttributedImageName:@"mine_location" string:info fontSize:13.0 isFront:YES]; | 58 | + _address.attributedText = [self createAttributedImageName:@"mine_location" string:info?info:@"未知" fontSize:13.0 isFront:YES]; |
| 59 | 59 | ||
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| @@ -143,7 +143,7 @@ static const NSInteger margin = 20; | @@ -143,7 +143,7 @@ static const NSInteger margin = 20; | ||
| 143 | _isRefresh = isRefresh; | 143 | _isRefresh = isRefresh; |
| 144 | if(isRefresh){ | 144 | if(isRefresh){ |
| 145 | _name.text = CNUserShareModel.nickname; | 145 | _name.text = CNUserShareModel.nickname; |
| 146 | - _address.attributedText = [self createAttributedImageName:@"mine_location" string:CNUserShareModel.location fontSize:13.0 isFront:YES]; | 146 | + _address.attributedText = [self createAttributedImageName:@"mine_location" string:CNUserShareModel.location?CNUserShareModel.location:@"未知" fontSize:13.0 isFront:YES]; |
| 147 | } | 147 | } |
| 148 | } | 148 | } |
| 149 | 149 | ||
| @@ -300,7 +300,7 @@ static const NSInteger margin = 20; | @@ -300,7 +300,7 @@ static const NSInteger margin = 20; | ||
| 300 | _certification.numberOfLines = 1; | 300 | _certification.numberOfLines = 1; |
| 301 | _certification.textColor = [UIColor whiteColor]; | 301 | _certification.textColor = [UIColor whiteColor]; |
| 302 | _certification.font = [UIFont systemFontOfSize:16]; | 302 | _certification.font = [UIFont systemFontOfSize:16]; |
| 303 | - _certification.attributedText = [self createAttributedImages:@[@"mine_wjj_certification",@"mine_common",@"mine_overbadge"]]; | 303 | + _certification.attributedText = [self createAttributedImages:@[@"mine_wjj_certification",@"mine_common",@"mine_qiye"]]; |
| 304 | } | 304 | } |
| 305 | return _certification; | 305 | return _certification; |
| 306 | } | 306 | } |
| @@ -310,7 +310,7 @@ static const NSInteger margin = 20; | @@ -310,7 +310,7 @@ static const NSInteger margin = 20; | ||
| 310 | _address.numberOfLines = 1; | 310 | _address.numberOfLines = 1; |
| 311 | _address.textColor = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | 311 | _address.textColor = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; |
| 312 | _address.font = [UIFont systemFontOfSize:13]; | 312 | _address.font = [UIFont systemFontOfSize:13]; |
| 313 | - _address.attributedText = [self createAttributedImageName:@"mine_location" string:CNUserShareModel.location fontSize:13.0 isFront:YES]; | 313 | + _address.attributedText = [self createAttributedImageName:@"mine_location" string:CNUserShareModel.location?CNUserShareModel.location:@"未知" fontSize:13.0 isFront:YES]; |
| 314 | } | 314 | } |
| 315 | return _address; | 315 | return _address; |
| 316 | } | 316 | } |