| | |
| | | } |
| | | |
| | | @IBAction func scanAction(_ sender: UIButton) { |
| | | |
| | | |
| | | |
| | | if let model = QRCodeModel.deserialize(from: "{\"scan_type\": 1000, \"space_id\": 27, \"sutu_id\": 1036}"){ |
| | | 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: "识别失败") |
| | | } |
| | | |
| | | return |
| | | |
| | | |
| | | let codeVC = CommonScanQRCodeVC {[weak self] text, status in |
| | | if status{ |
| | | if let model = QRCodeModel.deserialize(from: text){ |