| | |
| | | var info:String! |
| | | var btnName:String! |
| | | var medalType:MedalType = .club |
| | | var isTopLevel:Int! |
| | | } |
| | | |
| | | lazy private var tableView:UITableView = { |
| | |
| | | table.separatorStyle = .none |
| | | table.delegate = self |
| | | table.dataSource = self |
| | | table.contentInset = UIEdgeInsets(top: -21, left: 0, bottom: 0, right: 0) |
| | | table.register(UINib(nibName: "StudentMentalTCell", bundle: nil), forCellReuseIdentifier: "_StudentMentalTCell") |
| | | return table |
| | | }() |
| | |
| | | for model in models{ |
| | | switch model.medalType{ |
| | | case .club: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_1"), l1: "COURSE", l2: model.medalName, level: model.levelNum, info: String(format: "再上课打卡%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_1"), l1: "COURSE", l2: model.medalName, level: model.levelNum, info: String(format: "再上课打卡%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | case .communtiy: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_3"), l1: "ON_LINE", l2: model.medalName, level: model.levelNum, info: String(format: "再预约场地%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_3"), l1: "ON_LINE", l2: model.medalName, level: model.levelNum, info: String(format: "再预约场地%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | case .deepPlayer: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_4"), l1: "APPOINTMENT", l2: model.medalName, level: model.levelNum, info: String(format: "再完成课后练习%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去完成",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_4"), l1: "APPOINTMENT", l2: model.medalName, level: model.levelNum, info: String(format: "再完成课后练习%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去完成",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | case .sport: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_2"), l1: "EVENTS", l2: model.medalName, level: model.levelNum, info: String(format: "再参与活动%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去报名",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_2"), l1: "EVENTS", l2: model.medalName, level: model.levelNum, info: String(format: "再参与活动%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去报名",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | default:break |
| | | } |
| | | } |
| | | self?.tableView.reloadData() |
| | |
| | | case .deepPlayer: |
| | | let vc = CourseExerciseSubListVC() |
| | | push(vc: vc) |
| | | default:break |
| | | } |
| | | } |
| | | } |