| | |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | let model = viewModel.dataSource.value!.list[indexPath.row] |
| | | let vc = CourseDetialVC(courseId: model.id) |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | |
| | | // let isVip = UserViewModel.getAvatarInfo().isVip == .yes |
| | | // if model.isBuy == .yes || model.chargeType == .free || (model.chargeType == .vipFree && isVip){ |
| | | // |
| | | // return |
| | | // }else{ |
| | | // let vc = CourseDetialVC(courseId: model.id) |
| | | // JQ_currentViewController().jq_push(vc: vc) |
| | | // } |
| | | if model.courseType == .online{ |
| | | let vc = CourseDetialVC(courseId: model.id) |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else{ |
| | | let vc = CourseDetialOfflineVC(courseId: model.id) |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { |
| | | if section == 0{ |
| | | return .zero |
| | | } |
| | | return CGSize(width: JQ_ScreenW, height: 80.5) |
| | | } |
| | | } |