|
|
@@ -215,27 +215,28 @@ |
|
|
|
wheelCount: "", |
|
|
|
isJH: "" |
|
|
|
}); |
|
|
|
let cmdRandNum = ''; |
|
|
|
|
|
|
|
onLoad((option) => { |
|
|
|
console.log('======重新激活开始======', option); |
|
|
|
//请求订单详情 |
|
|
|
queryOrderDetail(option.id); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
onShow((option) => { |
|
|
|
uni.$on('bluetoothLink', res => { |
|
|
|
console.log(res); |
|
|
|
console.log(res,'===========123'); |
|
|
|
if (res.status) { |
|
|
|
// getCardRenewal() |
|
|
|
getObuId() |
|
|
|
setTimeout(()=>{ |
|
|
|
getObuId() |
|
|
|
}) |
|
|
|
} |
|
|
|
//移除监听 |
|
|
|
console.log('======移除监听======', res) |
|
|
|
|
|
|
|
// uni.$off('bluetoothLink') |
|
|
|
|
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
onShow((option) => { |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
@@ -268,7 +269,6 @@ |
|
|
|
} else { |
|
|
|
msg("请上传正确行驶证") |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
//获取订单详情 |
|
|
@@ -309,6 +309,7 @@ |
|
|
|
activationRecordQuery().then((val) => { |
|
|
|
console.log("jihuo", val) |
|
|
|
state.activationNum = val.num |
|
|
|
getObuId() |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
@@ -330,10 +331,12 @@ |
|
|
|
obu.obuId = res[1].substring(20, 36); |
|
|
|
obu.vin = res[1].substring(18, 20); |
|
|
|
obu.version = res[1].substring(18, 19) >= 4 ? "4x" : "2x"; |
|
|
|
cmdRandNum = res[2].substring(0, res[2].length - 4); |
|
|
|
console.log("obu.obuId===========", obu.obuId, res[1].substring(20, 36), cmdRandNum) |
|
|
|
getInstallApply() |
|
|
|
// cmdRandNum = res[2].substring(0, res[2].length - 4); |
|
|
|
} |
|
|
|
}); |
|
|
|
// getInstallApply() |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
@@ -362,16 +365,7 @@ |
|
|
|
.then(() => { |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
//再次获取随机数 |
|
|
|
let cmdArr = [cmd.HOME_DIRECTORY, cmd.RANDOM_NUMBER]; |
|
|
|
bluetoothUtil.transCmd(cmdArr, '20', function (res) { |
|
|
|
var str = res[1].substring(res[1].length - 4, res[1].length); |
|
|
|
if (str == "9000") { |
|
|
|
let cmdRandNum = res[1].substring(0, res[1].length - 4); |
|
|
|
getObuActivation(cmdRandNum); |
|
|
|
} else { |
|
|
|
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]); |
|
|
|
} |
|
|
|
}) |
|
|
|
getObuActivation(cmdRandNum); |
|
|
|
}) |
|
|
|
}; |
|
|
|
|
|
|
@@ -479,10 +473,10 @@ |
|
|
|
state.changeColor = true; |
|
|
|
state.phoneType = 0 |
|
|
|
state.isTakePhotoModeShow = false |
|
|
|
uploadFile(val.tempImagePath, imageType, IFCODE.etcCarOcrCard).then((data) => { |
|
|
|
uploadFile(val.tempImagePath, imageType, IFCODE.etcCarOcrCard).then((data : any) => { |
|
|
|
// uploadFile(val.tempImagePath, state.choiceIndex, ocrAllQuery).then((data) => { |
|
|
|
console.log('输出内容=====================', state.choiceIndex) |
|
|
|
if (state.choiceIndex === "3") { |
|
|
|
if (state.choiceIndex == "3") { |
|
|
|
if (data.plate_a.length > 8) { |
|
|
|
state.form.vehicleIdNum = data.plate_a.substring(0, 8); |
|
|
|
} else { |