Explorar el Código

2024年2月1日16:14:16

yxb
wq hace 1 año
padre
commit
0d90efddaa

+ 16
- 22
subpackage/after-sale/activation-once-again/activation-once-again.vue Ver fichero

@@ -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 {

+ 1
- 2
subpackage/after-sale/activation/activate.vue Ver fichero

@@ -529,8 +529,7 @@
if (res[0] == "9000") {
tools.showLoadingAlert("执行指令");
//再次获取随机数
let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd
.RANDOM_NUMBER
let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd.RANDOM_NUMBER
];
bluetoothUtil.transCmd(cmdArr, '20', function(res) {
var str = res[3].substring(res[3].length - 4, res[3].length);

Cargando…
Cancelar
Guardar