| | |
| | | let index = pageMenu.selectedItemIndex |
| | | let models = startClouseHomeModel!.courseList |
| | | guard index < models.count else {return} |
| | | Services.queryCourseInfo(id: models[index].courseId).subscribe(onNext: {[weak self] data in |
| | | if let m = data.data{ |
| | | let vc = CourseDetailApplyVC(detailModel: m,isExtend: true) |
| | | self?.push(vc: vc) |
| | | Services.registeredData(coursePayId: models[index].id).subscribe(onNext: {data in |
| | | if let m1 = data.data{ |
| | | let vc = CourseDetailVC(id: models[index].courseId, signUpCourseModel: m1) |
| | | self.push(vc: vc) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func bookingRecordAction(_ sender: UIButton) { |
| | |
| | | push(vc: vc) |
| | | }else{ |
| | | let model = startClouseHomeModel?.exerciseVideoList[indexPath.row] |
| | | let vc = CourseVideoDetailVC(id: model!.videoId) |
| | | vc.title = "课后练习" |
| | | push(vc: vc) |
| | | Services.exerciseCourseList(courseTypeId: model?.coursePackageId).subscribe(onNext: {[weak self] data in |
| | | if let d = data.data?.first{ |
| | | let vc = CourseVideoDetailVC(model: d) |
| | | vc.title = "课后练习" |
| | | self?.push(vc: vc) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | } |