|
|
@@ -199,6 +199,7 @@ |
|
|
|
request(IFCODE.orderDetail, options).then((res) => { |
|
|
|
orderInfo = JSON.parse(res.bizContent); |
|
|
|
console.log("orderInfo", orderInfo); |
|
|
|
console.log("orderInfores", res); |
|
|
|
if (orderInfo) { |
|
|
|
fileDataStrings.userType = orderInfo.userType; //用户类型 |
|
|
|
fileDataStrings.approvedCount = parseInt(orderInfo.vehicleApprovedCount); //核载人数 |
|
|
@@ -234,14 +235,14 @@ |
|
|
|
console.log('======获取OBU号======') |
|
|
|
let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER]; |
|
|
|
tools.showLoadingAlert("正在执行指令"); |
|
|
|
console.log('======cmdArray======',cmdArray) |
|
|
|
console.log('======cmdArray======', cmdArray) |
|
|
|
bluetoothUtil.transCmd(cmdArray, "20", function(res) { |
|
|
|
console.log('======cmdArray1======',cmdArray) |
|
|
|
console.log('======cmdArray1======', cmdArray) |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
console.log('======cmdArray2======',cmdArray) |
|
|
|
console.log('======cmdArray2======', cmdArray) |
|
|
|
var status = res[1].substring(res[1].length - 4, res[1].length); |
|
|
|
|
|
|
|
console.log('获取OBU号执行结果' + status) |
|
|
|
|
|
|
|
console.log('获取OBU号执行结果' + status, res) |
|
|
|
//第一次获取随机数 |
|
|
|
if (status == "9000") { |
|
|
|
obu.obuId = res[1].substring(20, 36); |
|
|
@@ -306,7 +307,7 @@ |
|
|
|
card.netId = res[2].substring(20, 24); |
|
|
|
card.cardType = res[2].substring(28, 30) == 23 ? 1 : 2; //23记账卡 非 23储值卡 1:记账卡 2:储值卡 |
|
|
|
card.vehiclePlateColor = parseInt(res[2].substring(82, 84), 16); |
|
|
|
console.log('======卡信息======', card) |
|
|
|
console.log('======卡信息======', card.cardId, fileDataStrings.cardId) |
|
|
|
if (card.cardId != fileDataStrings.cardId) { |
|
|
|
tools.showModalAlert("订单卡号与当前设备卡号信息不符!"); |
|
|
|
return |
|
|
@@ -386,7 +387,7 @@ |
|
|
|
.then((res) => { |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
let result = JSON.parse(res.bizContent); |
|
|
|
console.log("写卡指令============",result) |
|
|
|
console.log("写卡指令============", result) |
|
|
|
if (result.orderStatus == 1 || result.orderStatus == "1") { |
|
|
|
tools.showLoadingAlert("执行指令中"); |
|
|
|
bluetoothUtil.transCmd(result.command.split(","), "10", function(res) { |
|
|
@@ -506,7 +507,8 @@ |
|
|
|
tools.showLoadingAlert("执行指令"); |
|
|
|
//再次获取随机数 |
|
|
|
let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd |
|
|
|
.RANDOM_NUMBER]; |
|
|
|
.RANDOM_NUMBER |
|
|
|
]; |
|
|
|
bluetoothUtil.transCmd(cmdArr, '20', function(res) { |
|
|
|
var str = res[3].substring(res[3].length - 4, res[3].length); |
|
|
|
if (str == "9000") { |
|
|
@@ -811,4 +813,4 @@ |
|
|
|
font-size: 34rpx; |
|
|
|
border-radius: 20rpx; |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |