#
whycq
2024-07-23 a19d10e17b289c35ed08203fd63735bcec96cae8
Monitor-APP/pages/home/home.vue
@@ -391,7 +391,8 @@
            swiperList: [],
            timeOut: false,
            times: 0,
            currDate: ''
            currDate: '',
            socketInfo2: ''
         }
      },
      onShow() {
@@ -415,25 +416,44 @@
         // this.getUrl()
      },
      onLoad() {
         this.ws()
         setInterval(()=>{
            this.getServerData()
            this.initlineChart()
            this.initPieChart()
            this.getOther()
            // this.getServerData()
            // this.initlineChart()
            // this.initPieChart()
            // this.getOther()
            // this.getDate()
            this.getDate2()
            // this.getDate2()
            this.getInfo()
            this.getError()
            // this.getError()
            // this.getInfo2()
            // this.getError2()
            this.getUrl()
            this.controller()
            // this.getUrl()
            // this.controller()
            // 测试用
            
         },1000)
      },
      methods: {
         timeOut() {
         ws() {
            let _this = this
            _this.connectWS()
            uni.onSocketOpen(function (res) {
               console.log("Open");
            })
            uni.onSocketClose(function (res) {
               console.log("Close");
               setInterval(()=>{
                  _this.connectWS()
               },1000)
            })
         },
         connectWS() {
            uni.connectSocket({ url: `http://127.0.0.1:9090/pswcs/console/websocket`, })
         },
         timeOut1() {
            console.log(this.times);
         },
         getUrl() {