| | |
| | | } |
| | | |
| | | @IBAction func scanAction(_ sender: UIButton) { |
| | | let scan = CommonScanQRCodeVC { text, status in |
| | | let scan = CommonScanQRCodeVC {[weak self] text, status in |
| | | if status{ |
| | | |
| | | if let model = QRCodeModel.deserialize(from: text){ |
| | | print("--->\(model.toJSON())") |
| | | self.codeModel = model |
| | | self.checkUnPayGame(model) |
| | | if model.scan_type == .games{ |
| | | self?.codeModel = model |
| | | self?.checkUnPayGame(model) |
| | | }else if model.scan_type == .yard{ |
| | | alertError(msg: "识别类型错误") |
| | | // let vc = YardDetailVC(id: model.id!) |
| | | // self?.push(vc: vc) |
| | | }else if model.scan_type == .course{ |
| | | alertError(msg: "识别类型错误") |
| | | // let vc = CourseDetailVC(id: model.id!) |
| | | // self?.push(vc: vc) |
| | | } |
| | | }else{ |
| | | alertError(msg: "识别失败") |
| | | } |