无故事王国
2023-11-21 58405a369e73cca7bd5ef2cef948e1944907c2c7
WanPai/Root/Course/VC/SignUpCourseVC.swift
@@ -110,18 +110,22 @@
   func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      let item = viewModel.dataSource.value[indexPath.row]
      Services.registeredData(coursePayId: item.coursePayId).subscribe(onNext: {data in
         if let m1 = data.data{
            if m1.payStatus == .unPayment{
               Services.queryCourseInfo(id:  item.coursePackageId,payId: item.coursePayId).subscribe(onNext: { data in
                  if let m2 = data.data{
                     let vc = CourseDetailApplyVC(detailModel: m2,signUpModel: m1)
                     self.push(vc: vc)
                  }
               }).disposed(by: self.disposeBag)
            }else{
               let vc = CourseDetailVC(id: item.coursePackageId, signUpCourseModel: m1)
               self.push(vc: vc)
            }
         }
      }) { error in
      }.disposed(by: disposeBag)
       Services.queryCourseInfo(id:  item.coursePackageId).subscribe(onNext: { data in
       if let m = data.data{
       let vc = CourseDetailApplyVC(detailModel: m,signUpCourseModel: item)
       self.push(vc: vc)
       }
       }).disposed(by: self.disposeBag)
   }
}