liuyg
2022-02-21 e3dcaeb0180a4e37347ac9ceb44c8a59ae7af37f
App.vue
@@ -27,9 +27,33 @@
            }
         }
      },
      watch: {},
      mounted() {},
      computed: {
         socketValue() {
            return this.$store.state.socketValue;
         }
      },
      watch: {
         socketValue() {
            // console.log(this.socketValue);
            let that = this;
            if (that.socketValue.type === "start") {
               // console.log("任务开启")
               this.$store.commit("addTask", this.socketValue.rid);
            } else if (that.socketValue.type === "stop") {
               // console.log("任务结束")
               this.$store.commit("stopTask", this.socketValue.rid);
            }
         }
      },
      mounted() {
         this.$store.dispatch("connectws");
      },
      onLaunch: function() { //初始化完成时触发(全局只触发一次)
         console.log('第一次进入')
         // Window.say = Window.console;
         // Window.console = function() {
         //    say.log("关闭console")
         // }
         if (WxStorage.get("init") == '') {
            WxStorage.set("init", 'false');
            console.log('第一次进入')
@@ -47,7 +71,7 @@
</script>
<style lang="scss">
   @import 'smallwei/avue/lib/index.css';
   // @import '@smallwei/avue/lib/index.css';
   @import url("/components/feng-parse/parse.css");
   /*uview全局样式*/
   @import "uview-ui/index.scss";