From 5415b6659e542b21058428bbc0d38e7f5783815b Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期六, 09 十一月 2024 21:05:29 +0800 Subject: [PATCH] fix bug --- XQMuse/Root/Course/VC/CourseVCOfficalCommentVC.swift | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/XQMuse/Root/Course/VC/CourseVCOfficalCommentVC.swift b/XQMuse/Root/Course/VC/CourseVCOfficalCommentVC.swift index afe8ea0..c7d8068 100644 --- a/XQMuse/Root/Course/VC/CourseVCOfficalCommentVC.swift +++ b/XQMuse/Root/Course/VC/CourseVCOfficalCommentVC.swift @@ -88,8 +88,25 @@ let model = viewModel.dataSource.value!.list[indexPath.row] if model.courseType == .online{ - let vc = CourseDetialVC(courseId: model.id) - JQ_currentViewController().jq_push(vc: vc) + if model.chargeType == .vipFree || model.chargeType == .payment{ + guard sceneDelegate!.checkisLoginState() else{return} + } + + + Services.getCourseDetail(courseId: model.id).subscribe(onNext: {data in + if let m = data.data{ + if m.isVip == .no && m.chargeType == .vipFree{ + let vc = VIPCenterVC() + JQ_currentViewController().jq_push(vc: vc) + }else if m.courseType == .online{ + let vc = CourseDetialVC(courseModel: m) + JQ_currentViewController().jq_push(vc: vc) + }else{ + let vc = CourseDetialOfflineVC(courseId: m.id) + JQ_currentViewController().jq_push(vc: vc) + } + } + }).disposed(by: disposeBag) }else{ let vc = CourseDetialOfflineVC(courseId: model.id) JQ_currentViewController().jq_push(vc: vc) -- Gitblit v1.7.1