无故事王国
2023-11-15 a216515ccb4812cf3e703c64392b410a2eb8667b
WanPai/Root/Course/VC/StudentMentalListVC.swift
@@ -17,6 +17,7 @@
        var info:String!
        var btnName:String!
      var medalType:MedalType = .club
      var isTopLevel:Int!
    }
    lazy private var tableView:UITableView = {
@@ -24,6 +25,7 @@
        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
    }()
@@ -54,13 +56,14 @@
            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()
@@ -84,6 +87,7 @@
         case .deepPlayer:
            let vc = CourseExerciseSubListVC()
            push(vc: vc)
         default:break
      }
   }
}