| | |
| | | extension HomeListenMenuVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | |
| | | var ind:Bool? |
| | | |
| | | if selectIndexPath.row != 0{ |
| | | ind = dataItems[selectIndexPath.row - 1].filter({$0.canStudy == 0}).count > 0 |
| | | } |
| | | |
| | | if ind == true{ |
| | | CommonAlertView.show(isSinple: true, content: "请先完成上一季度学习后再试") |
| | | return |
| | | } |
| | | |
| | | let model = dataItems[selectIndexPath.row][indexPath.row] |
| | | |
| | | // 暂时关闭,上线时开启 |
| | | guard model.canStudy == 1 else { |
| | | CommonAlertView.show(isSinple: true, content: "请先完成上一周练习") |
| | | CommonAlertView.show(isSinple: true, content: "请先完成上一周目学习后再试") |
| | | return |
| | | } |
| | | |
| | |
| | | studyScheduleModel = m |
| | | } |
| | | let quarter = weakSelf.selectIndexPath.row + 1 //季度 |
| | | let week = studyScheduleModel.week //周 |
| | | let vc = HomeListenVC(quarter: quarter, week: model.week,studyScheduleModel: studyScheduleModel) |
| | | weakSelf.push(vc: vc) |
| | | |