Browse Source

修改

master
453530270@qq.com 2 years ago
parent
commit
e0c23cda20
  1. 6
      public/config.js
  2. 14
      src/views/TycView.vue
  3. 8
      src/views/WhView.vue

6
public/config.js

@ -6,9 +6,9 @@ window.publicConfig = {
// WS_URL_ZL: 'ws://10.97.121.2/zl' // WS_URL_ZL: 'ws://10.97.121.2/zl'
BASE_API:'http://61.144.224.21:8443/api', BASE_API:'http://61.144.224.21:8443/api',
HOSTURL:'http://61.144.224.21', HOSTURL:'http://61.144.224.21',
EVTZL:"./evtzl", EVTZL:"http://61.144.224.21/evtzl",
EVTWH: '/evtwh', EVTWH: 'http://61.144.224.21/evtwh',
EVTTY: '/evtty', EVTTY: 'http://61.144.224.21/evtty',
// socket url // socket url
WS_URL_TY: 'ws://61.144.224.21:8443/ty', WS_URL_TY: 'ws://61.144.224.21:8443/ty',
WS_URL_WH: 'ws://61.144.224.21:8443/wh', WS_URL_WH: 'ws://61.144.224.21:8443/wh',

14
src/views/TycView.vue

@ -444,6 +444,14 @@ export default {
// this.getsckdata() // this.getsckdata()
}, },
methods: { methods: {
aa(){
homeApi.allGroupNum({type:1}).then(res=>{
const tdata = res.data.returnData;
this.tdjg = tdata.day.noRepeatInNum
this.tmjg = tdata.month.noRepeatInNum
this.tyjg = tdata.year.noRepeatInNum
});
},
// 110,210,310 // 110,210,310
// //
csstat(){ csstat(){
@ -893,7 +901,11 @@ export default {
} }
} }
} },
// 退
beforeUnmount() {
ws.close();
}
} }
</script> </script>

8
src/views/WhView.vue

@ -1017,7 +1017,7 @@ export default {
getsckdata() { getsckdata() {
let that = this; let that = this;
const evturl = publicConfig.EVTWH const evturl = publicConfig.EVTWH
ws = new EventSource(evturl); hws = new EventSource(evturl);
// hws = new WebSocket(publicConfig.WS_URL_WH); // hws = new WebSocket(publicConfig.WS_URL_WH);
hws.onopen = function () { hws.onopen = function () {
// console.log("ws connected success!") // console.log("ws connected success!")
@ -1083,8 +1083,8 @@ export default {
}, },
}, },
// beforeUnmount() { beforeUnmount() {
// hws.close(); hws.close();
// } }
} }
</script> </script>
Loading…
Cancel
Save