diff --git a/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj b/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj index 6deafae..8e65169 100644 --- a/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj +++ b/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj @@ -4286,12 +4286,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = TreeHole/TreeHole.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Y797QLF5AW; + DEVELOPMENT_TEAM = C39VUKAY2Z; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = ( @@ -4326,10 +4324,9 @@ "$(PROJECT_DIR)/TreeHole/Code/WechatSDK/OpenSDK2.0.2", ); MARKETING_VERSION = 2.4.4; - PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app; + PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = app1; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -4350,12 +4347,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = TreeHole/TreeHole.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Y797QLF5AW; + DEVELOPMENT_TEAM = C39VUKAY2Z; ENABLE_BITCODE = NO; EXCLUDED_ARCHS = ""; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited)"; @@ -4391,10 +4386,9 @@ "$(PROJECT_DIR)/TreeHole/Code/WechatSDK/OpenSDK2.0.2", ); MARKETING_VERSION = 2.4.4; - PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app; + PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = app1; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; diff --git a/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.m b/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.m index 4f598cb..4a6806c 100755 --- a/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.m +++ b/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.m @@ -238,11 +238,12 @@ static AFHTTPSessionManager *_manager; NSLog(@"path===%@,[self headers]%@",path,[self headers]); NSMutableDictionary *args = [self commonParamsM]; + NSLog(@"path===%@,[self headers]%@",path,[self headers]); [args addEntriesFromDictionary:params]; args[@"sign"] = [self generateSignWithParams:args]; + NSLog(@"params===%@",params); [_manager POST:path parameters:args headers:[self headers] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { [self handleRsp:responseObject path:path callback:callback]; - } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { if (callback) { if (error) { diff --git a/xdts-ios 3/TreeHole/Code/Features/Chat/View/AvatarView.m b/xdts-ios 3/TreeHole/Code/Features/Chat/View/AvatarView.m index 767934c..a57af1b 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Chat/View/AvatarView.m +++ b/xdts-ios 3/TreeHole/Code/Features/Chat/View/AvatarView.m @@ -50,7 +50,8 @@ UIImage *defaultAvatar = ImageNamed(@"TH_defalut_avatar"); self.image = defaultAvatar; if (user.avatar.length) { - [self sd_setImageWithURL:[NSURL URLWithString:user.avatar?:@""] placeholderImage:defaultAvatar]; + NSString *imgUrl = [user.avatar stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + [self sd_setImageWithURL:imgUrl placeholderImage:defaultAvatar]; } } diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m b/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m index b661472..c00611d 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m @@ -600,40 +600,18 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli } -(void)onSwitchClick:(UISwitch*)sender{ - if (sender.isOn) { - if (sender.tag == 0) { - [self setIsOpenNear:sender.isOn sender:sender]; - } else { - if ([UserService currentUser].security_code.length != SecurityCodeLength) { - [sender setOn:NO animated:NO]; - [AlertInputView showWithTitle:@"设置密码" content:nil maxLength:SecurityCodeLength action:^BOOL(NSString * _Nonnull content) { - if (content.length != SecurityCodeLength) { - [ToastUtil showToast:[NSString stringWithFormat:@"请输入%lu位数字", (unsigned long)SecurityCodeLength] position:CSToastPositionTop]; - return NO; - } - [UserService updateUserSecurityToRemote:@{ - @"security_code" : content ?: @"", - @"is_security_on" : @(1), - } completion:^(id _Nullable rsp, NSError * _Nullable error) { - if (error) { - [sender setOn:NO animated:YES]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [SVProgressHUD showErrorWithStatus:[error.userInfo objectForKey:@"message"]]; - }); - return; - } else { // 设置成功 - [sender setOn:YES animated:YES]; - [UserService currentUser].security_code = content; - [UserService currentUser].is_security_on = 1; - } - }]; - return YES; - }]; - return; - }else{ - [sender setOn:NO animated:NO]; + if (sender.tag == 0) { + [self setIsOpenNear:sender.isOn sender:sender]; + } else if (sender.isOn) { + if ([UserService currentUser].security_code.length != SecurityCodeLength) { + [sender setOn:NO animated:NO]; + [AlertInputView showWithTitle:@"设置密码" content:nil maxLength:SecurityCodeLength action:^BOOL(NSString * _Nonnull content) { + if (content.length != SecurityCodeLength) { + [ToastUtil showToast:[NSString stringWithFormat:@"请输入%lu位数字", (unsigned long)SecurityCodeLength] position:CSToastPositionTop]; + return NO; + } [UserService updateUserSecurityToRemote:@{ - @"security_code" : [UserService currentUser].security_code, + @"security_code" : content ?: @"", @"is_security_on" : @(1), } completion:^(id _Nullable rsp, NSError * _Nullable error) { if (error) { @@ -643,11 +621,31 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli }); return; } else { // 设置成功 - [UserService currentUser].is_security_on = 1; [sender setOn:YES animated:YES]; + [UserService currentUser].security_code = content; + [UserService currentUser].is_security_on = 1; } }]; - } + return YES; + }]; + return; + }else{ + [sender setOn:NO animated:NO]; + [UserService updateUserSecurityToRemote:@{ + @"security_code" : [UserService currentUser].security_code, + @"is_security_on" : @(1), + } completion:^(id _Nullable rsp, NSError * _Nullable error) { + if (error) { + [sender setOn:NO animated:YES]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [SVProgressHUD showErrorWithStatus:[error.userInfo objectForKey:@"message"]]; + }); + return; + } else { // 设置成功 + [UserService currentUser].is_security_on = 1; + [sender setOn:YES animated:YES]; + } + }]; } } else { [UserService updateUserSecurityToRemote:@{ diff --git a/xdts-ios 3/TreeHole/Info.plist b/xdts-ios 3/TreeHole/Info.plist index 80e8358..acbbdf5 100644 --- a/xdts-ios 3/TreeHole/Info.plist +++ b/xdts-ios 3/TreeHole/Info.plist @@ -76,10 +76,6 @@ AlibabaPuHuiTi-2-115-Black.ttf - UIBackgroundModes - - remote-notification - aps-environment development languga diff --git a/xdts-ios 3/TreeHole/TreeHole.entitlements b/xdts-ios 3/TreeHole/TreeHole.entitlements index eaed8c6..0c67376 100644 --- a/xdts-ios 3/TreeHole/TreeHole.entitlements +++ b/xdts-ios 3/TreeHole/TreeHole.entitlements @@ -1,13 +1,5 @@ - - aps-environment - development - com.apple.developer.associated-domains - - applinks:h5.diandi.club - applinks:https://xidi.iquanpai.com/app/ - - +