无故事王国
2023-11-13 a64b39beb6ba6ed8208d70daef2ff8872bdf265a
WanPai/Root/Home/VC/HomeVC.swift
@@ -206,7 +206,23 @@
   }
   @IBAction func scanAction(_ sender: UIButton) {
      let codeVC = CommonScanQRCodeVC { str, status in
      let codeVC = CommonScanQRCodeVC {[weak self] text, status in
         if status{
            if let model = QRCodeModel.deserialize(from: text){
               if model.scan_type == .games{
                  let gamesListVC = GamesListVC(model: model)
                  self?.push(vc: gamesListVC)
               }else if model.scan_type == .yard{
                  let vc = YardDetailVC(id: model.id!)
                  self?.push(vc: vc)
               }else if model.scan_type == .course{
                  let vc = CourseDetailVC(id: model.id!)
                  self?.push(vc: vc)
               }
            }else{
               alertError(msg: "识别失败")
            }
         }
      }
      push(vc: codeVC)