Prechádzať zdrojové kódy

广西-科一计时。 解决bug2个

openlockPPP 9 mesiacov pred
rodič
commit
8cf2eac061
46 zmenil súbory, kde vykonal 6649 pridanie a 5744 odobranie
  1. 1 1
      Podfile
  2. 5 1
      Podfile.lock
  3. 5 1
      Pods/Manifest.lock
  4. 5606 5584
      Pods/Pods.xcodeproj/project.pbxproj
  5. 5 0
      Pods/Pods.xcodeproj/xcuserdata/mimasigeling.xcuserdatad/xcschemes/xcschememanagement.plist
  6. 5 0
      Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei-acknowledgements.markdown
  7. 11 0
      Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei-acknowledgements.plist
  8. 0 0
      Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei.debug.xcconfig
  9. 0 0
      Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei.release.xcconfig
  10. 11 5
      jiaPei.xcodeproj/project.pbxproj
  11. BIN
      jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate
  12. 7 1
      jiaPei/APPdelegateModularForRequest.m
  13. 3 3
      jiaPei/APPdelegateModularForVendor.m
  14. 7 6
      jiaPei/AppDelegate.m
  15. 23 0
      jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/Contents.json
  16. BIN
      jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/电子资料.png
  17. BIN
      jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/电子资料@2x.png
  18. BIN
      jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/电子资料@3x.png
  19. 1 0
      jiaPei/Modules/HomePageModule/RQHomePageModule.h
  20. 2 0
      jiaPei/Modules/HomePageModule/RQHomePageModule.m
  21. 34 10
      jiaPei/Modules/OtherModules/ExerciseModule/Controller/RQExerciseSubViewController.m
  22. 1 0
      jiaPei/Modules/OtherModules/ExerciseModule/Controller/RQExerciseViewController.m
  23. 1 1
      jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseSubViewModel.h
  24. 4 0
      jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseSubViewModel.m
  25. 1 0
      jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseViewModel.h
  26. 4 0
      jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseViewModel.m
  27. 1 0
      jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExerciseSubPage/考试相关/RQExamResultViewModel.h
  28. 42 19
      jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExerciseSubPage/考试相关/RQExamResultViewModel.m
  29. 2 2
      jiaPei/Modules/OtherModules/VIPModule/ViewModel/NYWPViewModel.m
  30. 27 5
      jiaPei/Modules/OtherModules/VideoModule/View/RQVideoDetailSubPageCell.m
  31. 3 3
      jiaPei/Modules/ProfileModule/ViewModel/RQProfileViewModel.m
  32. 11 0
      jiaPei/Modules/TimeModule/ViewModel/RQTimeViewModel.m
  33. 26 0
      jiaPei/Modules/TimeModule/ViewModel/itemViewModel/NYKaoMockExaminationModel.h
  34. 489 0
      jiaPei/Modules/TimeModule/ViewModel/itemViewModel/NYKaoMockExaminationModel.m
  35. 40 17
      jiaPei/Modules/TimeModule/ViewModel/itemViewModel/RQTimeSingleItemViewModel.m
  36. 4 1
      jiaPei/NewTheory/NYBasetjTimeVC.h
  37. 39 0
      jiaPei/NewTheory/NYBasetjTimeVC.m
  38. 4 0
      jiaPei/OLD/Util/RQRemoteTheoryManager/RQRemoteTheoryManager.h
  39. 77 0
      jiaPei/OLD/Util/RQRemoteTheoryManager/RQRemoteTheoryManager.m
  40. 7 7
      jiaPei/OLD/Util/RQShareFunction.m
  41. 2 2
      jiaPei/PrefixHeader.pch
  42. 6 0
      jiaPei/Utils/Manager/CommonManager/RQCommonManager.h
  43. 44 0
      jiaPei/Utils/Manager/CommonManager/RQCommonManager.m
  44. 6 0
      jiaPei/Utils/Manager/UserManager/RQUserManager.m
  45. 3 3
      jiaPei/Utils/Manager/WechatManager/RQWechatManager.h
  46. 79 72
      jiaPei/Utils/Manager/WechatManager/RQWechatManager.m

+ 1 - 1
Podfile

@@ -88,7 +88,7 @@ target  'jiaPei'  do
     pod 'CGXVerticalMenuView-OC'                      # 分类菜单
     pod 'HWPanModal'                                  # 弹出方式
     pod 'KTVHTTPCache'                                # 缓存
-#    pod 'WechatOpenSDK'
+    pod 'WechatOpenSDK'
     pod 'OpenSSL-Universal'
     pod 'GKPhotoBrowser'
     pod 'SGQRCode'

+ 5 - 1
Podfile.lock

@@ -532,6 +532,7 @@ PODS:
     - UMDevice
   - UMDevice (3.4.0)
   - WebViewJavascriptBridge (6.0.3)
+  - WechatOpenSDK (2.0.4)
   - XHLaunchAd (3.9.12):
     - FLAnimatedImage (~> 1.0.12)
   - YYCache (1.0.4)
@@ -609,6 +610,7 @@ DEPENDENCIES:
   - UMCommon
   - UMDevice
   - WebViewJavascriptBridge
+  - WechatOpenSDK
   - XHLaunchAd
   - YYImage/WebP
   - YYModel
@@ -690,6 +692,7 @@ SPEC REPOS:
     - UMCommon
     - UMDevice
     - WebViewJavascriptBridge
+    - WechatOpenSDK
     - XHLaunchAd
     - YYCache
     - YYImage
@@ -779,6 +782,7 @@ SPEC CHECKSUMS:
   UMCommon: 8b4cd0423297c39bca6eea1ec896558b40e5bcf7
   UMDevice: dcdf7ec167387837559d149fbc7d793d984faf82
   WebViewJavascriptBridge: 7f5bc4d3581e672e8f32bd0f812d54bc69bb8e29
+  WechatOpenSDK: 290989072e87b79d52225a01bb4e5e58f6f88593
   XHLaunchAd: 6320f9c68732667323072fc3a5f104e40fbe9cfe
   YYCache: 8105b6638f5e849296c71f331ff83891a4942952
   YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
@@ -788,6 +792,6 @@ SPEC CHECKSUMS:
   ZFPlayer: 5cf39e8d9f0c2394a014b0db4767b5b5a6bffe13
   ZXSDK: 414bed508b670437a9bdf7c75d49816b8cb7b2d4
 
-PODFILE CHECKSUM: dac5e05a926072932c01dfefe297d192489d3c43
+PODFILE CHECKSUM: 383fcaa284735df40f4f1d53f2ec61c8c3e29de9
 
 COCOAPODS: 1.12.1

+ 5 - 1
Pods/Manifest.lock

@@ -532,6 +532,7 @@ PODS:
     - UMDevice
   - UMDevice (3.4.0)
   - WebViewJavascriptBridge (6.0.3)
+  - WechatOpenSDK (2.0.4)
   - XHLaunchAd (3.9.12):
     - FLAnimatedImage (~> 1.0.12)
   - YYCache (1.0.4)
@@ -609,6 +610,7 @@ DEPENDENCIES:
   - UMCommon
   - UMDevice
   - WebViewJavascriptBridge
+  - WechatOpenSDK
   - XHLaunchAd
   - YYImage/WebP
   - YYModel
@@ -690,6 +692,7 @@ SPEC REPOS:
     - UMCommon
     - UMDevice
     - WebViewJavascriptBridge
+    - WechatOpenSDK
     - XHLaunchAd
     - YYCache
     - YYImage
@@ -779,6 +782,7 @@ SPEC CHECKSUMS:
   UMCommon: 8b4cd0423297c39bca6eea1ec896558b40e5bcf7
   UMDevice: dcdf7ec167387837559d149fbc7d793d984faf82
   WebViewJavascriptBridge: 7f5bc4d3581e672e8f32bd0f812d54bc69bb8e29
+  WechatOpenSDK: 290989072e87b79d52225a01bb4e5e58f6f88593
   XHLaunchAd: 6320f9c68732667323072fc3a5f104e40fbe9cfe
   YYCache: 8105b6638f5e849296c71f331ff83891a4942952
   YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
@@ -788,6 +792,6 @@ SPEC CHECKSUMS:
   ZFPlayer: 5cf39e8d9f0c2394a014b0db4767b5b5a6bffe13
   ZXSDK: 414bed508b670437a9bdf7c75d49816b8cb7b2d4
 
-PODFILE CHECKSUM: dac5e05a926072932c01dfefe297d192489d3c43
+PODFILE CHECKSUM: 383fcaa284735df40f4f1d53f2ec61c8c3e29de9
 
 COCOAPODS: 1.12.1

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 5606 - 5584
Pods/Pods.xcodeproj/project.pbxproj


+ 5 - 0
Pods/Pods.xcodeproj/xcuserdata/mimasigeling.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -389,6 +389,11 @@
 			<key>isShown</key>
 			<false/>
 		</dict>
+		<key>WechatOpenSDK.xcscheme</key>
+		<dict>
+			<key>isShown</key>
+			<false/>
+		</dict>
 		<key>XHLaunchAd.xcscheme</key>
 		<dict>
 			<key>isShown</key>

+ 5 - 0
Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei-acknowledgements.markdown

@@ -1763,6 +1763,11 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 
 
+## WechatOpenSDK
+
+Copyright 2020 tencent.com. All rights reserved.
+
+
 ## XHLaunchAd
 
 The MIT License (MIT)

+ 11 - 0
Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei-acknowledgements.plist

@@ -2176,6 +2176,17 @@ OTHER DEALINGS IN THE SOFTWARE.
 			<key>Type</key>
 			<string>PSGroupSpecifier</string>
 		</dict>
+		<dict>
+			<key>FooterText</key>
+			<string>Copyright 2020 tencent.com. All rights reserved.
+</string>
+			<key>License</key>
+			<string>Copyright</string>
+			<key>Title</key>
+			<string>WechatOpenSDK</string>
+			<key>Type</key>
+			<string>PSGroupSpecifier</string>
+		</dict>
 		<dict>
 			<key>FooterText</key>
 			<string>The MIT License (MIT)

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei.debug.xcconfig


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
Pods/Target Support Files/Pods-jiaPei/Pods-jiaPei.release.xcconfig


+ 11 - 5
jiaPei.xcodeproj/project.pbxproj

@@ -90,6 +90,7 @@
 		900A2DE52A1FA89700395C1F /* RQAppEventAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 900A2DE02A1FA89700395C1F /* RQAppEventAnnotation.m */; };
 		900A2DE62A1FA89700395C1F /* RQBaseAppEventModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 900A2DE12A1FA89700395C1F /* RQBaseAppEventModule.m */; };
 		9017E8DA2A6F97DC00571501 /* NYADViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9017E8D92A6F97DC00571501 /* NYADViewManager.m */; };
+		9019427D2C743FA100AD65E9 /* NYKaoMockExaminationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9019427C2C743FA100AD65E9 /* NYKaoMockExaminationModel.m */; };
 		9034A0252B80A399001FBB37 /* NYClassRoomPeiPhotoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9034A0242B80A399001FBB37 /* NYClassRoomPeiPhotoCell.m */; };
 		9040D2852B6F703E002F4686 /* NYClassRoomVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 9040D2842B6F703E002F4686 /* NYClassRoomVC.m */; };
 		9040D2882B6F7E07002F4686 /* NYClassRoomViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9040D2872B6F7E07002F4686 /* NYClassRoomViewModel.m */; };
@@ -1811,6 +1812,8 @@
 		900A2DE22A1FA89700395C1F /* RQAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RQAppDelegate.h; sourceTree = "<group>"; };
 		9017E8D82A6F97DC00571501 /* NYADViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYADViewManager.h; sourceTree = "<group>"; };
 		9017E8D92A6F97DC00571501 /* NYADViewManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYADViewManager.m; sourceTree = "<group>"; };
+		9019427B2C743FA100AD65E9 /* NYKaoMockExaminationModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYKaoMockExaminationModel.h; sourceTree = "<group>"; };
+		9019427C2C743FA100AD65E9 /* NYKaoMockExaminationModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYKaoMockExaminationModel.m; sourceTree = "<group>"; };
 		9034A0232B80A399001FBB37 /* NYClassRoomPeiPhotoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYClassRoomPeiPhotoCell.h; sourceTree = "<group>"; };
 		9034A0242B80A399001FBB37 /* NYClassRoomPeiPhotoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYClassRoomPeiPhotoCell.m; sourceTree = "<group>"; };
 		9040D2832B6F703E002F4686 /* NYClassRoomVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYClassRoomVC.h; sourceTree = "<group>"; };
@@ -4096,7 +4099,7 @@
 		D0D68D372890072F00600C5C /* RQExamResultViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RQExamResultViewController.h; sourceTree = "<group>"; };
 		D0D68D382890072F00600C5C /* RQExamResultViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RQExamResultViewController.m; sourceTree = "<group>"; };
 		D0D68D3A2890075200600C5C /* RQExamResultViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RQExamResultViewModel.h; sourceTree = "<group>"; };
-		D0D68D3B2890075200600C5C /* RQExamResultViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RQExamResultViewModel.m; sourceTree = "<group>"; };
+		D0D68D3B2890075200600C5C /* RQExamResultViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RQExamResultViewModel.m; sourceTree = "<group>"; wrapsLines = 0; };
 		D0D68D3D2890099A00600C5C /* RQExamResultHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RQExamResultHeaderView.h; sourceTree = "<group>"; };
 		D0D68D3E2890099A00600C5C /* RQExamResultHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RQExamResultHeaderView.m; sourceTree = "<group>"; };
 		D0D68D40289009A800600C5C /* RQExamResultHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RQExamResultHeaderView.xib; sourceTree = "<group>"; };
@@ -8639,6 +8642,8 @@
 				D08E8E5D2930C2B9001CEF97 /* RQTimeRuleItemViewModel.m */,
 				90FCD6A52BB517AF00E0CB61 /* NYTcarStudentLiveModel.h */,
 				90FCD6A62BB517AF00E0CB61 /* NYTcarStudentLiveModel.m */,
+				9019427B2C743FA100AD65E9 /* NYKaoMockExaminationModel.h */,
+				9019427C2C743FA100AD65E9 /* NYKaoMockExaminationModel.m */,
 			);
 			path = itemViewModel;
 			sourceTree = "<group>";
@@ -11417,6 +11422,7 @@
 				D00A14B92754A3D600793046 /* ZFLandscapeViewController+RQExtension.m in Sources */,
 				D04DF7B427006F72006E3633 /* RQConfigureManager.m in Sources */,
 				D0180C43280826D900ED8E4E /* RQRetrainViewModel.m in Sources */,
+				9019427D2C743FA100AD65E9 /* NYKaoMockExaminationModel.m in Sources */,
 				D084D87927CE02C500E521F0 /* RQVipAuthorityItemViewModel.m in Sources */,
 				D00A14FC2754A41C00793046 /* RQVideoCatalogueViewModel.m in Sources */,
 				1889B8321E5F050F00FB5DE5 /* TrainInfoTableViewCell.m in Sources */,
@@ -11698,7 +11704,7 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_RESOURCE_RULES_PATH[sdk=*]" = "";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2212024080503;
+				CURRENT_PROJECT_VERSION = 2222024081302;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;
@@ -11736,7 +11742,7 @@
 					"$(PROJECT_DIR)/jiaPei/Vendor/BaiDuFaceSDK/BDFaceSDK/lib",
 					"$(PROJECT_DIR)/jiaPei/Vendor/QiNiu_IMSDK/Vendors/Voice",
 				);
-				MARKETING_VERSION = 2.2.1;
+				MARKETING_VERSION = 2.2.2;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_CFLAGS = (
 					"$(inherited)",
@@ -11781,7 +11787,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2212024080503;
+				CURRENT_PROJECT_VERSION = 2222024081302;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;
@@ -11819,7 +11825,7 @@
 					"$(PROJECT_DIR)/jiaPei/Vendor/BaiDuFaceSDK/BDFaceSDK/lib",
 					"$(PROJECT_DIR)/jiaPei/Vendor/QiNiu_IMSDK/Vendors/Voice",
 				);
-				MARKETING_VERSION = 2.2.1;
+				MARKETING_VERSION = 2.2.2;
 				ONLY_ACTIVE_ARCH = NO;
 				OTHER_CFLAGS = (
 					"$(inherited)",

BIN
jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate


+ 7 - 1
jiaPei/APPdelegateModularForRequest.m

@@ -149,7 +149,13 @@ RQAppEventMod(APPdelegateModularForRequest)
                 RQ_COMMON_MANAGER.JSJP_APP_AD_CYCLE = [dictInfoModel.dictValue integerValue];
             } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_iOS_PT"]) {
                 RQ_COMMON_MANAGER.JSJP_iOS_PT = [dictInfoModel.dictValue integerValue];
-            } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_Is_Online_Media_Image"]) {
+            } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_SHARE_CITY"]) {
+                RQ_COMMON_MANAGER.JSJP_SHARE_CITY = dictInfoModel.dictValue;
+            }else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_XCX_NAME"]) {
+                RQ_COMMON_MANAGER.JSJP_XCX_NAME = dictInfoModel.dictValue;
+            }else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_XCX_PAGE"]) {
+                RQ_COMMON_MANAGER.JSJP_XCX_PAGE = dictInfoModel.dictValue;
+            }else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_Is_Online_Media_Image"]) {
                 RQ_COMMON_MANAGER.JSJP_Is_Online_Media_Image = [dictInfoModel.dictValue boolValue];
             } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_Is_Online_Media_Video"]) {
                 RQ_COMMON_MANAGER.JSJP_Is_Online_Media_Video = [dictInfoModel.dictValue boolValue];

+ 3 - 3
jiaPei/APPdelegateModularForVendor.m

@@ -22,7 +22,7 @@
 //#import <TencentOpenAPI/TencentOAuth.h>
 //#import <TencentOpenAPI/QQApiInterface.h>
 /// 微信SDK头文件
-//#import "WXApi.h"
+#import "WXApi.h"
 
 #import "DOUAudioStreamer+Options.h"
 
@@ -39,7 +39,7 @@
 
 RQAppEventMod(APPdelegateModularForVendor)
 
-@interface APPdelegateModularForVendor () <BMKGeneralDelegate, BMKLocationAuthDelegate> //<BMKGeneralDelegate, BMKLocationAuthDelegate,WXApiDelegate>
+@interface APPdelegateModularForVendor () <BMKGeneralDelegate, BMKLocationAuthDelegate,WXApiDelegate>
 @end
 
 @implementation APPdelegateModularForVendor
@@ -59,7 +59,7 @@ RQAppEventMod(APPdelegateModularForVendor)
 	/// 初始化百度地图
 	[self initBaiduMap];
 	/// 初始化ShareSDK
-//	[self initShareSDK];
+	[self initShareSDK];
 	/// 初始化百度人脸识别SDK
 	[self initDBFaceSDK];
     /// 初始化YYCache

+ 7 - 6
jiaPei/AppDelegate.m

@@ -7,13 +7,11 @@
 //
 
 #import "AppDelegate.h"
-//#import <AlipaySDK/AlipaySDK.h>
-//#import "WXApiManager.h"
 #import <ZFPlayer/ZFLandscapeRotationManager.h>
 #import <UMCommon/UMCommon.h>
 #import "RQYDTXCQuestionModule.h"
 
-@interface AppDelegate () //<WXApiDelegate>
+@interface AppDelegate ()
 /// APP管理的导航栏的堆栈
 @property (nonatomic, readwrite, strong) RQNavigationControllerStack *navigationControllerStack;
 /// APP的服务层
@@ -101,8 +99,9 @@
 		NSLog(@"通用链接 :%@", url);
 		
 		if ([[url absoluteString] containsString:RQ_WECHAT_MANAGER.appID]) {
-            return  YES; //[WXApi handleOpenUniversalLink:userActivity
-			//delegate:RQ_WECHAT_MANAGER];
+//            return [RQ_WECHAT_MANAGER kplchihandleLrvm:[url absoluteString]];
+            return [WXApi handleOpenUniversalLink:userActivity
+			delegate:RQ_WECHAT_MANAGER];
 		} else if ([[url absoluteString] containsString:@"https://app.jppt.com.cn/JSJPStudent/"]) {
 			return YES;
 		}
@@ -142,7 +141,9 @@
 //	}
     /// 
 	if ([[url absoluteString] containsString:RQ_WECHAT_MANAGER.appID]) {
-        return  YES;//[WXApi handleOpenURL:url delegate:RQ_WECHAT_MANAGER];
+        
+//        return [RQ_WECHAT_MANAGER kplchihandleLrvm:[url absoluteString]];
+        return  [WXApi handleOpenURL:url delegate:RQ_WECHAT_MANAGER];
 	}
 	return YES;
 }

+ 23 - 0
jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "电子资料.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "电子资料@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "电子资料@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/电子资料.png


BIN
jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/电子资料@2x.png


BIN
jiaPei/Images.xcassets/Modules/ProfileModule/电子资料.imageset/电子资料@3x.png


+ 1 - 0
jiaPei/Modules/HomePageModule/RQHomePageModule.h

@@ -19,6 +19,7 @@ FOUNDATION_EXTERN CGFloat const RQHomeSubPageEditListToolBarHeight;
 FOUNDATION_EXTERN NSString * const RQHomePageCarTypeKey;
 /// 首页科目选项Key
 FOUNDATION_EXTERN NSString * const RQHomePageSubjectTypeKey;
+FOUNDATION_EXTERN NSString * const RQHomeSubPageTypeKHModeKey;
 /// 首页子页面类型Key
 FOUNDATION_EXTERN NSString * const RQHomeSubPageTypeKey;
 /// EditList类型Key

+ 2 - 0
jiaPei/Modules/HomePageModule/RQHomePageModule.m

@@ -21,6 +21,8 @@ NSString * const RQHomePageCarTypeKey = @"RQHomePageCarTypeKey";
 NSString * const RQHomePageSubjectTypeKey = @"RQHomePageSubjectTypeKey";
 /// 首页子页面类型Key
 NSString * const RQHomeSubPageTypeKey = @"RQHomeSubPageTypeKey";
+/// 广西-考试是否签退-mode 0默认没有 1广西 
+NSString * const RQHomeSubPageTypeKHModeKey = @"RQHomeSubPageTypeKHModeKey";
 /// EditList类型Key
 NSString * const RQHomeSubEditListTypeKey = @"RQHomeSubEditListTypeKey";
 

+ 34 - 10
jiaPei/Modules/OtherModules/ExerciseModule/Controller/RQExerciseSubViewController.m

@@ -51,13 +51,14 @@
             make.size.mas_equalTo(CGSizeMake(RQ_SCREEN_WIDTH, RQ_FIT_HORIZONTAL(50.f)));
         }];
     });
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateScoreView) name:@"updateScoreView" object:nil];
 }
 
 - (void)viewWillDisappear:(BOOL)animated {
     [super viewWillDisappear:animated];
-//    int popNum = _firstNum<self.questionArr.count-1 ?_firstNum+1:(int)self.questionArr.count-1;
-//    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInt:popNum] forKey:@"QUESTIONNUM"];
-//    [[NSUserDefaults standardUserDefaults] synchronize];
+    //    int popNum = _firstNum<self.questionArr.count-1 ?_firstNum+1:(int)self.questionArr.count-1;
+    //    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInt:popNum] forKey:@"QUESTIONNUM"];
+    //    [[NSUserDefaults standardUserDefaults] synchronize];
 }
 
 - (void)viewWillLayoutSubviews {
@@ -65,7 +66,18 @@
     
 }
 
+- (void)updateScoreView {
+    RQExamResultViewModel *examResultViewModel = [[RQExamResultViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
+        RQViewModelUtilKey : self.viewModel.questionArr,
+        RQViewModelIDKey   : RQ_Exercise_Module.correctArr,
+        RQViewCommonValueKey : RQ_Exercise_Module.errorArr,
+        RQHomeSubPageTypeKHModeKey : @(self.viewModel.subPageTypeKHMode)
+    }];
+    [RQ_APPDELEGATE.services pushViewModel:examResultViewModel animated:YES];
+}
+
 - (void)dealloc {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
     RQ_Exercise_Module.correctArr = @[];
     RQ_Exercise_Module.errorArr = @[];
     self.categoryView.delegate = nil;
@@ -493,13 +505,25 @@
             };
             [RQ_Exercise_Module showAlertWithRQExerciseAlertType:RQExerciseAlertType_Exam_HandUp valueDic:dic confirmAction:^(__kindof QMUIDialogViewController *dialogViewController) {
                 @strongify(self);
-                /// 交卷
-                RQExamResultViewModel *examResultViewModel = [[RQExamResultViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
-                    RQViewModelUtilKey : self.viewModel.questionArr,
-                    RQViewModelIDKey   : RQ_Exercise_Module.correctArr,
-                    RQViewCommonValueKey : RQ_Exercise_Module.errorArr,
-                }];
-                [RQ_APPDELEGATE.services pushViewModel:examResultViewModel animated:YES];
+                NSInteger totalNum = self.viewModel.questionArr.count;
+                NSInteger rightNum = RQ_Exercise_Module.correctArr.count;
+                NSInteger perScore = 100 / totalNum;
+                NSInteger score = rightNum * perScore;
+                if(self.viewModel.subPageTypeKHMode == 1){//广西特殊处理score
+                    dispatch_time_t dipatchTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC));
+                    dispatch_after(dipatchTime, dispatch_get_main_queue(), ^{
+                        [[NSNotificationCenter defaultCenter] postNotificationName:RQHomeSubPageTypeKHModeKey object:@(score)];//通知-签退
+                    });
+                }else{
+                    /// 现在交卷
+                    RQExamResultViewModel *examResultViewModel = [[RQExamResultViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
+                        RQViewModelUtilKey : self.viewModel.questionArr,
+                        RQViewModelIDKey   : RQ_Exercise_Module.correctArr,
+                        RQViewCommonValueKey : RQ_Exercise_Module.errorArr,
+                        RQHomeSubPageTypeKHModeKey : @(self.viewModel.subPageTypeKHMode)
+                    }];
+                    [RQ_APPDELEGATE.services pushViewModel:examResultViewModel animated:YES];
+                }
             } cancelAction:^(__kindof QMUIDialogViewController *dialogViewController) {
                 if (RQ_Exercise_Module.timer) {
                     [RQ_Exercise_Module.timer setFireDate:[NSDate distantPast]];

+ 1 - 0
jiaPei/Modules/OtherModules/ExerciseModule/Controller/RQExerciseViewController.m

@@ -332,6 +332,7 @@
         RQViewModelIDKey            : self.viewModel.titleStr?  : @"",
         RQViewCommonValueKey        : @(self.viewModel.number),
         RQViewModelUtilKey          : self.viewModel.questionArr? : @[],
+        RQHomeSubPageTypeKHModeKey  : @(self.viewModel.subPageTypeKHMode),
     }];
     RQExerciseSubViewController *exerciseSubViewController = [[RQExerciseSubViewController alloc] initWithViewModel:exerciseSubViewModel];
     return exerciseSubViewController;

+ 1 - 1
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseSubViewModel.h

@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, readonly, copy) NSString *titleStr;
 @property (nonatomic, readonly, assign) NSInteger number;
 @property (nonatomic, readwrite, copy) NSArray *questionArr;
-
+@property (nonatomic, readwrite, assign) int subPageTypeKHMode; //0默认 1广西
 
 
 @end

+ 4 - 0
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseSubViewModel.m

@@ -36,6 +36,10 @@
         self.titleStr = params[RQViewModelIDKey];
         self.number = [params[RQViewCommonValueKey] integerValue];
         self.questionArr = params[RQViewModelUtilKey];
+        self.subPageTypeKHMode = 0;
+        if(params[RQHomeSubPageTypeKHModeKey]){
+            self.subPageTypeKHMode = [params[RQHomeSubPageTypeKHModeKey] integerValue];
+        }
         //读取用户记录-赋值
         if(self.homeSubPageType == RQHomeSubPageType_SequentialPractice){//只有顺序-记录
             NSArray *readList = [NYTools readExerciseListUserKey:RQ_USER_MANAGER.currentUser.outId carType:RQ_YDTQuestion_Module.carType subject:RQ_YDTQuestion_Module.subject exerciseType:RQ_Exercise_Module.currentExerciseType];

+ 1 - 0
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseViewModel.h

@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, readonly, copy) NSString *titleStr;
 @property (nonatomic, readonly, assign) NSInteger number;
 @property (nonatomic, readonly, copy) NSArray *questionArr;
+@property (nonatomic, readwrite, assign) int subPageTypeKHMode; //0默认 1广西
 @end
 
 NS_ASSUME_NONNULL_END

+ 4 - 0
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExercisePage/RQExerciseViewModel.m

@@ -37,6 +37,10 @@
         self.titleStr = params[RQViewModelIDKey];
         self.number = [params[RQViewCommonValueKey] integerValue];
         self.questionArr = params[RQViewModelUtilKey];
+        self.subPageTypeKHMode = 0;
+        if(params[RQHomeSubPageTypeKHModeKey]){
+            self.subPageTypeKHMode = [params[RQHomeSubPageTypeKHModeKey] integerValue];
+        }
     }
     return self;
 }

+ 1 - 0
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExerciseSubPage/考试相关/RQExamResultViewModel.h

@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, readonly, copy) NSArray *questionArr;
 @property (nonatomic, readonly, copy) NSArray *errorArr;
 @property (nonatomic, readonly, copy) NSArray *correctArr;
+@property (nonatomic, readwrite, assign) int subPageTypeKHMode; //0默认 1广西
 @end
 
 NS_ASSUME_NONNULL_END

+ 42 - 19
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExerciseSubPage/考试相关/RQExamResultViewModel.m

@@ -25,13 +25,40 @@
         self.questionArr = params[RQViewModelUtilKey];
         self.errorArr = params[RQViewCommonValueKey];
         self.correctArr = params[RQViewModelIDKey];
+        if(params[RQHomeSubPageTypeKHModeKey]){
+            self.subPageTypeKHMode = [params[RQHomeSubPageTypeKHModeKey] integerValue];
+        }
+//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateScoreView) name:@"updateScoreView" object:nil];
+        
     }
     return self;
 }
 
+- (void)updateViewUI {
+    @weakify(self)
+    [[RQ_HTTP_Service getMyScore] subscribeNext:^(NSArray *examResultModelArr) {
+        @strongify(self)
+        if (RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne) {
+            RQ_COMMON_MANAGER.myExamOneCount = examResultModelArr.count;
+            RQ_COMMON_MANAGER.examResultOneListArr = examResultModelArr;
+        } else if (RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour) {
+            RQ_COMMON_MANAGER.myExamFourCount = examResultModelArr.count;
+            RQ_COMMON_MANAGER.examResultFourListArr = examResultModelArr;
+        }
+        RQExamSituationItemViewModel *examSituationItemViewModel = [[RQExamSituationItemViewModel alloc] init];
+        examSituationItemViewModel.examResultArr = RQObjectIsNil(examResultModelArr)? @[] : examResultModelArr;
+        self.group1.itemViewModels = @[examSituationItemViewModel];
+        self.dataSource = @[self.group0, self.group1];
+    }];
+}
+
+- (void)dealloc{
+//    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
 - (void)initialize {
     [super initialize];
-    @weakify(self)
+    
     self.title = @"本次考试成绩";
     self.prefersNavigationBarBottomLineHidden = YES;
     self.interactivePopDisabled = YES;
@@ -56,26 +83,22 @@
     
     NSDate *endDte = [NSDate dateWithTimeInterval:useCount sinceDate:RQ_Exercise_Module.beginDate];
     NSString *endDateStr = [[NSDateFormatter rq_defaultDateFormatter] stringFromDate:endDte];
-
-    [[[RQ_HTTP_Service saveFavQuestionWithScore:score startDate:beginDateStr endDate:endDateStr] deliverOnMainThread] subscribeNext:^(id  _Nullable x) {
-        [[RQ_HTTP_Service getMyScore] subscribeNext:^(NSArray *examResultModelArr) {
+    @weakify(self)
+    if(self.subPageTypeKHMode==1){
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            @strongify(self)
+            [self updateViewUI];
+        });
+    }else{
+        [[[RQ_HTTP_Service saveFavQuestionWithScore:score startDate:beginDateStr endDate:endDateStr] deliverOnMainThread] subscribeNext:^(id  _Nullable x) {
+            @strongify(self)
+            [self updateViewUI];
+        } error:^(NSError * _Nullable error) {
             @strongify(self)
-            if (RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne) {
-                RQ_COMMON_MANAGER.myExamOneCount = examResultModelArr.count;
-                RQ_COMMON_MANAGER.examResultOneListArr = examResultModelArr;
-            } else if (RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour) {
-                RQ_COMMON_MANAGER.myExamFourCount = examResultModelArr.count;
-                RQ_COMMON_MANAGER.examResultFourListArr = examResultModelArr;
-            }
-            RQExamSituationItemViewModel *examSituationItemViewModel = [[RQExamSituationItemViewModel alloc] init];
-            examSituationItemViewModel.examResultArr = RQObjectIsNil(examResultModelArr)? @[] : examResultModelArr;
-            self.group1.itemViewModels = @[examSituationItemViewModel];
-            self.dataSource = @[self.group0, self.group1];
+            self.dataSource = @[self.group0];
         }];
-    } error:^(NSError * _Nullable error) {
-        @strongify(self)
-        self.dataSource = @[self.group0];
-    }];
+    }
+    
 }
 
 

+ 2 - 2
jiaPei/Modules/OtherModules/VIPModule/ViewModel/NYWPViewModel.m

@@ -221,8 +221,8 @@
         @"loginCode":RQ_USER_MANAGER.currentUser.loginCode==nil?@"":RQ_USER_MANAGER.currentUser.loginCode,
         @"nickName":RQ_USER_MANAGER.currentUser.nickName,
         @"pxkm":RQ_USER_MANAGER.currentUser.pxkm==nil?@"":RQ_USER_MANAGER.currentUser.pxkm,
-        @"apsw":@"0",//RQ_COMMON_MANAGER.APP_SWITCH?@"1":@"0",
-        @"apt":@"2"//[NSString stringWithFormat:@"%zd",RQ_COMMON_MANAGER.JSJP_iOS_PT]
+        @"apsw":RQ_COMMON_MANAGER.APP_SWITCH?@"1":@"0",
+        @"apt":[NSString stringWithFormat:@"%zd",RQ_COMMON_MANAGER.JSJP_iOS_PT]
     };
     return obj;
 }

+ 27 - 5
jiaPei/Modules/OtherModules/VideoModule/View/RQVideoDetailSubPageCell.m

@@ -47,7 +47,7 @@
     _titleLabel.text = viewModel.videosItem.title;
     _subTitleLabel.text = viewModel.videosItem.videoDescribe? : @"";
     [_videoImageView yy_setImageWithURL:[NSURL URLWithString:viewModel.videosItem.coverFileUrl] placeholder:RQWebVideoImagePlaceholder()];
-    
+//    NSLog(@"permission=====%zd",viewModel.videosItem.permission);
     [[RACObserve(viewModel.videosItem, isPlaying) takeUntil:self.rac_prepareForReuseSignal] subscribeNext:^(id  _Nullable x) {
         @strongify(self)
         if (viewModel.videosItem.isPlaying) {
@@ -79,16 +79,38 @@
         }];
 //    }
     
-    [[[RACObserve(viewModel.videosItem.placeVideoListModel, permission) deliverOnMainThread] takeUntil:self.rac_prepareForReuseSignal] subscribeNext:^(id  _Nullable x) {
+//    [[[RACObserve(viewModel.videosItem.placeVideoListModel, permission) deliverOnMainThread] takeUntil:self.rac_prepareForReuseSignal] subscribeNext:^(id  _Nullable x) {
+//        @strongify(self)
+//        self.vipBtn.hidden = NO;
+//        if ([viewModel.videosItem.placeVideoListModel.permission isEqualToString:@"0"]) {
+//            self.vipBtn.hidden = YES;
+//            self.tryLookBtn.hidden = YES;
+//        } else if ([viewModel.videosItem.placeVideoListModel.permission isEqualToString:@"1"]) {
+//            self.vipBtn.hidden = YES;
+//            self.tryLookBtn.hidden = NO;
+//        } else if ([viewModel.videosItem.placeVideoListModel.permission isEqualToString:@"2"]) {
+//            self.vipBtn.hidden = NO;
+//            self.tryLookBtn.hidden = YES;
+//        } else {
+//            self.vipBtn.hidden = YES;
+//            self.tryLookBtn.hidden = YES;
+//        }
+//        if (viewModel.videosItem.placeVideoListModel.placeListModel.isCheckVip) {
+//            self.vipBtn.hidden = YES;
+//            self.tryLookBtn.hidden = YES;
+//        }
+//    }];
+    
+    [[[RACObserve(viewModel.videosItem, permission) deliverOnMainThread] takeUntil:self.rac_prepareForReuseSignal] subscribeNext:^(id  _Nullable x) {
         @strongify(self)
         self.vipBtn.hidden = NO;
-        if ([viewModel.videosItem.placeVideoListModel.permission isEqualToString:@"0"]) {
+        if (viewModel.videosItem.permission == 0) {
             self.vipBtn.hidden = YES;
             self.tryLookBtn.hidden = YES;
-        } else if ([viewModel.videosItem.placeVideoListModel.permission isEqualToString:@"1"]) {
+        } else if (viewModel.videosItem.permission == 1) {
             self.vipBtn.hidden = YES;
             self.tryLookBtn.hidden = NO;
-        } else if ([viewModel.videosItem.placeVideoListModel.permission isEqualToString:@"2"]) {
+        } else if (viewModel.videosItem.permission == 2) {
             self.vipBtn.hidden = NO;
             self.tryLookBtn.hidden = YES;
         } else {

+ 3 - 3
jiaPei/Modules/ProfileModule/ViewModel/RQProfileViewModel.m

@@ -176,11 +176,11 @@
         [RQControllerHelper.topViewController presentViewController:nav animated:NO completion:nil];
     };
     
-    RQCommonCollectionItemViewModel *test = [RQCommonCollectionItemViewModel itemViewModelWithTitle:@"三力测试" icon:@"三力测试"];
+    RQCommonCollectionItemViewModel *test = [RQCommonCollectionItemViewModel itemViewModelWithTitle:@"电子资料" icon:@"电子资料"];
     test.operation = ^{
-        
+        NSLog(@"点击了-电子资料");
+        [RQ_SHARE_FUNCTION miniwithUserName:RQ_COMMON_MANAGER.JSJP_XCX_NAME path:RQ_COMMON_MANAGER.JSJP_XCX_PAGE];
     };
-
     
     RQCommonCollectionItemViewModel *onlineService = [RQCommonCollectionItemViewModel itemViewModelWithTitle:@"联系客服" icon:@"联系客服"];
     onlineService.operation = ^{

+ 11 - 0
jiaPei/Modules/TimeModule/ViewModel/RQTimeViewModel.m

@@ -71,6 +71,10 @@
         timeSingle6ItemViewModel.icon = @"实车认证";
         timeSingle6ItemViewModel.title = @"实车认证";
         
+        RQTimeSingleItemViewModel *timeSingle7ItemViewModel = [[RQTimeSingleItemViewModel alloc] init];
+        timeSingle7ItemViewModel.icon = @"模拟培训";
+        timeSingle7ItemViewModel.title = @"科一考核";
+        
         //2023-12-13 日 , 从业计时不在开启
 //        group1.itemViewModels = RQ_USER_MANAGER.isCykh? @[timeSingle1ItemViewModel, timeSingle2ItemViewModel, timeSingle3ItemViewModel] : @[timeSingle1ItemViewModel, timeSingle3ItemViewModel];
         //2023-02-04 日 , 新增 课堂培训,模拟培训(待定)
@@ -86,6 +90,13 @@
         if([APP_MNXL isEqualToString:@"1"]){
             [mt_models addObject:timeSingle5ItemViewModel];
         }
+        //2024-08-20 日 , 新增 广西-添加科一审核
+        NSString *cityStr = @"4501,4502,4503";
+        if(RQ_USER_MANAGER.currentUser.city){
+            if ([cityStr rangeOfString:RQ_USER_MANAGER.currentUser.city].location != NSNotFound) {//课堂培训
+                [mt_models addObject:timeSingle7ItemViewModel];
+            }
+        }
         //培训
         group1.itemViewModels = mt_models;
         //@[timeSingle1ItemViewModel,timeSingle6ItemViewModel, timeSingle3ItemViewModel,timeSingle4ItemViewModel];

+ 26 - 0
jiaPei/Modules/TimeModule/ViewModel/itemViewModel/NYKaoMockExaminationModel.h

@@ -0,0 +1,26 @@
+//
+//  NYKaoMockExaminationModel.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2024/8/20.
+//  Copyright © 2024 JCZ. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NYKaoMockExaminationModel : NSObject
+
+/**
+ *1.先拍照-人脸比对
+ *2.1分钟后-拍照
+ *3.做完-提卷子后-签退
+ **/
+- (void)studentKaoMockExaminationdo;
+//签退-业务
+- (void)signOutHandledo:(NSInteger)score;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 489 - 0
jiaPei/Modules/TimeModule/ViewModel/itemViewModel/NYKaoMockExaminationModel.m

@@ -0,0 +1,489 @@
+//
+//  NYKaoMockExaminationModel.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2024/8/20.
+//  Copyright © 2024 JCZ. All rights reserved.
+//
+
+#import "NYKaoMockExaminationModel.h"
+
+@interface NYKaoMockExaminationModel ()
+
+@property (strong, readwrite, nonatomic) NSTimer         *timer;
+@property (strong, readwrite, nonatomic) NSDateFormatter *formatter;
+@property (assign, readwrite, nonatomic) NSInteger       seconds;
+@property (strong, readwrite, nonatomic) NSString *classIdStr;
+@property (assign, readwrite, nonatomic) NSInteger      score;
+@property (strong, nonatomic) NSString *begin_Time;//训练开始时间
+@property (nonatomic, assign) BOOL isProcessing; // 添加一个标志位,用于标记方法是否在执行中
+
+@end
+
+@implementation NYKaoMockExaminationModel
+
+// 初始化方法或在其他地方初始化
+- (instancetype)init {
+    self = [super init];
+    if (self) {
+        _isProcessing = NO;
+    }
+    return self;
+}
+
+/**
+ *1.先拍照-人脸比对
+ *2.1分钟后-拍照
+ *3.做完-提卷子后-签退
+ **/
+- (void)studentKaoMockExaminationdo {
+    // 检查是否正在处理,避免重复点击
+    if (self.isProcessing) {
+        ShowMsg(@"操作正在进行中,请稍候...");
+        return;
+    }
+    // 设置为正在处理状态
+    self.isProcessing = YES;
+    @weakify(self)
+    [self getCurrentPXKWithComplete:^(BOOL isSuccess, NSString *pxkm) {
+        @strongify(self)
+        if(pxkm.intValue==1){
+            NSString *pxkm = @"1";
+            NSArray* array = [DB_Helper quearyTrain:RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"" Subject:pxkm];
+            __block NSInteger trainTime = 0;
+            if (RQ_USER_MANAGER.isycbd == 1) {//是否活体
+                [array.rac_sequence.signal subscribeNext:^(TrainRecord *record) {
+                    trainTime = trainTime + record.trainTime.integerValue;
+                } completed:^{
+                    dispatch_async(dispatch_get_main_queue(), ^{
+                        if (trainTime >= 30) {//大于30分钟
+                            //删除-本地记录
+                            for (TrainRecord *record in array) {
+                                [DB_Helper deleteTrainRecord:record];
+                            }
+                            /// 1.本地活体检测
+                            [self signInHandledo:NULL];
+                        }else{
+                            /// 1.本地活体检测
+                            [self signInHandledo:NULL];
+                        }
+                    });
+                }];
+            }else{
+                //不需要活体-直接到签到
+                [array.rac_sequence.signal subscribeNext:^(TrainRecord *record) {
+                    trainTime = trainTime + record.trainTime.integerValue;
+                } completed:^{
+                    dispatch_async(dispatch_get_main_queue(), ^{
+                        if (trainTime >= 30) {//大于30分钟
+                            TrainRecord *lastRecord = [array lastObject];
+                            [self noFaceSignInHandledo:lastRecord];
+                        }else{
+                            [self noFaceSignInHandledo:NULL];
+                        }
+                    });
+                }];
+            }
+        }else{
+            ShowMsg(@"学员状态不是科一");
+        }
+    }];
+}
+
+
+
+//获取学员状态
+- (void)getCurrentPXKWithComplete:(void(^)(BOOL isSuccess,NSString *pxkm))complete {
+    if (![Util connectedToNetWork]) {
+        ShowMsg(@"请检查网络连接。");
+        RemoveHUD();
+        !complete? : complete(NO, nil);
+        return;
+    }
+    NSMutableArray *arr = [NSMutableArray array];
+    [arr property:RQ_USER_MANAGER.currentUser.outId forKey:@"stuOutId"];
+    [arr property:RQ_USER_MANAGER.currentUser.city  forKey:@"dqbh"];
+    
+    NSString* method = @"getStudentStatusByStuOutId";
+    [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+        if (!dict) {
+            ShowMsgFailed();
+            !complete? : complete(NO, nil);
+            return;
+        }
+        if ([dict[@"code"] isEqualToString:@"0"]) {
+            !complete? : complete(YES, dict[@"body"]);
+        } else {
+            ShowMsg(dict[@"body"]);
+            !complete? : complete(NO, nil);
+        }
+    }];
+}
+
+
+
+//签到-业务
+- (void)signInHandledo:(TrainRecord *)lastRecord{
+    @weakify(self)
+    //1.人脸
+    [RQ_CHECKBODY_MANAGER beginCheckBodyWithCheckNum:RQ_USER_MANAGER.ycbdFaceCount completeBlock:^(BOOL success, NSDictionary * _Nullable dic) {
+        if (success) {
+            @strongify(self)
+            /// 2.线上活体检测
+            [RQ_RemoteTheory_MANAGER edufaceTofaceWithPhotoStr:dic[@"normalImg"] loginFlagType:LoginFlagType_SignIn resultBlock:^(BOOL isSuccess) {
+                @strongify(self)
+                if (isSuccess) {
+                    /// 3.获取线上时间
+                    [RQ_RemoteTheory_MANAGER getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+                        @strongify(self)
+                        if (isSuccess) {
+                            NSDate *date = [NSDate rq_dateWithTimestamp:timeDict[@"body"]];
+                            
+                            NSInteger timeStamp = [RQ_SHARE_FUNCTION getTimeStampWithDate:date];
+                            NSString *timeStampStr = [NSString stringWithFormat:@"%@",[NSNumber numberWithInteger:timeStamp]];
+                            self.classIdStr = timeStampStr;
+                            if (self.classIdStr.length < 10) {
+                                /// 如果生成时间戳错误 用一个随机十位数代替
+                                self.classIdStr = [NSString stringWithFormat:@"%@",[NSNumber numberWithInteger:[NSString rq_randomNumberWithFrom:1647311377 to:9999999999]]];
+                            }
+                            
+                            /// 4.签到
+                            [RQ_RemoteTheory_MANAGER uploadEduSignInKHWithClassidStr:self.classIdStr resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signInDict) {
+                                if (isSuccess) {
+                                    @strongify(self)
+                                    NSString *timeStr = signInDict[@"body"];
+                                    if([signInDict[@"code"] isEqualToString:@"0"]){
+                                        /// 5.上传照片
+                                        [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignIn resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                            @strongify(self)
+                                            [self signInSuccessWithBeginTime:timeStr];
+                                        }];
+                                    }else if([signInDict[@"code"] isEqualToString:@"2"]){
+                                        [self signInSuccessWithBeginTime:timeStr];
+                                    }else{
+                                        self.isProcessing = NO;
+                                        ShowMsg(@"签到失败");
+                                    }
+                                }else{
+                                    self.isProcessing = NO;
+                                    ShowMsg(@"签到失败");
+                                }
+                            }];
+                        }
+                    }];
+                }else{
+                    self.isProcessing = NO;
+                    ShowMsg(@"人脸比对失败");
+                }
+            }];
+        }else{
+            self.isProcessing = NO;
+        }
+    }];
+    
+}
+//无活体
+- (void)noFaceSignInHandledo:(TrainRecord *)lastRecord{
+    @weakify(self)
+    /// 3.获取线上时间
+    [RQ_RemoteTheory_MANAGER getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+        @strongify(self)
+        if (isSuccess) {
+            NSDate *date = [NSDate rq_dateWithTimestamp:timeDict[@"body"]];
+            //                                                                NSDate *date = [NSDate rq_dateWithTimestamp:timeStr];
+            
+            NSInteger timeStamp = [RQ_SHARE_FUNCTION getTimeStampWithDate:date];
+            NSString *timeStampStr = [NSString stringWithFormat:@"%@",[NSNumber numberWithInteger:timeStamp]];
+            self.classIdStr = timeStampStr;
+            if (self.classIdStr.length < 10) {
+                /// 如果生成时间戳错误 用一个随机十位数代替
+                self.classIdStr = [NSString stringWithFormat:@"%@",[NSNumber numberWithInteger:[NSString rq_randomNumberWithFrom:1647311377 to:9999999999]]];
+            }
+            
+            NSInteger todayEndTimestamp = [RQ_SHARE_FUNCTION getTimeStampWithHour:23 andMinute:59 andDate:[NSDate rq_dateWithTimestamp:timeDict[@"body"]]];
+            BOOL isShow = (todayEndTimestamp - timeStamp) < 3 * RQ_D_HOUR;
+            /// 4.签到
+            [RQ_RemoteTheory_MANAGER uploadEduSignInKHWithClassidStr:self.classIdStr resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signInDict) {
+                if (isSuccess) {
+                    @strongify(self)
+                    NSString *timeStr = signInDict[@"body"];
+                    [self signInSuccessWithBeginTime:timeStr];
+                }
+            }];
+        }
+    }];
+}
+     
+//签退-业务
+- (void)signOutHandledo:(NSInteger)score {
+    // 检查是否正在处理,避免重复点击
+    if (self.isProcessing) {
+        ShowMsg(@"操作正在进行中,请稍候...");
+        return;
+    }
+    // 设置为正在处理状态
+    self.isProcessing = YES;
+    self.score = score;
+    @weakify(self)
+    [self stopTimingWithResultBlock:^(BOOL isSuccessed) {
+        self.isProcessing = NO;
+        NSLog(@"isSuccessed=%zd",isSuccessed);
+    }];
+}
+
+//过程拍照-业务
+- (void)coursePhotoHandledo{
+    @weakify(self)
+    [self.timer setFireDate:[NSDate distantFuture]];
+    SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];
+    alert.backgroundViewColor = backGroundColor;
+    alert.customViewColor = RQ_MAIN_COLOR;
+    [alert addButton:@"立即开始 " actionBlock:^(void) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            @strongify(self)
+            /// 1.本地活体检测
+            [RQ_CHECKBODY_MANAGER beginCheckBodyWithCheckNum:RQ_USER_MANAGER.ycbdFaceCount completeBlock:^(BOOL success, NSDictionary * _Nullable dic) {
+                @strongify(self)
+                if (success) {
+                    /// 2.线上活体检测
+                    [RQ_RemoteTheory_MANAGER edufaceTofaceWithPhotoStr:dic[@"normalImg"] loginFlagType:LoginFlagType_Process resultBlock:^(BOOL isSuccess) {
+                        @strongify(self)
+                        if (isSuccess) {
+                            [RQ_RemoteTheory_MANAGER  getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+                                @strongify(self)
+                                if (isSuccess) {
+                                    /// 3.1上传过程照片
+                                    NSString *timeStr = timeDict[@"body"];
+                                    [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_Process resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                        @strongify(self)
+                                        if (isSuccess) {
+                                            [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"过程验证成功" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"确定" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+                                                [MBProgressHUD rq_hideHUD];
+                                                @strongify(self)
+                                                [self.timer setFireDate:[NSDate distantPast]];
+                                            }];
+                                        } else {
+                                            self.seconds--;
+                                            [self.timer setFireDate:[NSDate distantPast]];
+                                        }
+                                    }];
+                                } else {
+                                    self.seconds--;
+                                    [self.timer setFireDate:[NSDate distantPast]];
+                                }
+                            }];
+                        } else {
+                            self.seconds--;
+                            [self.timer setFireDate:[NSDate distantPast]];
+                        }
+                    }];
+                } else {
+                    self.seconds--;
+                    [self.timer setFireDate:[NSDate distantPast]];
+                }
+            }];
+        });
+    }];
+    [alert addTimerToButtonIndex:0 reverse:YES];
+    [alert showNotice:@"温馨提示" subTitle:@"即将开始活体检测,请做好准备" closeButtonTitle:nil duration:5.0f];
+    
+}
+
+//远程理论签退成功
+- (void)signOutSuccessWithTrainArray:(NSArray *)trainArray signOutSuccess:(BOOL)signOutSuccess uploadImageSuccess:(BOOL)uploadImageSuccess  completion:(void (^)(void))completion {
+    self.isProcessing = NO;
+    for (TrainRecord *record in trainArray) {
+        [DB_Helper updateTrainState:record];
+    }
+    if (trainArray.count > 0) {
+        if (signOutSuccess) {
+            if (self.timer.isValid) {
+                [self.timer invalidate];
+            }
+            if (self.timer) {
+                self.timer = nil;
+            }
+        }
+        //通知-刷新分数结果
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"updateScoreView" object:nil];
+        if (signOutSuccess && uploadImageSuccess) {
+            [MBProgressHUD rq_hideHUD];
+            [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"签退成功!" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"确定" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:nil];
+        } else if (signOutSuccess && !uploadImageSuccess && completion) {
+            [MBProgressHUD rq_hideHUD];
+            [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"上传照片失败!" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"重新上传" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+                completion();
+            }];
+        }
+        
+        
+    }
+    [RQ_COMMON_MANAGER keepIdleTimerDisabledisOpen:NO];
+}
+
+
+//远程理论签到成功
+- (void)signInSuccessWithBeginTime:(NSString *)beginTime {
+    self.isProcessing = NO;
+    self.begin_Time = beginTime;
+    self.seconds = 0;
+    self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timeFireMethod) userInfo:nil repeats:YES];
+    
+    ShowMsgSuc();
+    
+    [RQ_COMMON_MANAGER keepIdleTimerDisabledisOpen:YES];
+    [MBProgressHUD hideHUDForView:[RQ_SHARE_FUNCTION topViewController].view animated:YES];
+    [MBProgressHUD rq_hideHUD];
+    //跳转-考试
+    [self beginExamBtnAction];
+}
+
+//时间-秒处理
+- (void)timeFireMethod {
+    self.seconds++;
+    if (self.seconds==60) { //过程拍照-1分钟
+        [self coursePhotoHandledo];
+    }
+    int remainder = (int)self.seconds%300;
+    if (remainder == 0) {
+        //每5分钟保存一次,温州每30分钟保存一次
+        [self saveTrain];
+    }
+}
+
+- (void)beginExamBtnAction {
+    NSArray *arr = [RQ_YDTQuestion_Module getQuestionWithExerciseType:RQExerciseType_Exam];
+    __block NSInteger num = 0;
+    arr = [arr.rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel  *ydtQuestionModel) {
+        ydtQuestionModel.num = num;
+        num ++;
+        return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
+    }].toArray;
+    [[RACScheduler mainThreadScheduler] schedule:^{
+//        RQ_Exercise_Module.currentExerciseType = RQExerciseType_Exam;
+        RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
+            RQHomePageCarTypeKey        : @(RQ_YDTQuestion_Module.carType),
+            RQHomePageSubjectTypeKey    : @(RQHomePageSubjectType_SubjectOne),
+            RQHomeSubPageTypeKey        : @(RQHomeSubPageType_MockExamination),
+            RQViewModelIDKey            : @"模拟考试",
+            RQExerciseTypeKey           : @(RQExerciseType_Exam),
+            RQViewModelUtilKey          : arr,
+            RQHomeSubPageTypeKHModeKey  : @(1)
+        }];
+        [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES];
+    }];
+}
+
+-(void)saveTrain {
+    if (!self.formatter) {
+        self.formatter = [NSDateFormatter rq_defaultDateFormatter];
+    }
+    TrainRecord *train = [[TrainRecord alloc]init];
+    
+    train.studentId = RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"";
+    train.beginTime = self.begin_Time;
+    
+    NSDate *date = [self.formatter dateFromString:self.begin_Time];
+    date = [date dateByAddingTimeInterval:self.seconds];
+    train.state = @"0";
+    train.endTime=[self.formatter stringFromDate:date];
+    NSInteger mins = self.seconds / 60;
+    train.trainTime = [NSString stringWithFormat:@"%d",(int)mins];
+    train.classid = (self.classIdStr && ![self.classIdStr isEqualToString:@""])? self.classIdStr : @"0";
+    [DB_Helper saveTrain:train];
+}
+
+- (NSString *)getTimes:(int)second {
+    if (!self.formatter) {
+        self.formatter=[[NSDateFormatter alloc]init];
+        [self.formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    }
+    
+    NSString *beginTimeStr = self.begin_Time;
+    [self.formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
+    NSDate *beginDate = [self.formatter dateFromString:beginTimeStr];
+    NSDate *newDate = [NSDate dateWithTimeInterval:second sinceDate:beginDate];
+    NSString *nowString = [self.formatter stringFromDate:newDate];
+    return nowString;
+}
+
+- (void)stopTimingWithResultBlock:(void (^)(BOOL isSuccessed))resultBlock {
+    @weakify(self)
+    [self.timer setFireDate:[NSDate distantFuture]];
+    [self saveTrain];
+
+    if (RQ_USER_MANAGER.isycbd == 1) {
+        /// 1.本地活体检测
+        [RQ_CHECKBODY_MANAGER beginCheckBodyWithCheckNum:RQ_USER_MANAGER.ycbdFaceCount completeBlock:^(BOOL success, NSDictionary * _Nullable dic) {
+            @strongify(self)
+            if (success) {
+                /// 2.线上活体检测
+                [RQ_RemoteTheory_MANAGER edufaceTofaceWithPhotoStr:dic[@"normalImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess) {
+                    @strongify(self)
+                    if (isSuccess) {
+                        [RQ_RemoteTheory_MANAGER getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+                            @strongify(self)
+                            if (isSuccess) {
+                                /// 4.签退
+                                NSString *pxkm = @"1";
+                                NSArray* array = [DB_Helper quearyTrain:RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"" Subject:pxkm];
+                                if (array.count < 1) {
+                                    !resultBlock? : resultBlock(YES);
+                                    ShowMsg(@"本地无学时明细!");
+                                    return;
+                                }
+                                [RQ_RemoteTheory_MANAGER uploadEduSignOutKHWithArray:array score:self.score resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signOutDict) {
+                                    @strongify(self)
+                                    if (isSuccess) {
+                                        !resultBlock? : resultBlock(YES);
+                                        [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:nil];
+                                        ///  4.1上传签退照片
+                                        NSString *timeStr = timeDict[@"body"];
+                                        
+                                        [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                            @strongify(self)
+                                            [MBProgressHUD rq_hideHUD];
+                                            if (isSuccess) {
+                                                NSLog(@"上传签退照片成功!");
+                                                [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:YES completion:nil];
+                                            } else {
+                                                NSLog(@"上传签退照片失败!");
+                                                [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:nil];
+                                            }
+                                        }];
+                                    } else {
+                                        !resultBlock? : resultBlock(NO);
+                                        [self.timer setFireDate:[NSDate distantPast]];
+                                    }
+                                }];
+                            } else {
+                                !resultBlock? : resultBlock(NO);
+                                [self.timer setFireDate:[NSDate distantPast]];
+                            }
+                        }];
+                    }
+                }];
+            } else {
+                !resultBlock? : resultBlock(NO);
+                [self.timer setFireDate:[NSDate distantPast]];
+            }
+        }];
+    } else {
+        !resultBlock? : resultBlock(YES);
+        
+        [self.timer setFireDate:[NSDate distantFuture]];
+        [self.timer invalidate];
+        self.timer = nil;
+  
+        [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"结束计时,是否上传学时?" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"暂不上传" otherButtonTitles:@[@"确定"] otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+//            @strongify(self)
+//            if (selectedOtherButtonIndex == 0) {
+//                [self upLoadTrainRecord];
+//            }else if (selectedOtherButtonIndex == NSNotFound){
+//                ShowMsg(@"学时已保存在本地");
+//            }
+        }];
+    }
+}
+
+@end

+ 40 - 17
jiaPei/Modules/TimeModule/ViewModel/itemViewModel/RQTimeSingleItemViewModel.m

@@ -14,6 +14,7 @@
 #import "NYGetjobTimeViewModel.h"
 #import "NYClassRoomViewModel.h"
 #import "NYTcarStudentLiveModel.h"
+#import "NYKaoMockExaminationModel.h"
 
 @interface RQTimeSingleItemViewModel () {
 //    PeriodVC                   *KVOPeriodVC;
@@ -30,6 +31,9 @@
 
 @property (nonatomic,strong) NYTcarStudentLiveModel *tcarStudentLiveModel;
 
+@property (nonatomic,strong) NYKaoMockExaminationModel *kaoMockExaminationModel;
+
+
 @end
 
 @implementation RQTimeSingleItemViewModel
@@ -43,7 +47,7 @@
                     @strongify(self)
                     if (isSuccess) {
                         if (activationModel.isShare) {
-                            if (activationModel.isActive == 1) {
+                            if (activationModel.isActive == 1||[RQ_COMMON_MANAGER.JSJP_SHARE_CITY rangeOfString:RQ_USER_MANAGER.currentUser.city].location != NSNotFound) {//2108 不判断
                                 [self gotoVCWithStr:self.title];
                             } else {
                                 [RQ_VIP_Module gotoVipViewWithDictType:RQ_USER_MANAGER.currentUser.city];
@@ -80,8 +84,8 @@
         [self gotoPeriod:3];
     } else if ([str isEqualToString:@"实车认证"]) {
         [self gotoTcarStudentLive];
-    } else {
-        
+    } else if ([str isEqualToString:@"科一考核"]) {
+        [self gotoKaoMockExamination];
     }
 }
 
@@ -149,14 +153,14 @@
     
     if(vc)[self navPushHideTabbarToVC:vc];
     
-//    PeriodVC *vc = nil;
-//    if (myDelegate.tPeriodVC) {
-//        vc = myDelegate.tPeriodVC;
-//    }else {
-//        KVOPeriodVC = [[PeriodVC alloc] init];
-//        vc = KVOPeriodVC;
-//    }
-//    [self navPushHideTabbarToVC:vc];
+    //    PeriodVC *vc = nil;
+    //    if (myDelegate.tPeriodVC) {
+    //        vc = myDelegate.tPeriodVC;
+    //    }else {
+    //        KVOPeriodVC = [[PeriodVC alloc] init];
+    //        vc = KVOPeriodVC;
+    //    }
+    //    [self navPushHideTabbarToVC:vc];
 }
 
 - (NYBasetjTimeVC *)getNYTheoryTimeVC{
@@ -219,10 +223,14 @@
 - (void)gotoTcarStudentLive{
     [self.tcarStudentLiveModel tcarStudentLivedo];
 }
+//科一考核
+- (void)gotoKaoMockExamination{
+    [self.kaoMockExaminationModel studentKaoMockExaminationdo];
+}
 
 - (void)gotoTrainInfo {
-//    //是否开启活体检测 0-不开启 1-开启 活体检测比对动作数量
-//    if (RQ_USER_MANAGER.isycbd == 1 && RQ_USER_MANAGER.ycbdFaceCount == 0) {
+    //    //是否开启活体检测 0-不开启 1-开启 活体检测比对动作数量
+    //    if (RQ_USER_MANAGER.isycbd == 1 && RQ_USER_MANAGER.ycbdFaceCount == 0) {
     //开头有35进入H5 -  修改登录下发匹配
     NSString *citystr = [RQ_USER_MANAGER getParamsKey:@"SP_QUERY_TRAIN_CLASS_DQBH"];
     if ([citystr rangeOfString:RQ_USER_MANAGER.currentUser.city].location != NSNotFound) {
@@ -275,7 +283,7 @@
         showMsgUnconnect();
         return;
     }
-
+    
     NSMutableArray *arr=[NSMutableArray array];
     [arr addPro:@"reserveId"            Value:[coachQRCodeDic[@"dataString"] componentsSeparatedByString:@";"][3]];
     [arr addPro:@"userId"               Value:RQ_USER_MANAGER.currentUser._id];
@@ -284,11 +292,11 @@
     [arr addPro:@"sim"                  Value:RQ_USER_MANAGER.currentUser.telphone];
     [arr addPro:@"stuOutId"              Value:RQ_USER_MANAGER.currentUser.outId];
     [arr addPro:@"coachOutId"              Value:[coachQRCodeDic[@"dataString"] componentsSeparatedByString:@";"][0]];
-
+    
     NSString* method = @"uploadReserveOrder";
     [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary * root) {
         RemoveHUD();
-
+        
         if (!root) {
             ShowMsg(@"开始计时失败,请重试!");
             [Tools playAudioWithString:@"开始计时失败,请崇试!"];
@@ -299,7 +307,7 @@
             [Tools playAudioWithString:root[@"body"]];
             return;
         }
-
+        
         orderId = [root[@"body"] objectForKey:@"id"];
         subject = [root[@"body"] objectForKey:@"subject"];
         ShowMsg(@"签到成功!");
@@ -347,4 +355,19 @@
     }
     return _tcarStudentLiveModel;
 }
+
+- (NYKaoMockExaminationModel *)kaoMockExaminationModel{
+    if(!_kaoMockExaminationModel){
+        _kaoMockExaminationModel = [NYKaoMockExaminationModel new];
+        //注册-通知
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(examinationPostNotif:) name:RQHomeSubPageTypeKHModeKey object:nil];
+    }
+    return _kaoMockExaminationModel;
+}
+
+- (void)examinationPostNotif: (NSNotification *)notification {
+    int score = [notification.object intValue];
+    [self.kaoMockExaminationModel signOutHandledo:score];
+}
+
 @end

+ 4 - 1
jiaPei/NewTheory/NYBasetjTimeVC.h

@@ -7,7 +7,8 @@
 //
 
 #import "RQCommonCollectionViewController.h"
-
+#import <CoreTelephony/CTCallCenter.h>
+#import <CoreTelephony/CTCall.h>
 NS_ASSUME_NONNULL_BEGIN
 
 typedef NS_ENUM(NSUInteger, TimeVCType) {
@@ -17,6 +18,8 @@ typedef NS_ENUM(NSUInteger, TimeVCType) {
 
 @interface NYBasetjTimeVC : RQCommonCollectionViewController
 
+@property (nonatomic, strong) CTCallCenter *callCenter;
+
 @property (nonatomic, copy) NSString *secondString;
 //vc理论类型
 @property (nonatomic, assign) TimeVCType vcType;

+ 39 - 0
jiaPei/NewTheory/NYBasetjTimeVC.m

@@ -36,6 +36,12 @@ typedef enum {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     [self.navigationItem setLeftBarButtonItems:@[[UIBarButtonItem rq_backItemWithTitle:@"" imageName:@"back_white" target:self action:@selector(rq_back)]]];
+    // 初始化 CTCallCenter 并设置监听
+    self.callCenter = [[CTCallCenter alloc] init];
+    __weak typeof(self) weakSelf = self;
+    self.callCenter.callEventHandler = ^(CTCall *call) {
+        [weakSelf phoneCallForHandler:call.callState];
+    };
 
 }
 
@@ -540,6 +546,39 @@ typedef enum {
     self.timeLabel.text = [NSString stringWithFormat:@"0%d:%@:%@",hour,min_s,second_s];
 }
 
+//call电话 - 进来处理
+- (void)phoneCallForHandler:(NSString *)callState{
+    // 电话状态发生变化
+    if ([callState isEqualToString:CTCallStateDialing]) {
+        NSLog(@"拨号中");
+        [self calllongTimeHandler];
+    } else if ([callState isEqualToString:CTCallStateConnected]) {
+        NSLog(@"已接通-不处理");
+    } else if ([callState isEqualToString:CTCallStateDisconnected]) {
+        NSLog(@"已挂断-不处理");
+    } else if ([callState isEqualToString:CTCallStateIncoming]) {
+        NSLog(@"来电中");
+        [self calllongTimeHandler];
+    }
+}
+//超过15分钟-提示暂停-签退
+- (void)calllongTimeHandler{
+    @weakify(self)
+    if(self.seconds>=900){
+        [self.timer setFireDate:[NSDate distantFuture]];
+        //暂停计时
+        [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"为了您的学时有效性,请优先选择签退" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"签退" otherButtonTitles:@[@"取消"] otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+            NSLog(@"%zd",selectedOtherButtonIndex);
+            if(selectedOtherButtonIndex==0){//取消
+                [self.timer setFireDate:[NSDate distantPast]];//恢复计时
+            }else{//签退
+                //走-签退-结束计时流程
+                @strongify(self)
+                [self btnClick:self.on_offBtn];
+            }
+        }];
+    }
+}
 //2.4 辽宁-特殊判断 - 拍照上传-超时处理
 - (void)lnShowTimeHandler {
     @weakify(self)

+ 4 - 0
jiaPei/OLD/Util/RQRemoteTheoryManager/RQRemoteTheoryManager.h

@@ -46,7 +46,11 @@ typedef NS_ENUM(NSInteger, LoginFlagType) {
 //远程理论签退
 - (void)uploadEduSignOutWithArray:(NSArray *)trainArray resultBlock:(void (^)(BOOL isSuccess, NSDictionary *signOutDict))resultBlock;
 
+//广西远程理论签到
+- (void)uploadEduSignInKHWithClassidStr:(NSString *)classidStr resultBlock:(void (^)(BOOL isSuccess, NSDictionary *signInDict))resultBlock;
 
+//广西远程理论签退
+- (void)uploadEduSignOutKHWithArray:(NSArray *)trainArray score:(NSInteger)score resultBlock:(void (^)(BOOL isSuccess, NSDictionary *signOutDict))resultBlock;
 @end
 
 NS_ASSUME_NONNULL_END

+ 77 - 0
jiaPei/OLD/Util/RQRemoteTheoryManager/RQRemoteTheoryManager.m

@@ -54,6 +54,34 @@ static dispatch_once_t onceToken;
     }];
 }
 
+ 
+- (void)uploadEduSignInKHWithClassidStr:(NSString *)classidStr resultBlock:(void (^)(BOOL isSuccess, NSDictionary *signInDict))resultBlock {
+    [self showHud];
+//http://121.46.4.11:18081/student/?sign=27D87F97E87A45CEFC38EC26661FF867&user=android&v=jsjp&ts=1723532027030
+    NSMutableArray *arr = [NSMutableArray array];
+    [arr property:RQ_USER_MANAGER.currentUser.outId forKey:@"outId"];
+    [arr property:RQ_USER_MANAGER.currentUser.city  forKey:@"dqbh"];
+    [arr property:classidStr forKey:@"classid"];
+    
+    NSString* method = @"uploadEduSignInKh";
+    [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+        [self hideHud];
+        
+        if (!dict) {
+            ShowMsg(@"签到接口异常!");
+            !resultBlock? : resultBlock(NO, nil);
+            return;
+        }
+        NSLog(@"dict=======%@",dict);
+        if ([dict[@"code"] isEqualToString:@"0"]||[dict[@"code"] isEqualToString:@"2"]) {//code = 2.  已经签到. 0未签到
+            !resultBlock? : resultBlock(YES, dict);
+        } else {
+            ShowMsg((dict[@"body"] && ![dict[@"body"] isEqualToString:@""])? dict[@"body"] : @"签到失败");
+            !resultBlock? : resultBlock(NO, nil);
+        }
+    }];
+}
+
 #pragma mark - 远程理论上传照片
 - (void)uploadEduPicWithClassidStr:(NSString *)classidStr timeStr:(NSString *)timeStr actionPhotoStr:(NSString *)actionPhotoStr loginFlagType:(LoginFlagType)loginFlagType  resultBlock:(void (^)(BOOL isSuccess,  NSDictionary *uploadEduPicDict))resultBlock  {
     NSString *uploadPhotoStr = actionPhotoStr;
@@ -152,6 +180,55 @@ static dispatch_once_t onceToken;
     }];
 }
 
+- (void)uploadEduSignOutKHWithArray:(NSArray *)trainArray score:(NSInteger)score resultBlock:(void (^)(BOOL isSuccess, NSDictionary *signOutDict))resultBlock {
+    
+    __block NSString *str = @"";
+    __block NSInteger trainTime = 0;
+//http://121.46.4.11:18081/student/uploadEduSignOutKh?sign=AE7BF732436CD2C072E25CC5F6C42F47&user=android&v=jsjp&ts=1723702578104
+    __block NSString *beginTime = @"";
+    __block NSString *endTime = @"";
+    [trainArray.rac_sequence.signal subscribeNext:^(TrainRecord *record) {
+        trainTime = trainTime + record.trainTime.integerValue;
+        if(record.endTime.length>0){
+            beginTime = record.beginTime;
+            endTime = record.endTime;
+        }
+    } completed:^{
+        TrainRecord *firstRecord = trainArray.firstObject;
+        TrainRecord *lastRecord = trainArray.lastObject;
+        str = (trainArray.count == 0)? @"" : [NSString stringWithFormat:@"%@,%@,%@,%@,%@,%zd",firstRecord.studentId,beginTime,endTime,[NSNumber numberWithInteger:trainTime],lastRecord.classid,score];
+        TrainRecord *record = [trainArray firstObject];
+        if (([record.subject isEqualToString:@"2"] || [record.subject isEqualToString:@"3"])) {
+            record.subject = @"4";
+        }
+        NSMutableArray *arr = [NSMutableArray array];
+        [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"ios",@"trainType", nil]];
+        [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:RQ_USER_MANAGER.currentUser.outId,@"stuId", nil]];
+        [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:RQ_USER_MANAGER.currentUser.city,@"dqbh", nil]];
+        [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:[DES3Util encrypt:str ],@"trainRecord", nil]];
+        [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:record.subject,@"pxkm", nil]];
+
+        NSString* method = @"uploadEduSignOutKh";
+        
+        [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+            [self hideHud];
+            if (!dict) {
+                ShowMsg(@"签退接口异常!");
+                !resultBlock? : resultBlock(NO, nil);
+                return;
+            }
+            
+            if ([dict[@"code"] isEqualToString:@"0"]) {
+                !resultBlock? : resultBlock(YES, dict);
+            } else {
+                ShowMsg((dict[@"body"] && ![dict[@"body"] isEqualToString:@""])? dict[@"body"] : @"签退失败");
+                !resultBlock? : resultBlock(NO, nil);
+            }
+        }];
+        [self hideHud];
+    }];
+}
+
 #pragma mark - 获取当前学员签到状态
 - (void)getTheoryStatusWithResultBlock:(void(^)(BOOL isSucccess, NSDictionary *statusDict))resultBlock {
     

+ 7 - 7
jiaPei/OLD/Util/RQShareFunction.m

@@ -899,13 +899,13 @@ static dispatch_once_t onceToken;
 
 // 前往小程序
 - (void)miniwithUserName:(NSString *)userName path:(NSString *)path {
-//    WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
-//    launchMiniProgramReq.userName = userName;  ////拉起的小程序的username
-//    launchMiniProgramReq.path = path;    ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
-//    launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease; ///拉起小程序的类型
-//    return [WXApi sendReq:launchMiniProgramReq completion:^(BOOL success) {
-//        
-//    }];
+    WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
+    launchMiniProgramReq.userName = userName;  ////拉起的小程序的username
+    launchMiniProgramReq.path = path;    ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
+    launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease; ///拉起小程序的类型
+    return [WXApi sendReq:launchMiniProgramReq completion:^(BOOL success) {
+        
+    }];
 }
 
 - (UIWindow *)getKeyWindow {

+ 2 - 2
jiaPei/PrefixHeader.pch

@@ -50,8 +50,8 @@
 #import <SDWebImage/UIImageView+WebCache.h>
 #import <MJRefresh/MJRefresh.h>
 #import "SGQRCode.h"
-//#import <WXApi.h>
-//#import <WXApiObject.h>
+#import <WXApi.h>
+#import <WXApiObject.h>
 #import <HWPanModal/HWPanModal.h>
 #import "SDCycleScrollView.h"
 #import "DOUAudioStreamer.h"

+ 6 - 0
jiaPei/Utils/Manager/CommonManager/RQCommonManager.h

@@ -42,7 +42,12 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, readwrite, assign) BOOL JSJP_DOMIAN_NAME_IS_OLD;
 
 @property (nonatomic, readwrite, assign) NSInteger JSJP_iOS_PT;
+///  用来判断2108
+@property (nonatomic, readwrite, copy) NSString *JSJP_SHARE_CITY;
 
+@property (nonatomic, readwrite, copy) NSString *JSJP_XCX_NAME;
+
+@property (nonatomic, readwrite, copy) NSString *JSJP_XCX_PAGE;
 /**广告的图片地址。每次finishLaunch里面。会异步更新这个属性。
  为什么要持久保存呢?是为了第一次加载广告时可以避免等待。
  */
@@ -72,6 +77,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, readwrite, assign) NSInteger myCollectFourCount;
 @property (nonatomic, readwrite, assign) NSInteger myExamOneCount;
 @property (nonatomic, readwrite, assign) NSInteger myExamFourCount;
+//考场城市-配置显示
 @property (nonatomic, readwrite, copy) NSArray *JSJP_APP_KAOCHANG_OPEN_ARR;
 /// 是否已观看泉州视频
 @property (nonatomic, readwrite, assign) BOOL isQzLook;

+ 44 - 0
jiaPei/Utils/Manager/CommonManager/RQCommonManager.m

@@ -271,6 +271,50 @@
     [self saveObjectWithObject:JSJP_APP_PTSC_FBL ForKey:@"JSJP_APP_PTSC_FBL"];
 }
 
+
+- (NSString *)JSJP_SHARE_CITY {
+    id object = [self getObjectWithKey:@"JSJP_SHARE_CITY"];
+    if (RQObjectIsNil(object)) {
+        return @"";
+    } else {
+        NSString *JSJP_SHARE_CITY = (NSString *)object;
+        return JSJP_SHARE_CITY;
+    }
+}
+
+- (void)setJSJP_XCX_NAME:(NSString *)JSJP_XCX_NAME {
+    [self saveObjectWithObject:JSJP_XCX_NAME ForKey:@"JSJP_XCX_NAME"];
+}
+
+- (NSString *)JSJP_XCX_NAME {
+    id object = [self getObjectWithKey:@"JSJP_XCX_NAME"];
+    if (RQObjectIsNil(object)) {
+        return @"";
+    } else {
+        NSString *JSJP_XCX_NAME = (NSString *)object;
+        return JSJP_XCX_NAME;
+    }
+}
+
+- (void)setJSJP_XCX_PAGE:(NSString *)JSJP_XCX_PAGE {
+    [self saveObjectWithObject:JSJP_XCX_PAGE ForKey:@"JSJP_XCX_PAGE"];
+}
+
+- (NSString *)JSJP_XCX_PAGE {
+    id object = [self getObjectWithKey:@"JSJP_XCX_PAGE"];
+    if (RQObjectIsNil(object)) {
+        return @"";
+    } else {
+        NSString *JSJP_XCX_PAGE = (NSString *)object;
+        return JSJP_XCX_PAGE;
+    }
+}
+
+
+- (void)setJSJP_SHARE_CITY:(NSString *)JSJP_SHARE_CITY {
+    [self saveObjectWithObject:JSJP_SHARE_CITY ForKey:@"JSJP_SHARE_CITY"];
+}
+
 - (BOOL)JSJP_DOMIAN_NAME_IS_OLD {
     id object = [RQ_SHARE_FUNCTION getObjectWithKey:@"JSJP_DOMIAN_NAME_IS_OLD"];
     if (RQObjectIsNil(object)) {

+ 6 - 0
jiaPei/Utils/Manager/UserManager/RQUserManager.m

@@ -208,6 +208,12 @@ static id rq_userManager = nil;
                 RQ_COMMON_MANAGER.JSJP_APP_AD_CYCLE = [dictInfoModel.dictValue integerValue];
             }else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_iOS_PT"]) {
                 RQ_COMMON_MANAGER.JSJP_iOS_PT = [dictInfoModel.dictValue integerValue];
+            }else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_SHARE_CITY"]) {
+                RQ_COMMON_MANAGER.JSJP_SHARE_CITY = dictInfoModel.dictValue;
+            }else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_XCX_NAME"]) {
+                RQ_COMMON_MANAGER.JSJP_XCX_NAME = dictInfoModel.dictValue;
+            }else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_XCX_PAGE"]) {
+                RQ_COMMON_MANAGER.JSJP_XCX_PAGE = dictInfoModel.dictValue;
             } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_Is_Online_Media_Image"]) {
                 RQ_COMMON_MANAGER.JSJP_Is_Online_Media_Image = [dictInfoModel.dictValue boolValue];
             } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_Is_Online_Media_Video"]) {

+ 3 - 3
jiaPei/Utils/Manager/WechatManager/RQWechatManager.h

@@ -7,7 +7,7 @@
 //
 
 #import <Foundation/Foundation.h>
-//#import <WXApi.h>
+#import <WXApi.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -18,16 +18,16 @@ FOUNDATION_EXTERN NSString * const RQUserNotificationOrWechatSuccess;
 /// 成功通知
 FOUNDATION_EXTERN NSString * const RQUserNotificationOrWechatFail;
 
-@interface RQWechatManager : NSObject //<WXApiDelegate>
+@interface RQWechatManager : NSObject <WXApiDelegate>
 @singleton(RQWechatManager);
 @property (nonatomic, readonly, strong) NSString *appID;
 @property (nonatomic, readonly, strong) NSString *appSecret;
 @property (nonatomic, readonly, strong) NSString *universalLink;
+- (BOOL)kplchihandleLrvm:(NSString *)str;
 /// 初始化
 - (void)initWechatManager;
 /// 调起微信登录
 - (void)wechatLogin;
-- (BOOL)kplchihandleLrvm:(NSString *)str;
 + (BOOL)handleOpenUrl:(NSURL *)url;
 
 //+ (void)hangleWechatPayWith:(PayReq *)req;

+ 79 - 72
jiaPei/Utils/Manager/WechatManager/RQWechatManager.m

@@ -23,7 +23,7 @@ NSString * const RQUserNotificationOrWechatFail = @"RQUserNotificationOrWechatFa
 
 #pragma mark - PublicMethods
 + (BOOL)handleOpenUrl:(NSURL *)url {
-    return  YES;//[WXApi handleOpenURL:url delegate:[RQWechatManager sharedInstance]];
+    return [WXApi handleOpenURL:url delegate:[RQWechatManager sharedInstance]];
 }
 
 //+ (void)hangleWechatPayWith:(PayReq *)req {
@@ -51,27 +51,27 @@ NSString * const RQUserNotificationOrWechatFail = @"RQUserNotificationOrWechatFa
 /// 初始化微信SDK
 - (void)initWechatManager {
     dispatch_async_on_main_queue(^{
-        BOOL isSuccess = YES; // [WXApi registerApp:self.appID universalLink:self.universalLink];
+        BOOL isSuccess = [WXApi registerApp:self.appID universalLink:self.universalLink];
         NSLog(@"%@",isSuccess? @"微信初始化成功" : @"微信初始化失败");
     });
 }
 
 /// 调起微信登录
 - (void)wechatLogin {
-//    /// 第三方向微信终端发送一个SendAuthReq消息结构
-//    SendAuthReq *req = [[SendAuthReq alloc] init];
-//    /// 用于保持请求和回调的状态,授权请求或原样带回
-//    req.state = @"wx_oauth_authorization_state";
-//    /// 授权作用域:获取用户个人信息
-//    req.scope = @"snsapi_userinfo";
-//    /// 唤起微信
-//    [WXApi sendReq:req completion:^(BOOL success) {
-//        if (success) {
-//            NSLog(@"唤起成功");
-//        }else {
-//            NSLog(@"唤起失败");
-//        }
-//    }];
+    /// 第三方向微信终端发送一个SendAuthReq消息结构
+    SendAuthReq *req = [[SendAuthReq alloc] init];
+    /// 用于保持请求和回调的状态,授权请求或原样带回
+    req.state = @"wx_oauth_authorization_state";
+    /// 授权作用域:获取用户个人信息
+    req.scope = @"snsapi_userinfo";
+    /// 唤起微信
+    [WXApi sendReq:req completion:^(BOOL success) {
+        if (success) {
+            NSLog(@"唤起成功");
+        }else {
+            NSLog(@"唤起失败");
+        }
+    }];
 }
 
 #pragma mark - PrivateMethods
@@ -89,65 +89,72 @@ NSString * const RQUserNotificationOrWechatFail = @"RQUserNotificationOrWechatFa
  WXErrCodeUnsupport  = -5,   < 微信不支持
  };
  */
-//- (void)onResp:(BaseResp *)resp {
-//    if([resp isKindOfClass:[PayResp class]]) {
-//        switch (resp.errCode) {
-//            case WXSuccess: {
-//                NSLog(@"微信回调成功");
-//                if ([resp isKindOfClass:[PayResp class]]) {
-//                    PayResp *payResp = (PayResp*)resp;
-//                    [RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {
-//                        
-//                    }];
-//                    [RQ_VIP_Module isActiveWithCcomplete:^(RQActivationModel * _Nullable activationModel, BOOL isSuccess) {}];
-//                    [[NSNotificationCenter defaultCenter] postNotificationName:RQUserNotificationOrWechatSuccess object:payResp userInfo:nil];
-//                }
-//                /// 微信登录授权回调
-//                if ([resp isKindOfClass:[SendAuthResp class]]) {
-//                    SendAuthResp *sendAuthResp = (SendAuthResp *)resp;
-//                    [RQNotificationCenter postNotificationName:RQWeChatOnRespNotification object:sendAuthResp.code];
-//                }
-//                break;
-//            }
-//            case WXErrCodeCommon: {
-//                NSLog(@"微信回调异常");
-//                break;
-//            }
-//            case WXErrCodeUserCancel: {
-//                NSLog(@"微信回调用户取消");
-//                break;
-//            }
-//            case WXErrCodeSentFail: {
-//                NSLog(@"微信回调发送信息失败");
-//                break;
-//            }
-//            case WXErrCodeAuthDeny: {
-//                NSLog(@"微信回调授权失败");
-//                break;
-//            }
-//            case WXErrCodeUnsupport: {
-//                NSLog(@"微信回调微信版本暂不支持");
-//                break;
-//            }
-//            default: {
-//                break;
-//            }
-//        }
-//    }
-//    
-//    if ([resp isKindOfClass:[WXLaunchMiniProgramResp class]]) {
-//        // 对应JsApi navigateBackApplication中的extraData字段数据
-//        // NSString *string = resp.extMsg;
-//    }
-//}
-//
-//- (void)onReq:(BaseReq*)req {
-//    
-//}
+- (void)onResp:(BaseResp *)resp {
+    if([resp isKindOfClass:[PayResp class]]) {
+        switch (resp.errCode) {
+            case WXSuccess: {
+                NSLog(@"微信回调成功");
+                if ([resp isKindOfClass:[PayResp class]]) {
+                    PayResp *payResp = (PayResp*)resp;
+                    [RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {
+                        
+                    }];
+                    [RQ_VIP_Module isActiveWithCcomplete:^(RQActivationModel * _Nullable activationModel, BOOL isSuccess) {}];
+                    [[NSNotificationCenter defaultCenter] postNotificationName:RQUserNotificationOrWechatSuccess object:payResp userInfo:nil];
+                }
+                /// 微信登录授权回调
+                if ([resp isKindOfClass:[SendAuthResp class]]) {
+                    SendAuthResp *sendAuthResp = (SendAuthResp *)resp;
+                    [RQNotificationCenter postNotificationName:RQWeChatOnRespNotification object:sendAuthResp.code];
+                }
+                break;
+            }
+            case WXErrCodeCommon: {
+                NSLog(@"微信回调异常");
+                break;
+            }
+            case WXErrCodeUserCancel: {
+                NSLog(@"微信回调用户取消");
+                break;
+            }
+            case WXErrCodeSentFail: {
+                NSLog(@"微信回调发送信息失败");
+                break;
+            }
+            case WXErrCodeAuthDeny: {
+                NSLog(@"微信回调授权失败");
+                break;
+            }
+            case WXErrCodeUnsupport: {
+                NSLog(@"微信回调微信版本暂不支持");
+                break;
+            }
+            default: {
+                break;
+            }
+        }
+    }
+    
+    if ([resp isKindOfClass:[WXLaunchMiniProgramResp class]]) {
+        // 对应JsApi navigateBackApplication中的extraData字段数据
+        // NSString *string = resp.extMsg;
+    }
+}
 
--(BOOL)kplchihandleLrvm:(NSString *)str{
+- (void)onReq:(BaseReq*)req {
     
+}
+
+-(BOOL)kplchihandleLrvm:(NSString *)str{
+    NSURLComponents *urlComponents = [NSURLComponents componentsWithString:str];
     int errCode = 0;
+    for (NSURLQueryItem *item in urlComponents.queryItems) {
+        if ([item.name isEqualToString:@"ret"]) {
+            errCode = [item.value intValue];
+            break;
+        }
+    }
+    
     switch (errCode) {
         case 0: {
             [RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov