|
@@ -92,23 +92,25 @@
|
|
|
|
|
|
//顺序练习
|
|
|
- (IBAction)btnSxlxActiondo:(UIButton *)sender {
|
|
|
- NSArray *arr = [[RQ_YDTQuestion_Module getQuestionWithSubject:RQ_YDTQuestion_Module.subject exerciseType:RQExerciseType_Sequential ].rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel *ydtQuestionModel) {
|
|
|
- return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
|
|
|
- }].toArray;
|
|
|
-
|
|
|
-// NSArray *arr = (self.homePageSubjectType == RQHomePageSubjectType_SubjectFour)? fourArr.copy : oneArr.copy;
|
|
|
-// arr = [arr.rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel *ydtQuestionModel) {
|
|
|
-// return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
|
|
|
-// }].toArray;
|
|
|
- RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
- RQHomePageCarTypeKey : @(self.viewModel.homePageCarType),
|
|
|
- RQHomePageSubjectTypeKey : @(self.viewModel.homePageSubjectType),
|
|
|
- RQHomeSubPageTypeKey : @(RQHomeSubPageType_SequentialPractice),
|
|
|
- RQViewModelIDKey : self.viewModel.sxlxtStr,
|
|
|
- RQExerciseTypeKey : @(RQExerciseType_Sequential),
|
|
|
- RQViewModelUtilKey : arr,
|
|
|
- }];
|
|
|
- [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ NSArray *arr = [[RQ_YDTQuestion_Module getQuestionWithSubject:RQ_YDTQuestion_Module.subject exerciseType:RQExerciseType_Sequential ].rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel *ydtQuestionModel) {
|
|
|
+ return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
|
|
|
+ }].toArray;
|
|
|
+
|
|
|
+ // NSArray *arr = (self.homePageSubjectType == RQHomePageSubjectType_SubjectFour)? fourArr.copy : oneArr.copy;
|
|
|
+ // arr = [arr.rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel *ydtQuestionModel) {
|
|
|
+ // return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
|
|
|
+ // }].toArray;
|
|
|
+ RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
+ RQHomePageCarTypeKey : @(self.viewModel.homePageCarType),
|
|
|
+ RQHomePageSubjectTypeKey : @(self.viewModel.homePageSubjectType),
|
|
|
+ RQHomeSubPageTypeKey : @(RQHomeSubPageType_SequentialPractice),
|
|
|
+ RQViewModelIDKey : self.viewModel.sxlxtStr,
|
|
|
+ RQExerciseTypeKey : @(RQExerciseType_Sequential),
|
|
|
+ RQViewModelUtilKey : arr,
|
|
|
+ }];
|
|
|
+ [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//模拟考试
|
|
@@ -124,115 +126,129 @@
|
|
|
|
|
|
//VIP课程
|
|
|
- (IBAction)btnVipAction:(UIButton *)sender {
|
|
|
- [RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {
|
|
|
- if (RQ_VIP_Module.isVip) {
|
|
|
- [RQ_VIP_Module gotoVipCenter];
|
|
|
- } else {
|
|
|
- [RQ_VIP_Module gotoBuyVipWithVipPageType:RQVIPPageType_Full];
|
|
|
- }
|
|
|
- }];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ [RQ_VIP_Module isVipWithSubject:0 complete:^(BOOL isVip) {
|
|
|
+ if (RQ_VIP_Module.isVip) {
|
|
|
+ [RQ_VIP_Module gotoVipCenter];
|
|
|
+ } else {
|
|
|
+ [RQ_VIP_Module gotoBuyVipWithVipPageType:RQVIPPageType_Full];
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//真实考场
|
|
|
- (IBAction)btnExaminationAction:(UIButton *)sender {
|
|
|
- [RQ_VIP_Module isVipWithSubject:RQ_YDTQuestion_Module.subject + 1 complete:^(BOOL isVip) {
|
|
|
- if (isVip) {
|
|
|
-// username subject headimg gs 替换-> model
|
|
|
-// NSString *urlStr = [NSString stringWithFormat:@"https://mn.zzxcx.net/#/exam/begin?username=%@&subject=%@&model=%@&headimg=%@",[RQ_USER_MANAGER.currentUser.userName qmui_stringByEncodingUserInputQuery],RQ_YDTQuestion_Module.subjectStr,RQ_YDTQuestion_Module.carTypeStrNew,RQ_USER_MANAGER.currentUser.photo];
|
|
|
-// NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
|
|
|
-// RQWebViewModel *webViewModel = [[RQWebViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{RQViewModelRequestKey:request, RQViewModelWebViewTypeKey:@(RQWebViewType_Exam)}];
|
|
|
-// webViewModel.prefersNavigationBarHidden = YES;
|
|
|
-// [RQ_APPDELEGATE.services pushViewModel:webViewModel animated:YES];
|
|
|
-
|
|
|
- //显示真实考场
|
|
|
- NYExaminationViewModel *examinationViewModel = [[NYExaminationViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{}];
|
|
|
- examinationViewModel.km = RQ_YDTQuestion_Module.subjectStr.intValue;
|
|
|
- [RQ_APPDELEGATE.services pushViewModel:examinationViewModel animated:YES];
|
|
|
-
|
|
|
- } else {
|
|
|
- if (RQ_VIP_Module.freeLookSimExamNum == 1||
|
|
|
- RQ_COMMON_MANAGER.APP_SWITCH) {//审核状态不用看广告
|
|
|
-// NSString *urlStr = [NSString stringWithFormat:@"https://mn.zzxcx.net/#/exam/begin?username=%@&subject=%@&model=%@&headimg=%@",[RQ_USER_MANAGER.currentUser.userName qmui_stringByEncodingUserInputQuery],RQ_YDTQuestion_Module.subjectStr,RQ_YDTQuestion_Module.carTypeStrNew,RQ_USER_MANAGER.currentUser.photo];
|
|
|
-// NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
|
|
|
-// RQWebViewModel *webViewModel = [[RQWebViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{RQViewModelRequestKey:request, RQViewModelWebViewTypeKey:@(RQWebViewType_Exam)}];
|
|
|
-// webViewModel.prefersNavigationBarHidden = YES;
|
|
|
-// [RQ_APPDELEGATE.services pushViewModel:webViewModel animated:YES];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ [RQ_VIP_Module isVipWithSubject:RQ_YDTQuestion_Module.subject + 1 complete:^(BOOL isVip) {
|
|
|
+ if (isVip) {
|
|
|
+ // username subject headimg gs 替换-> model
|
|
|
+ // NSString *urlStr = [NSString stringWithFormat:@"https://mn.zzxcx.net/#/exam/begin?username=%@&subject=%@&model=%@&headimg=%@",[RQ_USER_MANAGER.currentUser.userName qmui_stringByEncodingUserInputQuery],RQ_YDTQuestion_Module.subjectStr,RQ_YDTQuestion_Module.carTypeStrNew,RQ_USER_MANAGER.currentUser.photo];
|
|
|
+ // NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
|
|
|
+ // RQWebViewModel *webViewModel = [[RQWebViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{RQViewModelRequestKey:request, RQViewModelWebViewTypeKey:@(RQWebViewType_Exam)}];
|
|
|
+ // webViewModel.prefersNavigationBarHidden = YES;
|
|
|
+ // [RQ_APPDELEGATE.services pushViewModel:webViewModel animated:YES];
|
|
|
|
|
|
//显示真实考场
|
|
|
NYExaminationViewModel *examinationViewModel = [[NYExaminationViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{}];
|
|
|
examinationViewModel.km = RQ_YDTQuestion_Module.subjectStr.intValue;
|
|
|
[RQ_APPDELEGATE.services pushViewModel:examinationViewModel animated:YES];
|
|
|
- RQ_VIP_Module.freeLookSimExamNum = 0;
|
|
|
+
|
|
|
} else {
|
|
|
- if(!RQ_COMMON_MANAGER.APP_SWITCH){
|
|
|
- [RQ_ALERTVIEW_MANAGER showAlertWithAlertType:RQAlertType_AD title:@"" message:@"" confirmTitle:@"充值会员无限使用" cancelTitle:@"看广告解锁使用" confirmAction:^(__kindof QMUIDialogViewController * _Nonnull dialogViewController) {
|
|
|
- [RQ_VIP_Module gotoBuyVipWithVipPageType:RQVIPPageType_Full];
|
|
|
- } cancelAction:^(__kindof QMUIDialogViewController * _Nonnull dialogViewController) {
|
|
|
- [RQ_AD_Module loadRewardvodAd];
|
|
|
- }];
|
|
|
+ if (RQ_VIP_Module.freeLookSimExamNum == 1||
|
|
|
+ RQ_COMMON_MANAGER.APP_SWITCH) {//审核状态不用看广告
|
|
|
+ // NSString *urlStr = [NSString stringWithFormat:@"https://mn.zzxcx.net/#/exam/begin?username=%@&subject=%@&model=%@&headimg=%@",[RQ_USER_MANAGER.currentUser.userName qmui_stringByEncodingUserInputQuery],RQ_YDTQuestion_Module.subjectStr,RQ_YDTQuestion_Module.carTypeStrNew,RQ_USER_MANAGER.currentUser.photo];
|
|
|
+ // NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
|
|
|
+ // RQWebViewModel *webViewModel = [[RQWebViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{RQViewModelRequestKey:request, RQViewModelWebViewTypeKey:@(RQWebViewType_Exam)}];
|
|
|
+ // webViewModel.prefersNavigationBarHidden = YES;
|
|
|
+ // [RQ_APPDELEGATE.services pushViewModel:webViewModel animated:YES];
|
|
|
+
|
|
|
+ //显示真实考场
|
|
|
+ NYExaminationViewModel *examinationViewModel = [[NYExaminationViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{}];
|
|
|
+ examinationViewModel.km = RQ_YDTQuestion_Module.subjectStr.intValue;
|
|
|
+ [RQ_APPDELEGATE.services pushViewModel:examinationViewModel animated:YES];
|
|
|
+ RQ_VIP_Module.freeLookSimExamNum = 0;
|
|
|
+ } else {
|
|
|
+ if(!RQ_COMMON_MANAGER.APP_SWITCH){
|
|
|
+ [RQ_ALERTVIEW_MANAGER showAlertWithAlertType:RQAlertType_AD title:@"" message:@"" confirmTitle:@"充值会员无限使用" cancelTitle:@"看广告解锁使用" confirmAction:^(__kindof QMUIDialogViewController * _Nonnull dialogViewController) {
|
|
|
+ [RQ_VIP_Module gotoBuyVipWithVipPageType:RQVIPPageType_Full];
|
|
|
+ } cancelAction:^(__kindof QMUIDialogViewController * _Nonnull dialogViewController) {
|
|
|
+ [RQ_AD_Module loadRewardvodAd];
|
|
|
+ }];
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- }
|
|
|
- }];
|
|
|
+ }];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//分阶段练习
|
|
|
- (IBAction)btnCateLxAction:(UIButton *)sender {
|
|
|
- NYBlockExerciseViewModel *blockExerciseViewModel = [[NYBlockExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
- RQHomePageSubjectTypeKey : @(self.viewModel.homePageSubjectType),
|
|
|
- }];
|
|
|
- [RQ_APPDELEGATE.services pushViewModel:blockExerciseViewModel animated:YES];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ NYBlockExerciseViewModel *blockExerciseViewModel = [[NYBlockExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
+ RQHomePageSubjectTypeKey : @(self.viewModel.homePageSubjectType),
|
|
|
+ }];
|
|
|
+ [RQ_APPDELEGATE.services pushViewModel:blockExerciseViewModel animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//易错专项
|
|
|
- (IBAction)btnFallibilityAction:(UIButton *)sender {
|
|
|
-
|
|
|
- NYFailSpecialExerciseViewModel *failSpecialExerciseViewModel = [[NYFailSpecialExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
- RQHomePageSubjectTypeKey : @(self.viewModel.homePageSubjectType),
|
|
|
- }];
|
|
|
- [RQ_APPDELEGATE.services pushViewModel:failSpecialExerciseViewModel animated:YES];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ NYFailSpecialExerciseViewModel *failSpecialExerciseViewModel = [[NYFailSpecialExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
+ RQHomePageSubjectTypeKey : @(self.viewModel.homePageSubjectType),
|
|
|
+ }];
|
|
|
+ [RQ_APPDELEGATE.services pushViewModel:failSpecialExerciseViewModel animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//500精选
|
|
|
- (IBAction)btnWBAction:(UIButton *)sender {
|
|
|
-
|
|
|
- [RQ_VIP_Module isVipWithSubject:RQ_YDTQuestion_Module.subject + 1 complete:^(BOOL isVip) {
|
|
|
- if (isVip) {
|
|
|
- NSArray *arr = [[RQ_YDTQuestion_Module getQuestionWithSubject:RQ_YDTQuestion_Module.subject exerciseType:RQExerciseType_HandPick ].rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel *ydtQuestionModel) {
|
|
|
- return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
|
|
|
- }].toArray;
|
|
|
- RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
- RQHomePageCarTypeKey : @(RQ_YDTQuestion_Module.carType),
|
|
|
- RQHomePageSubjectTypeKey : @(RQ_YDTQuestion_Module.subject),
|
|
|
- RQHomeSubPageTypeKey : @(RQHomeSubPageType_SequentialPractice),
|
|
|
- RQViewModelIDKey : @"精选500题",
|
|
|
- RQExerciseTypeKey : @(RQExerciseType_HandPick),
|
|
|
- RQViewModelUtilKey : arr,
|
|
|
- }];
|
|
|
- [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES];
|
|
|
- } else {
|
|
|
- [RQ_VIP_Module gotoBuyVipWithVipPageType:RQVIPPageType_Full];
|
|
|
- }
|
|
|
- }];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ [RQ_VIP_Module isVipWithSubject:RQ_YDTQuestion_Module.subject + 1 complete:^(BOOL isVip) {
|
|
|
+ if (isVip) {
|
|
|
+ NSArray *arr = [[RQ_YDTQuestion_Module getQuestionWithSubject:RQ_YDTQuestion_Module.subject exerciseType:RQExerciseType_HandPick ].rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel *ydtQuestionModel) {
|
|
|
+ return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
|
|
|
+ }].toArray;
|
|
|
+ RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
|
|
|
+ RQHomePageCarTypeKey : @(RQ_YDTQuestion_Module.carType),
|
|
|
+ RQHomePageSubjectTypeKey : @(RQ_YDTQuestion_Module.subject),
|
|
|
+ RQHomeSubPageTypeKey : @(RQHomeSubPageType_SequentialPractice),
|
|
|
+ RQViewModelIDKey : @"精选500题",
|
|
|
+ RQExerciseTypeKey : @(RQExerciseType_HandPick),
|
|
|
+ RQViewModelUtilKey : arr,
|
|
|
+ }];
|
|
|
+ [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES];
|
|
|
+ } else {
|
|
|
+ [RQ_VIP_Module gotoBuyVipWithVipPageType:RQVIPPageType_Full];
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//专项练习
|
|
|
- (IBAction)btnZxPracticeAction:(UIButton *)sender {
|
|
|
- RQSpecialPractiseViewModel *specialPractiseViewModel = [[RQSpecialPractiseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:nil];
|
|
|
- [RQ_APPDELEGATE.services pushViewModel:specialPractiseViewModel animated:YES];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ RQSpecialPractiseViewModel *specialPractiseViewModel = [[RQSpecialPractiseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:nil];
|
|
|
+ [RQ_APPDELEGATE.services pushViewModel:specialPractiseViewModel animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//电子资料
|
|
|
- (IBAction)btnCorpuscleresAction:(UIButton *)sender {
|
|
|
NSLog(@"点击了-电子资料");
|
|
|
- [RQ_SHARE_FUNCTION miniwithUserName:RQ_COMMON_MANAGER.JSJP_XCX_NAME path:RQ_COMMON_MANAGER.JSJP_XCX_PAGE];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ [RQ_SHARE_FUNCTION miniwithUserName:RQ_COMMON_MANAGER.JSJP_XCX_NAME path:RQ_COMMON_MANAGER.JSJP_XCX_PAGE];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//错题收藏
|
|
|
- (IBAction)btnErrorCollectAction:(UIButton *)sender {
|
|
|
- RQErrorAndCollectViewModel *errorAndCollectViewModel = [[RQErrorAndCollectViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:nil];
|
|
|
- [RQ_APPDELEGATE.services pushViewModel:errorAndCollectViewModel animated:YES];
|
|
|
+ if (RQ_USER_MANAGER.isShouldLogin) {
|
|
|
+ RQErrorAndCollectViewModel *errorAndCollectViewModel = [[RQErrorAndCollectViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:nil];
|
|
|
+ [RQ_APPDELEGATE.services pushViewModel:errorAndCollectViewModel animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|