ソースを参照

激活记录错误日志

master
yangteng 1ヶ月前
コミット
5498c65e37
4個のファイルの変更69行の追加17行の削除
  1. 1
    0
      pages/bluetooth/bluetooth.vue
  2. 33
    12
      static/etcUtil/index.js
  3. 32
    4
      subpackage/after-sale/activation/activate.vue
  4. 3
    1
      utils/network/api.js

+ 1
- 0
pages/bluetooth/bluetooth.vue ファイルの表示

@@ -382,6 +382,7 @@
foundDevices.push(device);
}
}
datas.setData("deviceNameZW", device._name);
deviceList.value = foundDevices;
foundDevices = [];
console.log("deviceList.value", deviceList.value);

+ 33
- 12
static/etcUtil/index.js ファイルの表示

@@ -90,6 +90,12 @@ function disconnectDevice() {
datas.setData("connectPrefixName", "");
});
break;
case "BY":
jyApi.disconnectDevice(function(res) {
datas.setData("bluLinkStatus", false);
datas.setData("connectPrefixName", "");
});
break;
case "JY":
jyApi.disconnectDevice(function(res) {
@@ -177,7 +183,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -190,7 +196,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
// func(res.data);
// } else {
// if (callBack != null) {
// callBack(res.msg);
// callBack(res);
// } else {
// alertF(res.msg);
// }
@@ -207,7 +213,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -222,7 +228,22 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
}
});
break;
case "BY":
console.log('JL执行内容====', cmdArr, type)
jyApi.transCmd(cmdArr, type, function(res) {
console.log('JL执行内容====11111', res)
if (res.code == 0) {
func(res.data);
} else {
if (callBack != null) {
callBack(res);
} else {
alertF(res.msg);
}
@@ -235,7 +256,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -248,7 +269,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -262,7 +283,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -276,7 +297,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -289,7 +310,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -304,7 +325,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -317,7 +338,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
@@ -330,7 +351,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
func(res.data);
} else {
if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}

+ 32
- 4
subpackage/after-sale/activation/activate.vue ファイルの表示

@@ -66,7 +66,7 @@
IntegerToHexString,
} from "@/utils/util/fileData.js";
import {
issueApply,issueCallback,orderDetailQuery
issueApply,issueCallback,orderDetailQuery,errorLogAdd
} from "@/utils/network/api";
import {
agentId
@@ -75,6 +75,7 @@
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 {
getVehiclePlateColor
} from "@/datas/vehiclePlateColor";
@@ -172,7 +173,6 @@
orderId: "",
vehicleClassStr: ""
});

function cmdResult1() {
tools.showLoadingAlert('正在激活,请等待')
const options = {
@@ -196,8 +196,10 @@
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)
tools.hideLoadingAlert();
});
})
@@ -244,7 +246,9 @@
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)
errorLog(datas.cmd,JSON.stringify(err),datas.stepNo)
showModals('在线激活异常')
});
}
@@ -365,6 +369,30 @@
})
};
//获取订单详情
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,
cmd,
error,
step
},
method: "POST",
showLoading: false,
};
requestNew(errorLogAdd, options).then((res) => {
console.log("错误提交成功", res);
});
};
</script>

<style>

+ 3
- 1
utils/network/api.js ファイルの表示

@@ -469,4 +469,6 @@ export const releasePlateaApply = "/iaw/api/afterSale/releasePlate/apply" //解
export const releasePlateaList = "/iaw/api/afterSale/releasePlate/list" //解除车牌占用列表
export const releasePlateaView = "/iaw/api/afterSale/releasePlate/view" //单一订单查询
// 自助工单
export const selfServiceUserAdd = "/iaw/selfService/userAdd" //用户提交 - 新增
export const selfServiceUserAdd = "/iaw/selfService/userAdd" //用户提交 - 新增

export const errorLogAdd = "/iaw/api/active/errorLog/add" //新增错误信息

読み込み中…
キャンセル
保存