修改
This commit is contained in:
parent
02f675c30c
commit
604ab51ae3
@ -31,6 +31,9 @@
|
|||||||
import {
|
import {
|
||||||
savehr
|
savehr
|
||||||
} from '@/api/examinationapi/add.js'
|
} from '@/api/examinationapi/add.js'
|
||||||
|
import {
|
||||||
|
bound,
|
||||||
|
} from '@/api/examinationapi/add.js'
|
||||||
import {
|
import {
|
||||||
dzsocketurl,
|
dzsocketurl,
|
||||||
dysocketurl
|
dysocketurl
|
||||||
@ -52,7 +55,11 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
res.data.forEach(e => {
|
res.data.forEach(e => {
|
||||||
if (e.deviceType == 1) {
|
if (e.deviceType == 1) {
|
||||||
this.SOCKETURL = `ws://112.6.122.71:8009/fd/webSocket/${e.sn}`
|
if (uni.getStorageSync('region') == 1) {
|
||||||
|
this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||||
|
} else if (uni.getStorageSync('region') == 2) {
|
||||||
|
this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||||
|
}
|
||||||
this.scoket();
|
this.scoket();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -305,4 +312,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -75,15 +75,16 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
res.data.forEach(e => {
|
res.data.forEach(e => {
|
||||||
if (e.deviceType == 1) {
|
if (e.deviceType == 1) {
|
||||||
this.SOCKETURL = `ws://112.6.122.71:8009/fd/webSocket/${e.sn}`
|
if (uni.getStorageSync('region') == 1) {
|
||||||
|
this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||||
|
} else if (uni.getStorageSync('region') == 2) {
|
||||||
|
this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||||
|
}
|
||||||
this.scoket();
|
this.scoket();
|
||||||
// 德州的用:ws://112.6.122.71:8009/fd/webSocket/{sn}
|
|
||||||
// 东营的用:ws://218.58.213.15:8009/fd/webSocket/{sn}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
@ -330,4 +331,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -63,8 +63,6 @@
|
|||||||
timeoutObj: null,
|
timeoutObj: null,
|
||||||
socketOpen: false,
|
socketOpen: false,
|
||||||
SOCKETURL: '',
|
SOCKETURL: '',
|
||||||
// 德州的用:ws://112.6.122.71:8009/fd/webSocket/{sn}
|
|
||||||
// 东营的用:ws://218.58.213.15:8009/fd/webSocket/{sn}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -72,7 +70,11 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
res.data.forEach(e => {
|
res.data.forEach(e => {
|
||||||
if (e.deviceType == 2) {
|
if (e.deviceType == 2) {
|
||||||
this.SOCKETURL = `ws://112.6.122.71:8009/fd/webSocket/${e.sn}`
|
if (uni.getStorageSync('region') == 1) {
|
||||||
|
this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||||
|
} else if (uni.getStorageSync('region') == 2) {
|
||||||
|
this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||||
|
}
|
||||||
this.scoket();
|
this.scoket();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -322,4 +324,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user