| | |
| | | let model = viewModel.dataSource.value!.list[indexPath.row] |
| | | |
| | | if model.courseType == .online{ |
| | | let vc = CourseDetialVC(courseId: model.id) |
| | | 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) |