| | |
| | | self.tableView.reloadData() |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | func jumpAt(listenType:ListenType){ |
| | | let row = listenType.rawValue - 1 |
| | | var jumpIndex:IndexPath = IndexPath(row: row, section: 0) |
| | | tableView(self.tableView, didSelectRowAt: jumpIndex) |
| | | } |
| | | } |
| | | |
| | | extension HomeListenSubVC:UITableViewDelegate{ |
| | |
| | | case 0: |
| | | cell.label_title.text = "自主学习1-听音选图" |
| | | cell.view_bg2.backgroundColor = UIColor(hexString: "#6EC3FF") |
| | | cell.setProgress(progress: studyScheduleModel?.listen ?? 0) |
| | | if (studyScheduleModel?.day ?? 0) > (page + 1){ |
| | | cell.setProgress(progress: 100) |
| | | }else{ |
| | | cell.setProgress(progress: studyScheduleModel?.listen ?? 0) |
| | | } |
| | | |
| | | case 1: |
| | | cell.label_title.text = "自主学习2-看图选音" |
| | | cell.view_bg2.backgroundColor = UIColor(hexString: "#FF9A85") |
| | | cell.setProgress(progress: studyScheduleModel?.look ?? 0) |
| | | if (studyScheduleModel?.day ?? 0) > (page + 1){ |
| | | cell.setProgress(progress: 100) |
| | | }else{ |
| | | cell.setProgress(progress: studyScheduleModel?.look ?? 0) |
| | | } |
| | | case 2: |
| | | cell.label_title.text = "自主学习3-归纳排除" |
| | | cell.view_bg2.backgroundColor = UIColor(hexString: "#28C8C5") |
| | | cell.setProgress(progress: studyScheduleModel?.induction ?? 0) |
| | | if (studyScheduleModel?.day ?? 0) > (page + 1){ |
| | | cell.setProgress(progress: 100) |
| | | }else{ |
| | | cell.setProgress(progress: studyScheduleModel?.induction ?? 0) |
| | | } |
| | | case 3: |
| | | cell.label_title.text = "自主学习4-有问有答" |
| | | cell.view_bg2.backgroundColor = UIColor(hexString: "#F8A169") |
| | | cell.setProgress(progress: studyScheduleModel?.answer ?? 0) |
| | | if (studyScheduleModel?.day ?? 0) > (page + 1){ |
| | | cell.setProgress(progress: 100) |
| | | }else{ |
| | | cell.setProgress(progress: studyScheduleModel?.answer ?? 0) |
| | | } |
| | | case 4: |
| | | cell.label_title.text = "自主学习5-音图相配" |
| | | cell.view_bg2.backgroundColor = UIColor(hexString: "#92CADB") |
| | | cell.setProgress(progress: studyScheduleModel?.pair ?? 0) |
| | | if (studyScheduleModel?.day ?? 0) > (page + 1){ |
| | | cell.setProgress(progress: 100) |
| | | }else{ |
| | | cell.setProgress(progress: studyScheduleModel?.pair ?? 0) |
| | | } |
| | | default:break |
| | | } |
| | | } |