15
15
16
16
@interface SettingPhoneViewController ()<UITableViewDataSource, UITableViewDelegate>
17
17
@property (strong , nonatomic ) TPKeyboardAvoidingTableView *myTableView;
18
- @property (strong , nonatomic ) NSString *phone, *code, *phone_country_code, *country, * verifyStr;
18
+ @property (strong , nonatomic ) NSString *phone, *code, *phone_country_code, *verifyStr;
19
19
@property (strong , nonatomic ) NSString *phoneCodeCellIdentifier;
20
20
@property (assign , nonatomic ) VerifyType verifyType;
21
21
@end
@@ -27,8 +27,7 @@ - (void)viewDidLoad {
27
27
// Do any additional setup after loading the view.
28
28
self.title = @" 绑定手机号码" ;
29
29
self.phone = [Login curLoginUser ].phone ;
30
- self.country = [Login curLoginUser ].country ;
31
- self.phone_country_code = [Login curLoginUser ].phone_country_code ;
30
+ self.phone_country_code = [Login curLoginUser ].phone_country_code .length > 0 ? [Login curLoginUser ].phone_country_code : @" +86" ;
32
31
33
32
// 添加myTableView
34
33
self.phoneCodeCellIdentifier = [Input_OnlyText_Cell randomCellIdentifierOfPhoneCodeType ];
@@ -166,7 +165,6 @@ - (void)goToCountryCodeVC{
166
165
__weak typeof (self) weakSelf = self;
167
166
CountryCodeListViewController *vc = [CountryCodeListViewController new ];
168
167
vc.selectedBlock = ^(NSDictionary *countryCodeDict){
169
- weakSelf.country = countryCodeDict[@" iso_code" ];
170
168
weakSelf.phone_country_code = [NSString stringWithFormat: @" +%@ " , countryCodeDict[@" country_code" ]];
171
169
[weakSelf.myTableView reloadData ];
172
170
};
0 commit comments