浏览代码

解决 5.1.1 审核问题bug

openlockPPP 1 年之前
父节点
当前提交
9e91adbbb2

+ 10 - 4
jiaPei.xcodeproj/project.pbxproj

@@ -103,6 +103,7 @@
 		90798B122A53E87800E68461 /* NYComplaintListViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90798B112A53E87800E68461 /* NYComplaintListViewModel.m */; };
 		908E6E642A89CCFC0090F00A /* DrCityInfoThree.json in Resources */ = {isa = PBXBuildFile; fileRef = 908E6E632A89CCFC0090F00A /* DrCityInfoThree.json */; };
 		908E6E662A8A08E40090F00A /* cities.json in Resources */ = {isa = PBXBuildFile; fileRef = 908E6E652A8A08E40090F00A /* cities.json */; };
+		90A2ACEB2AE7C57000FA6E20 /* RQHTTPService+NYAppleUserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A2ACEA2AE7C57000FA6E20 /* RQHTTPService+NYAppleUserInfo.m */; };
 		90AC53AB2A935EF90073D90F /* NYTestingCentreCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90AC53A92A935EF90073D90F /* NYTestingCentreCell.m */; };
 		90AC53AC2A935EF90073D90F /* NYTestingCentreCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90AC53AA2A935EF90073D90F /* NYTestingCentreCell.xib */; };
 		90AC53B22A9457070073D90F /* NYExerciseTestingCentreViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90AC53B12A9457070073D90F /* NYExerciseTestingCentreViewModel.m */; };
@@ -1834,6 +1835,8 @@
 		90798B112A53E87800E68461 /* NYComplaintListViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYComplaintListViewModel.m; sourceTree = "<group>"; };
 		908E6E632A89CCFC0090F00A /* DrCityInfoThree.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = DrCityInfoThree.json; sourceTree = "<group>"; };
 		908E6E652A8A08E40090F00A /* cities.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = cities.json; sourceTree = "<group>"; };
+		90A2ACE92AE7C57000FA6E20 /* RQHTTPService+NYAppleUserInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RQHTTPService+NYAppleUserInfo.h"; sourceTree = "<group>"; };
+		90A2ACEA2AE7C57000FA6E20 /* RQHTTPService+NYAppleUserInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RQHTTPService+NYAppleUserInfo.m"; sourceTree = "<group>"; };
 		90AC53A82A935EF90073D90F /* NYTestingCentreCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYTestingCentreCell.h; sourceTree = "<group>"; };
 		90AC53A92A935EF90073D90F /* NYTestingCentreCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYTestingCentreCell.m; sourceTree = "<group>"; };
 		90AC53AA2A935EF90073D90F /* NYTestingCentreCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NYTestingCentreCell.xib; sourceTree = "<group>"; };
@@ -7464,6 +7467,8 @@
 				D057C20829F5116B002F4AB2 /* RQHTTPService+RQGetPlaceVideoList.m */,
 				D057C20729F51168002F4AB2 /* RQHTTPService+RQGetPlaceVipList.h */,
 				D057C20129F51168002F4AB2 /* RQHTTPService+RQGetPlaceVipList.m */,
+				90A2ACE92AE7C57000FA6E20 /* RQHTTPService+NYAppleUserInfo.h */,
+				90A2ACEA2AE7C57000FA6E20 /* RQHTTPService+NYAppleUserInfo.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -10928,6 +10933,7 @@
 				D0870DB22701AA85004EC94E /* RQMainTabBarViewModel.m in Sources */,
 				D0324D9928236942004A7DF5 /* RQSettingViewController.m in Sources */,
 				D0870E342701B5A0004EC94E /* RQRegisterViewModel.m in Sources */,
+				90A2ACEB2AE7C57000FA6E20 /* RQHTTPService+NYAppleUserInfo.m in Sources */,
 				18432D621E67E1B700329346 /* AllLightImagePickerController.m in Sources */,
 				D04DF7B627006F72006E3633 /* RQPhotoManager.m in Sources */,
 				D057C1FC29F5107A002F4AB2 /* RQPlaceDetaiIQuestionItemViewModel.m in Sources */,
@@ -11726,7 +11732,7 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_RESOURCE_RULES_PATH[sdk=*]" = "";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2102023102301;
+				CURRENT_PROJECT_VERSION = 2112023102501;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;
@@ -11763,7 +11769,7 @@
 					"$(PROJECT_DIR)/jiaPei/Vendor/BaiDuFaceSDK/BDFaceSDK/lib",
 					"$(PROJECT_DIR)/jiaPei/Vendor/QiNiu_IMSDK/Vendors/Voice",
 				);
-				MARKETING_VERSION = 2.1.0;
+				MARKETING_VERSION = 2.1.1;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_CFLAGS = (
 					"$(inherited)",
@@ -11808,7 +11814,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2102023102301;
+				CURRENT_PROJECT_VERSION = 2112023102501;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;
@@ -11845,7 +11851,7 @@
 					"$(PROJECT_DIR)/jiaPei/Vendor/BaiDuFaceSDK/BDFaceSDK/lib",
 					"$(PROJECT_DIR)/jiaPei/Vendor/QiNiu_IMSDK/Vendors/Voice",
 				);
-				MARKETING_VERSION = 2.1.0;
+				MARKETING_VERSION = 2.1.1;
 				ONLY_ACTIVE_ARCH = NO;
 				OTHER_CFLAGS = (
 					"$(inherited)",

二进制
jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 4
jiaPei/AppDelegate.m

@@ -67,10 +67,6 @@
 //    NSData * data = [NSData dataWithContentsOfFile:imagePath];
 //    [[RQYDTXCQuestionModule sharedInstance] upMediaDataWithMediaName:@"13548-1692597132605.webp" data:data];
 
-    NSString *deviceidStr = nil;
-    if (deviceidStr == nil) deviceidStr = [SAMKeychain deviceId];
-    NSArray *components = [deviceidStr componentsSeparatedByString:@"-"];
-    NSLog(@"deviceidStr=%@",[NSString stringWithFormat:@"%@-%@",[components firstObject],[components lastObject]]);
     return YES;
 }
 

+ 20 - 0
jiaPei/Modules/HomePageModule/Model/RQHTTPService+NYAppleUserInfo.h

@@ -0,0 +1,20 @@
+//
+//  RQHTTPService+NYAppleUserInfo.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/10/24.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "RQHTTPService.h"
+
+#define RQ_GET_AppleUserInfo           @"https://jsjp-admin.zzxcx.net/jsjp-admin/open-api/applepay/getAppleUserInfo"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface RQHTTPService (NYAppleUserInfo)
+
+- (RACSignal *)getAppleUserInfo:(NSString *)loginCode;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 29 - 0
jiaPei/Modules/HomePageModule/Model/RQHTTPService+NYAppleUserInfo.m

@@ -0,0 +1,29 @@
+//
+//  RQHTTPService+NYAppleUserInfo.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/10/24.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "RQHTTPService+NYAppleUserInfo.h"
+
+@implementation RQHTTPService (NYAppleUserInfo)
+
+- (RACSignal *)getAppleUserInfo:(NSString *)loginCode {
+    /// 1. 配置参数
+    RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
+
+    subscript[@"logincode"] = loginCode;
+
+    /// 2. 配置参数模型
+    RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path: RQ_GET_AppleUserInfo parameters:subscript.dictionary];
+
+    /// 3.发起请求
+    return [[[RQHTTPRequest requestWithParameters:paramters]
+             enqueueResultClass:[RQUserModel class]]
+            rq_parsedResults];
+
+}
+
+@end

+ 3 - 0
jiaPei/Modules/LoginModule/Model/Login/RQHTTPService+RQLogin.h

@@ -10,6 +10,7 @@
 #import "RQUserModel.h"
 /// 学员登录接口
 #define RQ_POST_StudentLogin                    @"student/stuLogin"
+#define RQ_GET_AppleUserInfo           @"https://jsjp-admin.zzxcx.net/jsjp-admin/open-api/applepay/getAppleUserInfo"
 NS_ASSUME_NONNULL_BEGIN
 
 @interface RQHTTPService (RQLogin)
@@ -23,6 +24,8 @@ NS_ASSUME_NONNULL_BEGIN
 - (RACSignal *)studentLoginWithLoginCode:(NSString *)loginCode password:(NSString *)password;
 - (RACSignal *)studentLoginWithUserId:(NSString *)userId;
 - (RACSignal *)getUserinfoWithUserId:(NSString *)userId;
+- (RACSignal *)getAppleUserInfo:(NSString *)loginCode;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 15 - 0
jiaPei/Modules/LoginModule/Model/Login/RQHTTPService+RQLogin.m

@@ -68,4 +68,19 @@
             rq_parsedResults];
 }
 
+- (RACSignal *)getAppleUserInfo:(NSString *)loginCode
+{
+    /// 1. 配置参数
+    RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
+    subscript[@"logincode"] = loginCode;
+
+    /// 2. 配置参数模型
+    RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path: RQ_GET_AppleUserInfo parameters:subscript.dictionary];
+
+    /// 3.发起请求
+    return [[[RQHTTPRequest requestWithParameters:paramters]
+             enqueueResultClass:[RQUserModel class]]
+            rq_parsedResults];
+}
+
 @end

+ 44 - 1
jiaPei/Modules/OtherModules/VIPModule/RQVIPModule.m

@@ -235,7 +235,30 @@ static id rq_VIPModule = nil;
                     NSLog(@"跳转登录");
                 }
             }else if (selectedOtherButtonIndex == 1) {//游客登录
-                
+                NSString *deviceidStr = [SAMKeychain deviceId];
+                NSArray *components = [deviceidStr componentsSeparatedByString:@"-"];
+                NSString *logincode = [components lastObject];
+                [MBProgressHUD rq_showProgressHUD:@""];
+                [[RQ_HTTP_Service getAppleUserInfo:logincode] subscribeNext:^(RQUserModel *userModel) {
+                    [MBProgressHUD rq_hideHUD];
+                    if(userModel){
+                        userModel.nickName = userModel.userName;
+                        /// 存储用户数据nickName
+                        [RQ_USER_MANAGER loginUser:userModel];
+                        if (userModel.channel == RQUserLoginChannelTypePhone) {
+                            /// 切换更控制器
+                            dispatch_async(dispatch_get_main_queue(), ^{
+                                /// 发通知
+                                [[NSNotificationCenter defaultCenter] postNotificationName:RQSwitchRootViewControllerNotification object:nil userInfo:@{RQSwitchRootViewControllerUserInfoKey:@(RQSwitchRootViewControllerFromTypeLogin)}];
+                            });
+                        }
+                        [MBProgressHUD rq_showTips:@"登录成功"];
+                    }
+                } error:^(NSError * _Nullable error) {
+                    [MBProgressHUD rq_hideHUD];
+                    [MBProgressHUD rq_showTips:error.description];
+                } completed:^{
+                }];
             }
             NSLog(@"index=%zd",selectedOtherButtonIndex);
         }];
@@ -246,6 +269,26 @@ static id rq_VIPModule = nil;
 
 - (void)isActiveWithCcomplete:(RQGetActivationModelBlock)complete {
     if (RQ_USER_MANAGER.isShouldLogin) {
+        if([RQ_USER_MANAGER.currentUser.userName containsString:@"游客"]){//游客特殊处理
+            if (complete) {
+                self.activationModel = [[RQActivationModel alloc] init];
+                self.activationModel.isActive = 1;
+                self.activationModel.isShare = 0;
+                self.activationModel.userId = RQ_USER_MANAGER.currentUser._id.intValue;
+                if (!RQObjectIsNil(self.activationModel)) {
+                    if ([self.activationModel isKindOfClass:[RQActivationModel class]]) {
+                        complete(self.activationModel, YES);
+                    } else {
+                        [MBProgressHUD rq_showTips:@"获取激活信息失败"];
+                        complete(self.activationModel, NO);
+                    }
+                } else {
+                    [MBProgressHUD rq_showTips:@"获取激活信息失败"];
+                    complete(self.activationModel, NO);
+                }
+            }
+            return;
+        }
         [[RQ_HTTP_Service getActivationWithUserId:RQ_USER_MANAGER.currentUser._id] subscribeNext:^(RQActivationModel *activationModel) {
             if (complete) {
                 self.activationModel = activationModel;

+ 4 - 2
jiaPei/Modules/OtherModules/VIPModule/ViewController/RQVipViewController.m

@@ -115,7 +115,8 @@
             [[RACScheduler mainThreadScheduler] schedule:^{
                 [NSObject rq_showAlertViewWithTitle:@"温馨提示" message:message confirmTitle:confirmTitle cancelTitle:@"取消" confirmAction:^{
                     [[RACScheduler mainThreadScheduler] schedule:^{
-                        if ([RQ_USER_MANAGER.currentUser.loginCode isEqualToString:@"350881199205290949"]) {
+                        if ([RQ_USER_MANAGER.currentUser.loginCode isEqualToString:@"350881199205290949"]||
+                            [RQ_USER_MANAGER.currentUser.userName containsString:@"游客"]) {
                             /// 调起苹果内购
                             [MBProgressHUD rq_showProgressHUD:@"购买中..."];
                             NSString *idStr = [NSString stringWithFormat:@"com.kestrel.JSJPStudent.vip.%ld",RQ_VIP_Module.chooseTypeModel.dictCode];
@@ -174,7 +175,8 @@
             [[RACScheduler mainThreadScheduler] schedule:^{
                 [NSObject rq_showAlertViewWithTitle:@"温馨提示" message:message confirmTitle:confirmTitle cancelTitle:@"取消" confirmAction:^{
                     [[RACScheduler mainThreadScheduler] schedule:^{
-                        if ([RQ_USER_MANAGER.currentUser.loginCode isEqualToString:@"350881199205290949"]) {
+                        if ([RQ_USER_MANAGER.currentUser.loginCode isEqualToString:@"350881199205290949"]||
+                            [RQ_USER_MANAGER.currentUser.userName containsString:@"游客"]) {
                             /// 调起苹果内购
                             [MBProgressHUD rq_showProgressHUD:@"购买中..."];
                             NSString *idStr = [NSString stringWithFormat:@"com.kestrel.JSJPStudent.vip.%ld",RQ_VIP_Module.chooseTypeModel.dictCode];

+ 4 - 0
jiaPei/Modules/TimeModule/ViewModel/itemViewModel/RQTimeSingleItemViewModel.m

@@ -59,6 +59,10 @@
 }
 
 - (void)gotoVCWithStr:(NSString *)str {
+    if([RQ_USER_MANAGER.currentUser.userName containsString:@"游客"]){//游客特殊处理
+        ShowMsg(@"您是游客身份,无法使用计时");
+        return;
+    }
     if ([str isEqualToString:@"理论计时"]) {
         [self gotoPeriod:0];
     } else if ([str isEqualToString:@"从业考核"]||[str isEqualToString:@"从业计时"]) {

+ 1 - 1
jiaPei/Utils/Manager/ConfigureManager/RQConfigureManager.m

@@ -110,7 +110,7 @@ static NSString * const RQApplicationUseHttpsKey = @"RQApplicationUseHttpsKey";
 	} else {
 		/// 测试环境
 		NSLog(@"¥¥¥¥¥¥¥¥ 测试环境 ¥¥¥¥¥¥¥¥");
-		return [self applicationUseHttps] ? @"http://192.168.8.97:8080/xmappservice2/" : @"http://192.168.8.97:8080/xmappservice2/";
+		return [self applicationUseHttps] ? @"http://192.168.8.63:8080/xmappservice2/" : @"http://192.168.8.63:8080/xmappservice2/";
 	}
 }
 

+ 2 - 2
jiaPei/Utils/Service/HTTP/RQHTTPService.m

@@ -255,7 +255,7 @@ static id service_ = nil;
         
         if ([path containsString:@"zzjs.zzxcx.net"]) {
             request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:path relativeToURL:[NSURL URLWithString:@""]] absoluteString] parameters:parameters error:&serializationError];
-        } else if ([path containsString:@"jsjp-admin.zzxcx.net"] || [path containsString:@"jsjp-admin1.zzxcx.net"] || [path containsString:@"192.168.8.71:8080"]) {
+        } else if ([path containsString:@"jsjp-admin.zzxcx.net"] || [path containsString:@"jsjp-admin1.zzxcx.net"] || [path containsString:@"192.168.8.63:8080"]) {
             request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:path relativeToURL:[NSURL URLWithString:@""]] absoluteString] parameters:parameters error:&serializationError];
         } else {
             if ([path isEqualToString:RQ_POST_AddCollections]) {
@@ -959,7 +959,7 @@ static id service_ = nil;
     /// 请求序列化
     AFJSONRequestSerializer *requestSerializer = [AFJSONRequestSerializer serializer];
     /// 配置请求头
-    if ([request.urlParameters.path containsString:@"jsjp-admin.zzxcx.net"] || [request.urlParameters.path containsString:@"jsjp-admin1.zzxcx.net"] || [request.urlParameters.path containsString:@"192.168.8.71:8080"]) {
+    if ([request.urlParameters.path containsString:@"jsjp-admin.zzxcx.net"] || [request.urlParameters.path containsString:@"jsjp-admin1.zzxcx.net"] || [request.urlParameters.path containsString:@"192.168.8.63:8080"]) {
         
     } else {
         for (NSString *key in parameters) {