浏览代码

vip 审核 5.1.1 增加游客登录选项框 up

openlockPPP 1 年之前
父节点
当前提交
d3118ac2c8

+ 4 - 4
jiaPei.xcodeproj/project.pbxproj

@@ -11726,7 +11726,7 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_RESOURCE_RULES_PATH[sdk=*]" = "";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2112023102301;
+				CURRENT_PROJECT_VERSION = 2102023102301;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;
@@ -11763,7 +11763,7 @@
 					"$(PROJECT_DIR)/jiaPei/Vendor/BaiDuFaceSDK/BDFaceSDK/lib",
 					"$(PROJECT_DIR)/jiaPei/Vendor/QiNiu_IMSDK/Vendors/Voice",
 				);
-				MARKETING_VERSION = 2.1.1;
+				MARKETING_VERSION = 2.1.0;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_CFLAGS = (
 					"$(inherited)",
@@ -11808,7 +11808,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2112023102301;
+				CURRENT_PROJECT_VERSION = 2102023102301;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;
@@ -11845,7 +11845,7 @@
 					"$(PROJECT_DIR)/jiaPei/Vendor/BaiDuFaceSDK/BDFaceSDK/lib",
 					"$(PROJECT_DIR)/jiaPei/Vendor/QiNiu_IMSDK/Vendors/Voice",
 				);
-				MARKETING_VERSION = 2.1.1;
+				MARKETING_VERSION = 2.1.0;
 				ONLY_ACTIVE_ARCH = NO;
 				OTHER_CFLAGS = (
 					"$(inherited)",

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


+ 4 - 0
jiaPei/AppDelegate.m

@@ -67,6 +67,10 @@
 //    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;
 }
 

+ 2 - 1
jiaPei/Modules/HomePageModule/View/HomePage/RQHomePageSubjectModuleCell.m

@@ -30,7 +30,8 @@
 
 - (void)bindViewModel:(RQHomePageSubjectModuleItemViewModel *)viewModel {
     _viewModel = viewModel;
-    _subjectThreeView.hidden = NO; // RQ_COMMON_MANAGER.APP_SWITCH;
+//    _subjectThreeView.hidden = RQ_COMMON_MANAGER.APP_SWITCH;
+    _subjectThreeView.hidden = NO;
     [_subjectThreeView setTapActionWithBlock:^(UITapGestureRecognizer *tap) {
         [RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {
             if (RQ_VIP_Module.isVip) {

+ 15 - 13
jiaPei/Modules/HomePageModule/View/HomePage/RQHomeSubPageVideoCell.m

@@ -35,19 +35,21 @@
     [_videoImageView yy_setImageWithURL:[NSURL URLWithString:viewModel.videosItem.coverFileUrl] placeholder:RQWebVideoImagePlaceholder()];
     _videoDurationLabel.text = [NSString getMMSSFromSS:viewModel.videosItem.videoDuration];
     _myTtitleLabel.text = viewModel.videosItem.title;
-    [[RACSignal combineLatest:@[RACObserve(RQ_VIP_Module, isSubject2Vip), RACObserve(RQ_VIP_Module, isSubject3Vip)] reduce:^id (NSNumber *isSubjectTwoVip, NSNumber *isSubjectThreeVip) {
-        if ((viewModel.videosItem.subject == 1 && RQ_VIP_Module.isSubject2Vip) || (viewModel.videosItem.subject == 2 && RQ_VIP_Module.isSubject3Vip)) {
-            self.videoPermissionStateModel.tryLookShow = NO;
-            self.videoPermissionStateModel.vipShow = NO;
-        } else {
-            self.videoPermissionStateModel.tryLookShow = (viewModel.videosItem.permission == 1);
-            self.videoPermissionStateModel.vipShow = (viewModel.videosItem.permission == 2);
-        }
-        return self.videoPermissionStateModel;
-    }] subscribeNext:^(RQVideoPermissionStateModel *videoPermissionStateModel) {
-        _tryLookBtn.hidden = !videoPermissionStateModel.tryLookShow;
-        _vipBtn.hidden = !videoPermissionStateModel.vipShow;
-    }];
+//    if (!RQ_COMMON_MANAGER.APP_SWITCH) {
+        [[RACSignal combineLatest:@[RACObserve(RQ_VIP_Module, isSubject2Vip), RACObserve(RQ_VIP_Module, isSubject3Vip)] reduce:^id (NSNumber *isSubjectTwoVip, NSNumber *isSubjectThreeVip) {
+            if ((viewModel.videosItem.subject == 1 && RQ_VIP_Module.isSubject2Vip) || (viewModel.videosItem.subject == 2 && RQ_VIP_Module.isSubject3Vip)) {
+                self.videoPermissionStateModel.tryLookShow = NO;
+                self.videoPermissionStateModel.vipShow = NO;
+            } else {
+                self.videoPermissionStateModel.tryLookShow = (viewModel.videosItem.permission == 1);
+                self.videoPermissionStateModel.vipShow = (viewModel.videosItem.permission == 2);
+            }
+            return self.videoPermissionStateModel;
+        }] subscribeNext:^(RQVideoPermissionStateModel *videoPermissionStateModel) {
+            _tryLookBtn.hidden = !videoPermissionStateModel.tryLookShow;
+            _vipBtn.hidden = !videoPermissionStateModel.vipShow;
+        }];
+//    }
 }
 
 #pragma mark - SystemMethods

+ 1 - 1
jiaPei/Modules/HomePageModule/View/HomePage/考场视频/RQTeachSchoolVideoCell.m

@@ -44,7 +44,7 @@
     CGFloat btnHeight = btnWidth * (32.f / 134.f);
     CGFloat downImageViewWidth = (RQ_SCREEN_WIDTH - 32.f) * (18.f / 345.f);
     CGFloat space = 10.f;
-
+    self.goBtn.hidden = RQ_COMMON_MANAGER.APP_SWITCH;
     [[[self.btnArr.rac_sequence.signal deliverOnMainThread] takeUntil:self.rac_prepareForReuseSignal] subscribeNext:^(NSString *btnTitleStr) {
         @strongify(self)
         NSInteger index = [self.btnArr indexOfObject:btnTitleStr];

+ 14 - 0
jiaPei/Modules/HomePageModule/ViewModel/HomePage/RQHomePageSubjectOneOrFourViewModel.m

@@ -101,8 +101,15 @@
             return (self.homePageSubjectType == RQHomePageSubjectType_SubjectTwo)? (RQArrayIsEmpty(dspListModelArr)? @[self.group, self.group12123] : @[self.group, self.group12123, group4]) : ((self.homePageSubjectType == RQHomePageSubjectType_SubjectThree)? (RQArrayIsEmpty(dspListModelArr)? @[self.group, self.groupKaoChang, self.groupSubject3Module, self.groupDriveMethods, self.group12123] : @[self.group, self.groupKaoChang, self.groupSubject3Module, self.groupDriveMethods, self.group12123, group4]) : @[self.group, self.group0, self.group1, self.group2]);
         } else {
             if (self.homePageSubjectType == RQHomePageSubjectType_SubjectTwo) {
+//                if (RQ_COMMON_MANAGER.APP_SWITCH && !RQ_VIP_Module.isSubject2Vip) {
+//                    self.group0.itemViewModels = @[];
+//                    group3.itemViewModels = @[];
+//                }
                 return RQArrayIsEmpty(group3.itemViewModels)? (RQArrayIsEmpty(group4.itemViewModels)? @[self.group, self.group0, self.group12123] : @[self.group, self.group0, self.group12123, group4]) : (RQArrayIsEmpty(group4.itemViewModels)? @[self.group, self.group0, self.group12123, group3] : @[self.group, self.group0, self.group12123, group3, group4]);
             } else if (self.homePageSubjectType == RQHomePageSubjectType_SubjectThree) {
+//                if (RQ_COMMON_MANAGER.APP_SWITCH && !RQ_VIP_Module.isSubject3Vip) {
+//                    self.group0.itemViewModels = @[];
+//                }
                 return RQArrayIsEmpty(group4.itemViewModels)? @[self.group, self.groupKaoChang, self.groupSubject3Module, self.group0, self.groupDriveMethods, self.group12123] : @[self.group, self.groupKaoChang, self.groupSubject3Module, self.group0, self.groupDriveMethods, self.group12123, group4];
             } else {
                 return [RQ_YDTQuestion_Module.isZhiGeZheng isEqualToString:@"YES"]? @[self.group, self.group0, self.group1, self.group12123] : ( RQArrayIsEmpty(group3.itemViewModels)? @[self.group, self.group0, self.group1, self.group2] : @[self.group, self.group0, self.group1, self.group2, group3]);
@@ -409,6 +416,13 @@
         [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"错题收藏" iconImgStr:@"错题收藏"],
     ] :
     (
+//     RQ_COMMON_MANAGER.APP_SWITCH? @[
+//        [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"精选500题" iconImgStr:@"精选500题"],
+//        [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"新规秘卷" iconImgStr:@"新规秘卷"],
+//        [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"专项练习" iconImgStr:@"专项练习"],
+//        [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"真实考场" iconImgStr:@"真实考场"],
+//        [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"错题收藏" iconImgStr:@"错题收藏"],
+//    ] :
      @[
         [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"VIP课程" iconImgStr:(self.homePageSubjectType == RQHomePageSubjectType_SubjectOne)? @"科一VIP" : @"科四VIP"],
         [[RQHomePageOneOrFourItemModel alloc] initWithTitleStr:@"精选500题" iconImgStr:@"精选500题"],

+ 1 - 1
jiaPei/Modules/HomePageModule/ViewModel/HomePage/RQHomePageViewModel.m

@@ -48,7 +48,7 @@
       deliverOnMainThread]
      subscribeNext:^(RQUserModel *user) {
          @strongify(self)
-        [RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {}];
+        //[RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {}];
         [RQ_VIP_Module isActiveWithCcomplete:^(RQActivationModel * _Nullable activationModel, BOOL isSuccess) {}];
         [[RQ_HTTP_Service getMyScoreWithSubject:RQHomePageSubjectType_SubjectOne] subscribeNext:^(NSArray *examResultModelArr) {
             RQ_COMMON_MANAGER.myExamOneCount = examResultModelArr.count;

+ 4 - 0
jiaPei/Modules/HomePageModule/ViewModel/HomePage/考场视频/ItemViewModel/RQPlaceBuyItemViewModel.m

@@ -18,6 +18,10 @@
 - (instancetype)initWithPlaceListModel:(RQPlaceListModel *)placeListModel {
     if (self = [super init]) {
         @weakify(self)
+//        if ([RQ_USER_MANAGER.currentUser.loginCode isEqualToString:@"350881199205290949"]) {//特殊审核账号
+//            placeListModel.isCheckVip = YES;
+//        }
+        
         self.placeListModel = placeListModel;
         CGFloat width = RQ_SCREEN_WIDTH - 32.f;
         self.rowHeight = (width * (56.f / 345.f)) + 16 + 20 + 16;

+ 1 - 0
jiaPei/Modules/HomePageModule/ViewModel/HomePage/考场视频/ItemViewModel/RQTeachSchoolVideoItemViewModel.m

@@ -13,6 +13,7 @@
         CGFloat width = RQ_SCREEN_WIDTH - 32.f;
         self.itemSize = CGSizeMake(width, width * (239.f / 345.f));
         self.operation = ^{
+            if(RQ_COMMON_MANAGER.APP_SWITCH )return;//审核版本禁用
             if (RQ_USER_MANAGER.isShouldLogin) {
                 RQPlaceListViewModel *viewModel = [[RQPlaceListViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{}];
                 [RQ_APPDELEGATE.services pushViewModel:viewModel animated:YES];

+ 1 - 1
jiaPei/Modules/OtherModules/ExerciseModule/View/ExercisePage/RQExerciseAnswerCell.m

@@ -132,7 +132,7 @@
             graColor.type = QQGradualChangeTypeLeftToRight;
         } size:CGSizeMake(RQ_FIT_HORIZONTAL(128.f), RQ_FIT_HORIZONTAL(34.f)) cornerRadius:QQRadiusMakeSame(RQ_FIT_HORIZONTAL(34.f) / 2.f)] forState:UIControlStateNormal];
         
-        
+//        NSInteger line = RQ_COMMON_MANAGER.APP_SWITCH? 0 : ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
         NSInteger line = ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
         self.skill_bottom_layout.constant = 16.f;
         if(RQ_USER_MANAGER.tryLookCount>0 && line == 1){//是否试看

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

@@ -94,6 +94,7 @@
                     }
                 }
                 self.skillString = text;
+//                NSInteger line = RQ_COMMON_MANAGER.APP_SWITCH? 0 : ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
                 NSInteger line = ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
                 if (RQ_USER_MANAGER.tryLookCount>0 && line==1){//试看
                     line = 0;
@@ -112,6 +113,7 @@
 //重写 skillHeight get 方法
 - (CGFloat)skillHeight{
     CGFloat skillH = _skillHeight;
+//    NSInteger line = RQ_COMMON_MANAGER.APP_SWITCH? 0 : ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
     NSInteger line = ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
     if (RQ_USER_MANAGER.tryLookCount>0 && line==1){//试看
         line = 0;
@@ -123,6 +125,7 @@
 //重写 rowHeight get 方法
 - (CGFloat)rowHeight{
     CGFloat rowH = _exRowHeight + self.skillHeight;
+//    NSInteger line = RQ_COMMON_MANAGER.APP_SWITCH? 0 : ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
     NSInteger line = ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
     if (RQ_USER_MANAGER.tryLookCount>0 && line==1){//试看
         rowH = rowH + 40.f;
@@ -156,6 +159,7 @@
 {
     if (RQ_COMMON_MANAGER.JSJP_APP_VOICE) {//读题-是否开启
         //是vip
+//        NSInteger line = RQ_COMMON_MANAGER.APP_SWITCH? 0 : ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
         NSInteger line = ((RQ_VIP_Module.isSubject1Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectOne)? 0 : ((RQ_VIP_Module.isSubject4Vip && RQ_YDTQuestion_Module.subject == RQHomePageSubjectType_SubjectFour)? 0 : 1));
         if (RQ_USER_MANAGER.tryLookCount>0 && line==1){//试看
             line = 0;

+ 1 - 0
jiaPei/Modules/OtherModules/VIPModule/RQVIPModule.h

@@ -109,6 +109,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)gotoVipViewWithDictType:(NSString *)dictType;
 /// 是否Vip
 - (void)isVipWithSubject:(NSInteger)subject complete:(VoidBlock_Bool)complete;
+- (void)isVipWithSubjectDto:(NSInteger)subject complete:(VoidBlock_Bool)complete;
 - (void)isActiveWithCcomplete:(RQGetActivationModelBlock)complete;
 @end
 

+ 21 - 2
jiaPei/Modules/OtherModules/VIPModule/RQVIPModule.m

@@ -135,8 +135,8 @@ static id rq_VIPModule = nil;
     }
 }
 
-/// 是否Vip
-- (void)isVipWithSubject:(NSInteger)subject complete:(VoidBlock_Bool)complete {
+//vip处理
+- (void)isVipWithSubjectDto:(NSInteger)subject complete:(VoidBlock_Bool)complete {
     if (RQ_USER_MANAGER.isShouldLogin) {
         __block BOOL isVerify;
         [[RQ_HTTP_Service getVideoVipWithUserId:RQ_USER_MANAGER.currentUser._id] subscribeNext:^(RQVideoVipModel *videoVipModel) {
@@ -194,6 +194,7 @@ static id rq_VIPModule = nil;
                 RQ_VIP_Module.isADVip = (isAds >=2);
                 RQ_VIP_Module.isVip = result;
 //                complete(result? result : (RQ_COMMON_MANAGER.APP_SWITCH? YES : NO));
+
                 complete(result? result :NO);
             }
         } error:^(NSError * _Nullable error) {
@@ -224,6 +225,24 @@ static id rq_VIPModule = nil;
         }
     }
 }
+/// 是否Vip
+- (void)isVipWithSubject:(NSInteger)subject complete:(VoidBlock_Bool)complete {
+    
+    if( RQ_COMMON_MANAGER.APP_SWITCH && !RQ_USER_MANAGER.isLogin  ){//审核时提示 - v2.1.1
+        [RQ_SHARE_FUNCTION showAlertWithTitle:@"提示" message:@"使用计时平台账号登录极速驾培,可享受跨平台使用权益,直接购买只会绑定当前设备" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"取消" otherButtonTitles:@[@"登录账号购买(推荐)",@"游客登录"] otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+            if (selectedOtherButtonIndex == 0) { //登录账号
+                if(RQ_USER_MANAGER.isShouldLogin){
+                    NSLog(@"跳转登录");
+                }
+            }else if (selectedOtherButtonIndex == 1) {//游客登录
+                
+            }
+            NSLog(@"index=%zd",selectedOtherButtonIndex);
+        }];
+    } else {
+        [self isVipWithSubjectDto:subject complete:complete];
+    }
+}
 
 - (void)isActiveWithCcomplete:(RQGetActivationModelBlock)complete {
     if (RQ_USER_MANAGER.isShouldLogin) {

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

@@ -210,7 +210,6 @@ static id rq_userManager = nil;
             } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_Online_Version"]) {
                 NSInteger customOnlineVersion = [[[NSString stringWithFormat:@"%@",dictInfoModel.dictValue] stringByReplacingOccurrencesOfString:@"." withString:@""] integerValue];
                 RQ_COMMON_MANAGER.APP_SWITCH = (localVersion > customOnlineVersion);
-                //RQ_COMMON_MANAGER.APP_SWITCH = NO;
             } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_APP_ICON_NEED_CHANGE"]) {
                 RQ_COMMON_MANAGER.JSJP_APP_ICON_NEED_CHANGE = [dictInfoModel.dictValue boolValue];
             } else if ([dictInfoModel.dictLabel isEqualToString:@"JSJP_APP_AD_RATE"]) {