Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a5a4b7a

Browse files
手机号默认 +86
1 parent 7860c5c commit a5a4b7a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎Coding_iOS/Controllers/MeSetting/SettingPhoneViewController.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /