1515
1616@interface SettingPhoneViewController ()<UITableViewDataSource, UITableViewDelegate>
1717@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;
1919@property (strong , nonatomic ) NSString *phoneCodeCellIdentifier;
2020@property (assign , nonatomic ) VerifyType verifyType;
2121@end
@@ -27,8 +27,7 @@ - (void)viewDidLoad {
2727 // Do any additional setup after loading the view.
2828 self.title = @" 绑定手机号码" ;
2929 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" ;
3231
3332 // 添加myTableView
3433 self.phoneCodeCellIdentifier = [Input_OnlyText_Cell randomCellIdentifierOfPhoneCodeType ];
@@ -166,7 +165,6 @@ - (void)goToCountryCodeVC{
166165 __weak typeof (self) weakSelf = self;
167166 CountryCodeListViewController *vc = [CountryCodeListViewController new ];
168167 vc.selectedBlock = ^(NSDictionary *countryCodeDict){
169- weakSelf.country = countryCodeDict[@" iso_code" ];
170168 weakSelf.phone_country_code = [NSString stringWithFormat: @" +%@ " , countryCodeDict[@" country_code" ]];
171169 [weakSelf.myTableView reloadData ];
172170 };
0 commit comments