2024-01-05 11:11:15 +08:00
|
|
|
// @ts-nocheck
|
|
|
|
|
import { obtainCarExamInfo} from '../../api/index'
|
|
|
|
|
import { dateFormat} from '../utils/tools'
|
|
|
|
|
|
|
|
|
|
//获取设备信息
|
|
|
|
|
export async function getDeviceInfo() {
|
2024-01-31 14:42:14 +08:00
|
|
|
// globalThis.deviceNo = 'J43405J003101'; //设备mac
|
|
|
|
|
globalThis.deviceNo = 'FE-FC-FE-7C-5C-77'; //设备mac
|
2024-01-05 11:11:15 +08:00
|
|
|
globalThis.diskId = '1231231231'; //硬盘号
|
|
|
|
|
globalThis.hasAuth = true;
|
|
|
|
|
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取考车信息
|
|
|
|
|
export async function getCarInfo() {
|
|
|
|
|
let date = new Date();
|
|
|
|
|
let params = { time: dateFormat(date), deviceNo: globalThis.deviceNo };
|
|
|
|
|
let res:any = await obtainCarExamInfo(params)
|
|
|
|
|
if(!res.obtainCarExamInfoRsp.body){
|
|
|
|
|
this.errorMsg=decodeURI(res.examinerLoginRsp.head.resultMessage)
|
|
|
|
|
}else {
|
|
|
|
|
globalThis.carInfo=res.obtainCarExamInfoRsp.body
|
2024-01-31 14:35:16 +08:00
|
|
|
console.log('carInfo',JSON.stringify(globalThis.carInfo))
|
2024-01-05 11:11:15 +08:00
|
|
|
// globalThis.carInfo.carId=res.obtainCarExamInfoRsp.body.carId
|
|
|
|
|
globalThis.carInfo.plateNo = decodeURIComponent(globalThis.carInfo.plateNo)
|
|
|
|
|
}
|
|
|
|
|
//{"obtainCarExamInfoRsp":{"head":{"checkCode":"2A5787C27195EE83CB9A45C1EEAE9AA8","resultCode":"0","resultMessage":"%E8%8E%B7%E5%8F%96%E8%80%83%E8%BD%A6%E8%80%83%E8%AF%95%E4%BF%A1%E6%81%AF-%E6%88%90%E5%8A%9F","time":"2023-04-03 16:19:40"},"body":{"carId":"1003","carNo":"4","examSubject":"3","examinationRoomId":"2","gpsAddress":"192.4.0.114","hintPort":"33333","isNeedCheck":"N","ksdd":"6224J252","messagePort":"11111","plateNo":"%E5%90%89CB525","udpAddress":"192.168.32.167","voicePort":"22222"}}}
|
|
|
|
|
|
|
|
|
|
return res
|
|
|
|
|
}
|