修改bug
This commit is contained in:
@@ -140,6 +140,10 @@
|
|||||||
"Nickname" = "Nickname";
|
"Nickname" = "Nickname";
|
||||||
"Gender" = "Gender";
|
"Gender" = "Gender";
|
||||||
"User ID" = "User ID";
|
"User ID" = "User ID";
|
||||||
|
"Modify Gender" = "Modify Gender";
|
||||||
|
"Male" = "Male";
|
||||||
|
"Female" = "Female";
|
||||||
|
"The Third Gender" = "The Third Gender";
|
||||||
|
|
||||||
" Paste Ta's Words" = " Paste Ta's Words";
|
" Paste Ta's Words" = " Paste Ta's Words";
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,10 @@
|
|||||||
"Nickname" = "用户名";
|
"Nickname" = "用户名";
|
||||||
"Gender" = "性别";
|
"Gender" = "性别";
|
||||||
"User ID" = "用户ID";
|
"User ID" = "用户ID";
|
||||||
|
"Modify Gender" = "修改性别";
|
||||||
|
"Male" = "男";
|
||||||
|
"Female" = "女";
|
||||||
|
"The Third Gender" = "第三性别";
|
||||||
|
|
||||||
" Paste Ta's Words" = " 粘贴TA的话";
|
" Paste Ta's Words" = " 粘贴TA的话";
|
||||||
|
|
||||||
|
|||||||
@@ -212,6 +212,7 @@
|
|||||||
// }
|
// }
|
||||||
// }];
|
// }];
|
||||||
[[KBNetworkManager shared] POST:API_CHARACTER_ADD_USER_CHARACTER jsonBody:params headers:nil autoShowBusinessError:true completion:^(NSDictionary * _Nullable json, NSURLResponse * _Nullable response, NSError * _Nullable error) {
|
[[KBNetworkManager shared] POST:API_CHARACTER_ADD_USER_CHARACTER jsonBody:params headers:nil autoShowBusinessError:true completion:^(NSDictionary * _Nullable json, NSURLResponse * _Nullable response, NSError * _Nullable error) {
|
||||||
|
[KBHUD dismiss];
|
||||||
if (!error) {
|
if (!error) {
|
||||||
[self refreshUserCharacterCacheForKeyboard];
|
[self refreshUserCharacterCacheForKeyboard];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
- (UILabel *)titleLabel {
|
- (UILabel *)titleLabel {
|
||||||
if (!_titleLabel) {
|
if (!_titleLabel) {
|
||||||
_titleLabel = [UILabel new];
|
_titleLabel = [UILabel new];
|
||||||
_titleLabel.text = @"Modify Gender";
|
_titleLabel.text = KBLocalized(@"Modify Gender");
|
||||||
_titleLabel.textColor = [UIColor blackColor];
|
_titleLabel.textColor = [UIColor blackColor];
|
||||||
_titleLabel.font = [KBFont medium:16];
|
_titleLabel.font = [KBFont medium:16];
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
- (UIButton *)saveButton {
|
- (UIButton *)saveButton {
|
||||||
if (!_saveButton) {
|
if (!_saveButton) {
|
||||||
_saveButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
_saveButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
[_saveButton setTitle:@"Save" forState:UIControlStateNormal];
|
[_saveButton setTitle:KBLocalized(@"Save") forState:UIControlStateNormal];
|
||||||
[_saveButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
[_saveButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
||||||
_saveButton.titleLabel.font = [KBFont medium:16];
|
_saveButton.titleLabel.font = [KBFont medium:16];
|
||||||
_saveButton.backgroundColor = [UIColor colorWithRed:0.02 green:0.75 blue:0.67 alpha:1.0];
|
_saveButton.backgroundColor = [UIColor colorWithRed:0.02 green:0.75 blue:0.67 alpha:1.0];
|
||||||
|
|||||||
@@ -576,8 +576,11 @@ autoShowBusinessError:YES
|
|||||||
if (!_manager) {
|
if (!_manager) {
|
||||||
NSURLSessionConfiguration *cfg = [NSURLSessionConfiguration ephemeralSessionConfiguration];
|
NSURLSessionConfiguration *cfg = [NSURLSessionConfiguration ephemeralSessionConfiguration];
|
||||||
cfg.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
|
cfg.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
|
||||||
|
cfg.timeoutIntervalForRequest = self.timeout; // 单次请求超时
|
||||||
|
cfg.timeoutIntervalForResource = 60.0; // 整个资源传输最大 60s
|
||||||
|
|
||||||
// 不在会话级别设置超时,避免与 per-request 的 serializer.timeoutInterval 产生不一致
|
// 不在会话级别设置超时,避免与 per-request 的 serializer.timeoutInterval 产生不一致
|
||||||
if (@available(iOS 11.0, *)) { cfg.waitsForConnectivity = YES; }
|
// if (@available(iOS 11.0, *)) { cfg.waitsForConnectivity = YES; }
|
||||||
_manager = [[AFHTTPSessionManager alloc] initWithBaseURL:nil sessionConfiguration:cfg];
|
_manager = [[AFHTTPSessionManager alloc] initWithBaseURL:nil sessionConfiguration:cfg];
|
||||||
// 默认不使用 JSON 解析器,保持原生数据,再按需解析
|
// 默认不使用 JSON 解析器,保持原生数据,再按需解析
|
||||||
_manager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
_manager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||||
|
|||||||
Reference in New Issue
Block a user