| | |
| | | extension StudentCourseDetailVC:SPPageMenuDelegate{ |
| | | func pageMenu(_ pageMenu: SPPageMenu, itemSelectedAt index: Int) { |
| | | defaultIndex = index |
| | | |
| | | |
| | | |
| | | var totoalNum = 0 |
| | | var totalDeductedNum = 0 |
| | | var totalRemainingNum = 0 |
| | | |
| | | for m in models{ |
| | | totoalNum += m.totalNums |
| | | totalDeductedNum = m.deductedNums |
| | | totalRemainingNum = m.remainingNums |
| | | } |
| | | |
| | | let model = models[index] |
| | | headView.label_deductedNums.text = "\(model.deductedNums)" |
| | | headView.label_totalNums.text = "\(model.totalNums)" |
| | | headView.label_remainingNums.text = "\(model.remainingNums)" |
| | | headView.label_deductedNums.text = "\(totalDeductedNum)" |
| | | headView.label_totalNums.text = "\(totoalNum)" |
| | | headView.label_remainingNums.text = "\(totalRemainingNum)" |
| | | |
| | | headView.label_preDeductedNums.text = "\(model.deductedNums)" |
| | | headView.label_preTotalNums.text = "\(model.totalNums)" |
| | | headView.label_preRemainingNums.text = "\(model.remainingNums)" |
| | | |
| | | headView.label_datetime.text = "有效期:\(model.periodOfValidity)" |
| | | headView.label_deductedNums_1.text = "\(model.deductedNums)" |
| | | |
| | | |
| | | viewModel.lessionId.accept(model.courseId) |
| | | viewModel.beginRefresh() |
| | | // |
| | | // Services.lessonDetails(lessonId: model.courseId, stuId: studentModel.stuId).subscribe(onNext: { data in |
| | | // |
| | | // }).disposed(by: disposeBag) |
| | | } |
| | | } |