|
|
@@ -876,7 +876,7 @@ |
|
|
|
tools.showLoadingAlert('升级中'); |
|
|
|
//升级类OBU |
|
|
|
const applyData = await apply4Upgrade({ |
|
|
|
contractSn: obu.obuId, //OBU合同序列号 16位 |
|
|
|
contractSN: obu.obuId, //OBU合同序列号 16位 |
|
|
|
chipSn: state.ChipSn, //OBU晶片序列号 8位 |
|
|
|
issueMode: 'UPG', //发行模式 |
|
|
|
issueType: 'SCOBU', //发行发行类型 |
|
|
@@ -901,17 +901,13 @@ |
|
|
|
} |
|
|
|
|
|
|
|
function apply4Upgrade(params) { |
|
|
|
return new Promise((resolve) => { |
|
|
|
corefn('IF01001202504281152', params, function(res) { |
|
|
|
console.log("成功1", res) |
|
|
|
if (res.rc != "00") { |
|
|
|
tools.alertF(res.rm); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log("成功", res) |
|
|
|
resolve(res.rd) |
|
|
|
}) |
|
|
|
}) |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: params, |
|
|
|
method: "POST", |
|
|
|
showLoading: false, |
|
|
|
} |
|
|
|
return requestNew("/iaw/vfj/apply4Upgrade",options) |
|
|
|
} |
|
|
|
//获取发行脚本指令 |
|
|
|
async function updateEs(type, applyData) { |
|
|
@@ -950,18 +946,15 @@ |
|
|
|
} |
|
|
|
|
|
|
|
function getCommands(params) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
corefn('IF01001202504281153', params, function(res) { |
|
|
|
console.log("成功1", res) |
|
|
|
if (res.rc != "00") { |
|
|
|
tools.alertF(res.rm); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log("成功", res) |
|
|
|
resolve(res.rd) |
|
|
|
}) |
|
|
|
}) |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: params, |
|
|
|
method: "POST", |
|
|
|
showLoading: false, |
|
|
|
} |
|
|
|
return requestNew("/iaw/vfj/getCommands",options) |
|
|
|
} |
|
|
|
|
|
|
|
// 提取出来的子函数 |
|
|
|
async function processDirectCommand(element, cmdType) { |
|
|
|
// 添加随机延迟,避免连续请求 |
|
|
@@ -993,46 +986,33 @@ |
|
|
|
} |
|
|
|
|
|
|
|
function extAuth4Iss(params) { |
|
|
|
console.log("params", params) |
|
|
|
return new Promise((resolve) => { |
|
|
|
corefn('IF01001202504281156', params, function(res) { |
|
|
|
console.log("成功1", res) |
|
|
|
if (res.rc != "00") { |
|
|
|
tools.alertF(res.rm); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log("成功", res) |
|
|
|
resolve(res.rd) |
|
|
|
}) |
|
|
|
}) |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: params, |
|
|
|
method: "POST", |
|
|
|
showLoading: false, |
|
|
|
} |
|
|
|
return requestNew("/iaw/vfj/extAuth4Iss",options) |
|
|
|
} |
|
|
|
|
|
|
|
function exchangeKey(params) { |
|
|
|
return new Promise((resolve) => { |
|
|
|
corefn('IF01001202504281154', params, function(res) { |
|
|
|
console.log("成功1", res) |
|
|
|
if (res.rc != "00") { |
|
|
|
tools.alertF(res.rm); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log("成功", res) |
|
|
|
resolve(res.rd) |
|
|
|
}) |
|
|
|
}) |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: params, |
|
|
|
method: "POST", |
|
|
|
showLoading: false, |
|
|
|
} |
|
|
|
return requestNew("/iaw/vfj/exchangeKey",options) |
|
|
|
} |
|
|
|
|
|
|
|
function upgradeDone(params) { |
|
|
|
return new Promise((resolve) => { |
|
|
|
corefn('IF01001202504281155', params, function(res) { |
|
|
|
console.log("成功1", res) |
|
|
|
if (res.rc != "00") { |
|
|
|
tools.alertF(res.rm); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log("成功", res) |
|
|
|
resolve(res.rd) |
|
|
|
}) |
|
|
|
}) |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: params, |
|
|
|
method: "POST", |
|
|
|
showLoading: false, |
|
|
|
} |
|
|
|
return requestNew("/iaw/vfj/upgradeDone",options) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|