| | |
| | | import { |
| | | session, |
| | | showToast, |
| | | showModal |
| | | showModal, |
| | | showError, |
| | | showInfo |
| | | } from "@/comm/utils.js" |
| | | import { |
| | | Button |
| | |
| | | |
| | | |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | checkConnectStatus() { |
| | |
| | | const result = res.result || "" |
| | | const arCode = result.split(";") |
| | | if (arCode.length != 3) { |
| | | this.showError("无效的二维码!") |
| | | showInfo("无效的二维码!") |
| | | return |
| | | } |
| | | if (!arCode[0].trim() || !arCode[0].trim()) { |
| | | this.showError("无效的二维码!") |
| | | showInfo("无效的二维码!") |
| | | return |
| | | } |
| | | that.ip = arCode[0] |
| | |
| | | } catch (ex) { |
| | | console.log("connectVehicle faile",this.ip,ex) |
| | | this.connectState = 3 |
| | | // this.showError(ex) |
| | | // showError(ex) |
| | | } |
| | | }, |
| | | |
| | |
| | | }, 2000) |
| | | }) |
| | | }, |
| | | showError(ex) { |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.msg == "string" ? ex.msg : exStr |
| | | showModal(tip, "错误", false,"确定") |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |