Commit 83c522c1 authored by xxx's avatar xxx

1

parent eae6ce45
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script src="https://cdn.bootcss.com/eruda/1.5.8/eruda.min.js"></script> <script src="https://cdn.bootcss.com/eruda/1.5.8/eruda.min.js"></script>
<script> <script>
//eruda.init(); eruda.init();
</script> </script>
<!-- <title><%= htmlWebpackPlugin.options.title %></title> --> <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
......
...@@ -72,16 +72,45 @@ export default { ...@@ -72,16 +72,45 @@ export default {
this.getCookie(); this.getCookie();
}, },
mounted() { mounted() {
if (window.plus) { //app获取设备号方法
this.plusReady(); this.appGetDeviceId();
} else { //5+app获取OAID方法
document.addEventListener('plusready', this.plusReady, false); // if (window.plus) {
} // this.plusReady();
// } else {
// document.addEventListener('plusready', this.plusReady, false);
// }
}, },
components: { components: {
// Keyboard // Keyboard
}, },
methods: { methods: {
//app获取设备号方法
appGetDeviceId(){
let appDeviceId1 = window.Device.getDeviceId();
if(appDeviceId1){
console.log('app设备号',appDeviceId1);
that.deviceOAID = appDeviceId1;
//查询设备表是否存在该设备编号
httpGet(apiEquipmentQuery,{name:that.deviceOAID}).then((resSheiBei) => {
if(resSheiBei.code == 200 && resSheiBei.data.totalElements != 0){
//查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery,{equipmentName:that.deviceOAID}).then((resCar) => {
if(resCar.code == 200 && resCar.data.totalElements != 0){
that.bindingStatus = true;
}else{
that.bindingStatus = false;
}
})
}else{
httpPostForJson(apiEquipmentQuery,{name:that.deviceOAID,status:'正常'}).then((res)=>{
that.bindingStatus = false;
})
}
});
}
},
//5+app获取OAID方法
plusReady(){ plusReady(){
let that = this; let that = this;
plus.device.getOAID({ plus.device.getOAID({
......
...@@ -256,8 +256,8 @@ export default { ...@@ -256,8 +256,8 @@ export default {
}, },
//初始化weosocket //初始化weosocket
initWebSocketIndex(){ initWebSocketIndex(){
//const wsuri1 = "ws://192.168.0.105:9095/ws";//连接地址,可加参数 const wsuri1 = "ws://192.168.0.105:9095/ws";//连接地址,可加参数
const wsuri1 = "ws://8.143.203.103:9095/ws";//连接地址,可加参数 //const wsuri1 = "ws://8.143.203.103:9095/ws";//连接地址,可加参数
this.websocketIndex = new WebSocket(wsuri1); this.websocketIndex = new WebSocket(wsuri1);
this.websocketIndex.onopen = this.websocketonopenIndex; this.websocketIndex.onopen = this.websocketonopenIndex;
this.websocketIndex.onerror = this.websocketonerrorIndex; this.websocketIndex.onerror = this.websocketonerrorIndex;
...@@ -280,7 +280,7 @@ export default { ...@@ -280,7 +280,7 @@ export default {
if(e == undefined){ if(e == undefined){
return return
}else{ }else{
console.log("indexWebsocketMessage",e.data); //console.log("indexWebsocketMessage",e.data);
if(this.antennaConnectorBoolean){ if(this.antennaConnectorBoolean){
//this.getSerialSendIndex(e.data) //this.getSerialSendIndex(e.data)
}else{ }else{
......
...@@ -49,7 +49,7 @@ module.exports = { ...@@ -49,7 +49,7 @@ module.exports = {
// }, // },
}, },
//https: true, https: true,
}, },
configureWebpack: { configureWebpack: {
plugins: [ plugins: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment