|
|
@@ -38,11 +38,11 @@ |
|
|
|
</view> |
|
|
|
<!-- 激活成功popup --> |
|
|
|
<view v-if="state.showPopup" class="mask"> |
|
|
|
<piaoyi-progress-bar canvasId="progressCanvas4" :progress="state.progressNum" |
|
|
|
progressBackgroundColor="#07C160" :showText="true" textColor="#fff" :textSize="28" :height="22" |
|
|
|
:isCircular="true" :diameter="300"></piaoyi-progress-bar> |
|
|
|
<piaoyi-progress-bar canvasId="progressCanvas4" :progress="state.progressNum" progressBackgroundColor="#07C160" |
|
|
|
:showText="true" textColor="#fff" :textSize="28" :height="22" :isCircular="true" |
|
|
|
:diameter="300"></piaoyi-progress-bar> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup> |
|
|
@@ -60,24 +60,38 @@ |
|
|
|
navTo |
|
|
|
} from "@/utils/utils"; |
|
|
|
import { |
|
|
|
onLoad |
|
|
|
onLoad, |
|
|
|
onUnload |
|
|
|
} from '@dcloudio/uni-app' |
|
|
|
import { |
|
|
|
getItem |
|
|
|
} from "@/utils/storage"; |
|
|
|
import {requestNew} from "@/utils/network/request.js"; |
|
|
|
import { |
|
|
|
requestNew |
|
|
|
} from "@/utils/network/request.js"; |
|
|
|
import { |
|
|
|
IntegerToHexString, |
|
|
|
} from "@/utils/util/fileData.js"; |
|
|
|
import { |
|
|
|
issueApply,issueCallback,orderDetailQuery,errorLogAdd,cardObuQuery,cardObuQueryinLog,obuFileDataDecrypt |
|
|
|
issueApply, |
|
|
|
issueCallback, |
|
|
|
orderDetailQuery, |
|
|
|
errorLogAdd, |
|
|
|
cardObuQuery, |
|
|
|
cardObuQueryinLog, |
|
|
|
obuFileDataDecrypt |
|
|
|
} from "@/utils/network/api"; |
|
|
|
import { |
|
|
|
agentId |
|
|
|
} from "@/utils/network/difference"; |
|
|
|
import { |
|
|
|
startHeartbeat, |
|
|
|
stopHeartbeat |
|
|
|
} from "@/pages/bluetooth/heartbeatService" |
|
|
|
const cmd = require("../../../static/etcUtil/cmdConfig.js"); |
|
|
|
const tools = require("../../../static/etcUtil/tools.js"); |
|
|
|
const bluetoothUtil = require("../../../static/etcUtil/index.js"); |
|
|
|
|
|
|
|
import activeSuccess from "./components/popup-device-active-success"; |
|
|
|
const datas = require("../../../static/etcUtil/datas.js"); |
|
|
|
import { |
|
|
@@ -105,7 +119,7 @@ |
|
|
|
transfer: 0, //0 是原来的激活 1 是过户激活 |
|
|
|
showBtn: true, |
|
|
|
disabled: true, |
|
|
|
progressNum:0 |
|
|
|
progressNum: 0 |
|
|
|
}) |
|
|
|
|
|
|
|
onLoad((option) => { |
|
|
@@ -116,28 +130,36 @@ |
|
|
|
state.transfer = Number(option.transfer) |
|
|
|
//获取订单详情 |
|
|
|
getOrderDetails(orderData.orderId); |
|
|
|
console.log("state.transfer", state.transfer, state.transfer == 0, state.transfer == 1,getItem("orderInfo")) |
|
|
|
|
|
|
|
console.log("state.transfer", state.transfer, state.transfer == 0, state.transfer == 1, getItem( |
|
|
|
"orderInfo")) |
|
|
|
startHeartbeat() |
|
|
|
}) |
|
|
|
|
|
|
|
// ====================== 页面卸载时清理资源 ====================== |
|
|
|
onUnload(() => { |
|
|
|
stopHeartbeat(); |
|
|
|
// 实际项目中需调用 uni.closeBLEConnection 断开连接 |
|
|
|
console.log('页面卸载,清理资源'); |
|
|
|
}); |
|
|
|
|
|
|
|
const card = reactive({ |
|
|
|
cardId: "", |
|
|
|
cardNo: "", |
|
|
|
startTime: "", |
|
|
|
endTime: "", |
|
|
|
userName: "", |
|
|
|
userNameStr:"", |
|
|
|
userNameStr: "", |
|
|
|
idNum: "", |
|
|
|
idNumStr:"", |
|
|
|
idNumStr: "", |
|
|
|
vehiclePlate: "", |
|
|
|
vehiclePlateColor: "", |
|
|
|
color: "", |
|
|
|
colorStr:"", |
|
|
|
colorStr: "", |
|
|
|
version: "", |
|
|
|
type: "", |
|
|
|
typeStr:"", |
|
|
|
typeStr: "", |
|
|
|
favourable: "", |
|
|
|
favourableStr:"", |
|
|
|
favourableStr: "", |
|
|
|
money: "", |
|
|
|
v_userType: "" |
|
|
|
}); |
|
|
@@ -152,18 +174,18 @@ |
|
|
|
axleDistance: "", |
|
|
|
engineNum: "", |
|
|
|
type: "", |
|
|
|
typeStr:"", |
|
|
|
typeStr: "", |
|
|
|
userType: "", |
|
|
|
userTypeStr:"", |
|
|
|
userTypeStr: "", |
|
|
|
vehiclePlate: "", |
|
|
|
vehiclePlateColor: "", |
|
|
|
vehiclePlateColorStr:"", |
|
|
|
vehiclePlateColorStr: "", |
|
|
|
vin: "", |
|
|
|
wheelCount: "", |
|
|
|
isJH: "", |
|
|
|
isJHStr: "", |
|
|
|
outsideDimensions: "", |
|
|
|
loadStatus:"" |
|
|
|
loadStatus: "" |
|
|
|
}); |
|
|
|
let cmdRandNum = ''; |
|
|
|
let orderInfo = {}; |
|
|
@@ -193,50 +215,51 @@ |
|
|
|
orderId: "", |
|
|
|
vehicleClassStr: "" |
|
|
|
}); |
|
|
|
|
|
|
|
function cmdResult1() { |
|
|
|
// tools.showLoadingAlert('正在激活,请等待') |
|
|
|
state.progressNum=10 |
|
|
|
state.progressNum = 10 |
|
|
|
const options = { |
|
|
|
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) |
|
|
|
showLoading: false, |
|
|
|
data: { |
|
|
|
orderId: orderInfo.orderNo, |
|
|
|
issueType: state.transfer ? 2 : 1, //1正常激活 2 过户激活 |
|
|
|
cardId:card.cardId, |
|
|
|
obuId:obu.obuId |
|
|
|
cardId: card.cardId, |
|
|
|
obuId: obu.obuId |
|
|
|
}, //请求参数 |
|
|
|
method: "POST", //提交方式(默认POST) |
|
|
|
}; |
|
|
|
console.log("options==", options) |
|
|
|
|
|
|
|
|
|
|
|
//BDS-二发指令申请 |
|
|
|
requestNew(issueApply, options) |
|
|
|
.then((res) => { |
|
|
|
console.log("在线激活 请求"); |
|
|
|
console.log(res); |
|
|
|
const datas =res; |
|
|
|
const datas = res; |
|
|
|
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType == 'CARD' ? '10' : '20', function(res) { |
|
|
|
implementCmd(datas.transOrderId, datas.cmd, res.toString(), datas.stepNo) |
|
|
|
}, (err) => { |
|
|
|
showModals('在线激活异常') |
|
|
|
console.log("err",err) |
|
|
|
errorLog(datas.cmd,JSON.stringify(err),datas.stepNo) |
|
|
|
console.log("err", err) |
|
|
|
errorLog(datas.cmd, JSON.stringify(err), datas.stepNo) |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
state.showPopup=false |
|
|
|
state.showPopup = false |
|
|
|
state.disabled = true |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log(err); |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
state.showPopup=false |
|
|
|
state.showPopup = false |
|
|
|
state.disabled = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function implementCmd(transOrderId, cmd, cmdResult, stepNo) { |
|
|
|
console.log("datas.stepNo1",stepNo) |
|
|
|
state.progressNum=Number(stepNo)*10+10 |
|
|
|
console.log("datas.stepNo1", stepNo) |
|
|
|
state.progressNum = Number(stepNo) * 10 + 10 |
|
|
|
const options = { |
|
|
|
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) |
|
|
|
showLoading: false, |
|
|
@@ -245,7 +268,7 @@ |
|
|
|
cmd, |
|
|
|
cmdResult, |
|
|
|
stepNo, |
|
|
|
mpOpenId:getItem('mpOpenId')//公众号openid |
|
|
|
mpOpenId: getItem('mpOpenId') //公众号openid |
|
|
|
}, //请求参数 |
|
|
|
method: "POST", //提交方式(默认POST) |
|
|
|
}; |
|
|
@@ -253,34 +276,34 @@ |
|
|
|
//BDS-二发指令回传 |
|
|
|
requestNew(issueCallback, options) |
|
|
|
.then((res) => { |
|
|
|
console.log("BDS-二发指令回传 ",res); |
|
|
|
console.log("BDS-二发指令回传 ", res); |
|
|
|
const datas = res; |
|
|
|
console.log("在线激活 请求", datas); |
|
|
|
if (datas.stepNo == 100) { |
|
|
|
state.disabled = true |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
state.progressNum=100 |
|
|
|
state.progressNum = 100 |
|
|
|
setTimeout(() => { |
|
|
|
state.showPopup=false |
|
|
|
},1000) |
|
|
|
state.showPopup = false |
|
|
|
}, 1000) |
|
|
|
setTimeout(() => { |
|
|
|
msg("激活成功", { |
|
|
|
'icon': 'success', |
|
|
|
'duration': 3000 |
|
|
|
}) |
|
|
|
},2000) |
|
|
|
}, 2000) |
|
|
|
setTimeout(() => { |
|
|
|
getCardIdCommit() |
|
|
|
},5000) |
|
|
|
}, 5000) |
|
|
|
} else { |
|
|
|
console.log("datas.stepNo", datas.stepNo) |
|
|
|
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType == 'CARD' ? '10' : '20', function(res) { |
|
|
|
implementCmd(transOrderId, datas.cmd, res.toString(), datas.stepNo) |
|
|
|
}, (err) => { |
|
|
|
console.log("err",err) |
|
|
|
state.showPopup=false |
|
|
|
console.log("err", err) |
|
|
|
state.showPopup = false |
|
|
|
state.disabled = true |
|
|
|
errorLog(datas.cmd,JSON.stringify(err),datas.stepNo) |
|
|
|
errorLog(datas.cmd, JSON.stringify(err), datas.stepNo) |
|
|
|
showModals('在线激活异常') |
|
|
|
}); |
|
|
|
} |
|
|
@@ -288,19 +311,20 @@ |
|
|
|
.catch((err) => { |
|
|
|
console.log(err); |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
state.showPopup=false |
|
|
|
state.showPopup = false |
|
|
|
state.disabled = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//开始激活 按钮事件 |
|
|
|
const btn = () => { |
|
|
|
if(!state.disabled){ |
|
|
|
if (!state.disabled) { |
|
|
|
return; |
|
|
|
} |
|
|
|
state.disabled = false |
|
|
|
state.showPopup=true |
|
|
|
state.showPopup = true |
|
|
|
console.log('orderInfo参数', orderInfo, state.disabled) |
|
|
|
stopHeartbeat(); |
|
|
|
cmdResult1() |
|
|
|
}; |
|
|
|
|
|
|
@@ -385,12 +409,12 @@ |
|
|
|
const getCardId = () => { |
|
|
|
//执行0015文件 |
|
|
|
tools.showLoadingAlert("执行指令"); |
|
|
|
|
|
|
|
|
|
|
|
let cmdArr = [cmd.HOME_DIRECTORY, cmd.APPLICATION_DIRECTORY, cmd.CMD_READBINARY, cmd.CMD_GETBALANCE]; |
|
|
|
console.log(cmdArr); |
|
|
|
console.log(bluetoothUtil); |
|
|
|
bluetoothUtil.transCmd(cmdArr, '10', function(res) { //10:写卡 20:写OBU |
|
|
|
console.log("5201",res) |
|
|
|
console.log("5201", res) |
|
|
|
let str = res[2].substring(res[2].length - 4, res[2].length); //判断是否为9000 |
|
|
|
let str3 = res[3].substring(res[3].length - 4, res[3].length); //判断是否为9000 |
|
|
|
if (str == "9000" || str3 == "9000") { |
|
|
@@ -404,19 +428,19 @@ |
|
|
|
return; |
|
|
|
} |
|
|
|
alertF("CMD_READBINARY指令长度不符" + res[2]); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}; |
|
|
|
const errorLog = (cmd,error,step) => { |
|
|
|
const errorLog = (cmd, error, step) => { |
|
|
|
console.log('激活异常提交') |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: { |
|
|
|
cardId:card.cardId, |
|
|
|
obuId:obu.obuId, |
|
|
|
orderType:"1", |
|
|
|
factory:datas.getData("deviceName")+"_"+datas.getData("deviceNameZW"), |
|
|
|
orderNo:orderInfo.orderNo, |
|
|
|
cardId: card.cardId, |
|
|
|
obuId: obu.obuId, |
|
|
|
orderType: "1", |
|
|
|
factory: datas.getData("deviceName") + "_" + datas.getData("deviceNameZW"), |
|
|
|
orderNo: orderInfo.orderNo, |
|
|
|
cmd, |
|
|
|
error, |
|
|
|
step |
|
|
@@ -426,7 +450,7 @@ |
|
|
|
}; |
|
|
|
requestNew(errorLogAdd, options).then((res) => { |
|
|
|
console.log("错误提交成功", res); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}; |
|
|
|
/** |
|
|
@@ -439,7 +463,7 @@ |
|
|
|
console.log(cmdArr); |
|
|
|
console.log(bluetoothUtil); |
|
|
|
bluetoothUtil.transCmd(cmdArr, '10', function(res) { //10:写卡 20:写OBU |
|
|
|
console.log("5201",res) |
|
|
|
console.log("5201", res) |
|
|
|
let str = res[2].substring(res[2].length - 4, res[2].length); //判断是否为9000 |
|
|
|
let str3 = res[3].substring(res[3].length - 4, res[3].length); //判断是否为9000 |
|
|
|
if (str == "9000" || str3 == "9000") { |
|
|
@@ -453,10 +477,10 @@ |
|
|
|
card.money = res[3].substring(0, 8); |
|
|
|
card.v_userType = parseInt(res[2].substring(80, 82), 16); |
|
|
|
console.log("card.v_userType", card.v_userType) |
|
|
|
decryptCardVehicleInformation(res[2].substring(56, 80), function (res) { |
|
|
|
card.vehiclePlate =res; |
|
|
|
decryptCardVehicleInformation(res[2].substring(56, 80), function(res) { |
|
|
|
card.vehiclePlate = res; |
|
|
|
}); |
|
|
|
console.log("res[2].substring(18, 19)",res[2].substring(18, 20)) |
|
|
|
console.log("res[2].substring(18, 19)", res[2].substring(18, 20)) |
|
|
|
if (res[2].substring(18, 19) >= 4) { |
|
|
|
//4x卡 |
|
|
|
card.type = parseInt(res[2].substring(84, 86), 16); |
|
|
@@ -466,7 +490,7 @@ |
|
|
|
} else { |
|
|
|
//2x卡--获取车牌颜色 |
|
|
|
card.type = "--"; |
|
|
|
card.color =parseInt(res[2].substring(82, 84), 16) |
|
|
|
card.color = parseInt(res[2].substring(82, 84), 16) |
|
|
|
card.colorStr = getVehiclePlateColor(parseInt(res[2].substring(82, 84), 16)) |
|
|
|
card.typeStr = getVehicleType(parseInt(res[2].substring(84, 86), 16)); |
|
|
|
} |
|
|
@@ -478,18 +502,20 @@ |
|
|
|
let str2 = res[1].substring(res[1].length - 4, res[1].length); |
|
|
|
if (str2 == "9000") { |
|
|
|
if (res[1].length > 108) { |
|
|
|
console.log("res====",res) |
|
|
|
decryptCardVehicleInformation(res[1].substring(4, 44), function (res) { |
|
|
|
card.userName = res; //姓名 |
|
|
|
card.userNameStr = card.userName[0] + '*'.repeat(card.userName.length - 1) |
|
|
|
console.log("res====", res) |
|
|
|
decryptCardVehicleInformation(res[1].substring(4, 44), function(res) { |
|
|
|
card.userName = res; //姓名 |
|
|
|
card.userNameStr = card.userName[0] + '*'.repeat(card |
|
|
|
.userName.length - 1) |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
decryptCardVehicleInformation(res[1].substring(44, 108), function (res) { |
|
|
|
card.idNum = res; //身份证号码 |
|
|
|
card.idNumStr=res.replace(/^\d{14}/,'**************') |
|
|
|
|
|
|
|
|
|
|
|
decryptCardVehicleInformation(res[1].substring(44, 108), function( |
|
|
|
res) { |
|
|
|
card.idNum = res; //身份证号码 |
|
|
|
card.idNumStr = res.replace(/^\d{14}/, '**************') |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//获取是否有优惠 |
|
|
|
let cmdArr3 = [cmd.HOME_DIRECTORY, cmd.APPLICATION_DIRECTORY, cmd |
|
|
|
.CMD_00B08E0000 |
|
|
@@ -501,7 +527,7 @@ |
|
|
|
if (res[2].length > 131) { |
|
|
|
let _str = parseInt(res[2].substring(129, 130), |
|
|
|
16); |
|
|
|
card.favourable=_str |
|
|
|
card.favourable = _str |
|
|
|
switch (_str) { |
|
|
|
case 0: |
|
|
|
card.favourableStr = "否"; |
|
|
@@ -516,7 +542,7 @@ |
|
|
|
//回调读取OBU指令 |
|
|
|
getObuIdCommit() |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
alertF("CMD_00B08E0000指令长度不符" + res[2]); |
|
|
|
} |
|
|
@@ -537,7 +563,7 @@ |
|
|
|
return; |
|
|
|
} |
|
|
|
alertF("CMD_READBINARY指令长度不符" + res[2]); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}; |
|
|
|
/** |
|
|
@@ -550,19 +576,19 @@ |
|
|
|
let str = res[1].substring(res[1].length - 4, res[1].length); |
|
|
|
if (str == "9000") { |
|
|
|
if (res[1].length > 52) { |
|
|
|
|
|
|
|
|
|
|
|
obu.num = res[1].substring(20, 36); |
|
|
|
obu.startTime = res[1].substring(36, 44); |
|
|
|
obu.endTime = res[1].substring(44, 52); |
|
|
|
obu.version = res[1].substring(18, 20); |
|
|
|
obu.isJH = res[1].substring(53, 54) |
|
|
|
obu.isJHStr = res[1].substring(53, 54) == "1" ? "是" : res[1].substring(53, 54) == "0" ? |
|
|
|
"否" : "其他:" + res[1].substring(53, 54); |
|
|
|
obu.loadStatus=res[1].substring(52, 54)=='01'?'正常':'已拆卸', |
|
|
|
|
|
|
|
console.log("开始执行车辆信息识读"); |
|
|
|
let rand = res[1].substring(18, 20) >= 50?'40':'00'; |
|
|
|
var arr = [cmd.OBU_DF01, '00B400000A000000000000000045'+ rand]; |
|
|
|
"否" : "其他:" + res[1].substring(53, 54); |
|
|
|
obu.loadStatus = res[1].substring(52, 54) == '01' ? '正常' : '已拆卸', |
|
|
|
|
|
|
|
console.log("开始执行车辆信息识读"); |
|
|
|
let rand = res[1].substring(18, 20) >= 50 ? '40' : '00'; |
|
|
|
var arr = [cmd.OBU_DF01, '00B400000A000000000000000045' + rand]; |
|
|
|
bluetoothUtil.transCmd(arr, '20', function(res) { |
|
|
|
console.log(res); |
|
|
|
console.log("开始执行车辆信息识读成功"); |
|
|
@@ -573,10 +599,10 @@ |
|
|
|
let proviceCode = '5201'; |
|
|
|
if (str2 == "9000") { |
|
|
|
console.log("===========", obu.num, res[1].substring(0, res[1].length - 4)) |
|
|
|
decryptObuVehicleInfo(obu.num, res[1].substring(0, res[1].length - 4), |
|
|
|
obuVersion, rand, reqType, proviceCode, |
|
|
|
decryptObuVehicleInfo(obu.num, res[1].substring(0, res[1].length - 4), |
|
|
|
obuVersion, rand, reqType, proviceCode, |
|
|
|
function(res) { |
|
|
|
|
|
|
|
|
|
|
|
obu.approvedCount = res.approvedCount; |
|
|
|
obu.axleCount = res.axleCount; |
|
|
|
obu.axleDistance = res.axleDistance; |
|
|
@@ -584,21 +610,23 @@ |
|
|
|
obu.type = res.collectionType; |
|
|
|
obu.typeStr = getVehicleType(res.collectionType); |
|
|
|
obu.userType = res.userType; |
|
|
|
if(res.userType == 0){ |
|
|
|
obu.userTypeStr = "普通车" ; |
|
|
|
}else if(res.userType == 6){ |
|
|
|
obu.userTypeStr = "公务车" ; |
|
|
|
if (res.userType == 0) { |
|
|
|
obu.userTypeStr = "普通车"; |
|
|
|
} else if (res.userType == 6) { |
|
|
|
obu.userTypeStr = "公务车"; |
|
|
|
} |
|
|
|
obu.vehiclePlate = res.vehiclePlate.replace(/\u0000/g, ''); |
|
|
|
//获取车牌颜色 |
|
|
|
obu.vehiclePlateColor = res.vehiclePlateColor; |
|
|
|
obu.vehiclePlateColorStr = getVehiclePlateColor(res.vehiclePlateColor); |
|
|
|
obu.vehiclePlateColorStr = getVehiclePlateColor(res |
|
|
|
.vehiclePlateColor); |
|
|
|
obu.vin = res.vin.replace(/\u0000/g, ''); |
|
|
|
obu.wheelCount = res.wheelsCount; |
|
|
|
obu.outsideDimensions = res.carLong + "x" + res.carWidth + "x" + res.carHeight |
|
|
|
obu.outsideDimensions = res.carLong + "x" + res.carWidth + |
|
|
|
"x" + res.carHeight |
|
|
|
getObuList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tools.hideLoadingAlert(); |
|
|
|
}); |
|
|
|
//断开蓝牙 |
|
|
@@ -609,7 +637,7 @@ |
|
|
|
} |
|
|
|
alertF("OBU_00B400000A+rand+OBU_4F00指令长度不符" + res[1]); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
alertF("OBU_SYSTEM_FILE指令长度不符" + res[1]); |
|
|
|
} |
|
|
@@ -621,7 +649,7 @@ |
|
|
|
const getObuList = () => { |
|
|
|
var data = { |
|
|
|
obuId: obu.num, |
|
|
|
cardId:card.cardNo, |
|
|
|
cardId: card.cardNo, |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
@@ -632,21 +660,21 @@ |
|
|
|
requestNew(cardObuQuery, options).then((res) => { |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
let result = res; |
|
|
|
state.obuStatus = result.obuStatus?result.obuStatus:"" |
|
|
|
state.obuStatus = result.obuStatus ? result.obuStatus : "" |
|
|
|
state.cardStatus = result.cardStatus |
|
|
|
if (result.cardType == 1 && result.debitType == 1) { |
|
|
|
state.cardTypeName = "预存卡" |
|
|
|
card['cardTypeName']=3 |
|
|
|
card['cardTypeName'] = 3 |
|
|
|
} else if (result.cardType == 2) { |
|
|
|
state.cardTypeName = "储值卡" |
|
|
|
card['cardTypeName']=2 |
|
|
|
card['cardTypeName'] = 2 |
|
|
|
} else { |
|
|
|
state.cardTypeName = "记账卡" |
|
|
|
card['cardTypeName']=1 |
|
|
|
card['cardTypeName'] = 1 |
|
|
|
} |
|
|
|
// 卡签提交得信息 |
|
|
|
card['cardStatus']=result.cardStatus |
|
|
|
obu['obuStatus']=result.obuStatus?result.obuStatus:"" |
|
|
|
card['cardStatus'] = result.cardStatus |
|
|
|
obu['obuStatus'] = result.obuStatus ? result.obuStatus : "" |
|
|
|
cardObuMsgUp() |
|
|
|
}) |
|
|
|
} |
|
|
@@ -654,8 +682,8 @@ |
|
|
|
const cardObuMsgUp = () => { |
|
|
|
var data = { |
|
|
|
cardLogInfo: card, |
|
|
|
obuLogInfo:obu, |
|
|
|
type:"active" |
|
|
|
obuLogInfo: obu, |
|
|
|
type: "active" |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
@@ -672,7 +700,7 @@ |
|
|
|
/** |
|
|
|
* 解密OBU车辆信息 |
|
|
|
*/ |
|
|
|
const decryptObuVehicleInfo = (num, data,obuVersion, keyIndex, reqType, proviceCode, func) => { |
|
|
|
const decryptObuVehicleInfo = (num, data, obuVersion, keyIndex, reqType, proviceCode, func) => { |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: { |
|
|
@@ -686,8 +714,8 @@ |
|
|
|
showLoading: true, |
|
|
|
}; |
|
|
|
requestNew(obuFileDataDecrypt, options).then((res) => { |
|
|
|
console.log("obuFileDataDecrypt",res) |
|
|
|
const data =res |
|
|
|
console.log("obuFileDataDecrypt", res) |
|
|
|
const data = res |
|
|
|
func(data) |
|
|
|
}); |
|
|
|
}; |
|
|
@@ -766,7 +794,7 @@ |
|
|
|
color: white; |
|
|
|
font-size: 32rpx; |
|
|
|
text-align: center; |
|
|
|
background: linear-gradient(to right,#01243A,#004576); |
|
|
|
background: linear-gradient(to right, #01243A, #004576); |
|
|
|
border-radius: 40rpx; |
|
|
|
outline: none; |
|
|
|
border: #4cd95f; |
|
|
@@ -804,10 +832,11 @@ |
|
|
|
font-size: 34rpx; |
|
|
|
border-radius: 20rpx; |
|
|
|
} |
|
|
|
.mask{ |
|
|
|
|
|
|
|
.mask { |
|
|
|
width: 100%; |
|
|
|
height:100vh; |
|
|
|
background:rgba(0,0,0,0.63); |
|
|
|
height: 100vh; |
|
|
|
background: rgba(0, 0, 0, 0.63); |
|
|
|
position: fixed; |
|
|
|
left: 0; |
|
|
|
top: 0; |