这段代码的意思是在组件初始化时执行以下操作:

  1. 设置一个定时器,在1800000毫秒(30分钟)后执行this.$router.go(0),即刷新当前页面。
  2. 调用this.$store.dispatch("app/toggleSideBars")方法,触发app模块下的toggleSideBars action。
  3. 将this.$store.getters.socketMsgs的值赋给this.allData。
  4. 调用article_list()方法。
  5. 调用order_lists()方法。
  6. 尝试调用this.$store.dispatch("websocket/webSocketSend")方法,向服务器发送一条消息,类型为"admin",状态为"fill_from"。
  7. 如果上述调用出错,则在2秒后再次尝试调用this.$store.dispatch("websocket/webSocketSend")方法。
setTimeout = this$routergo0 1800000 this$storedispatchapptoggleSideBars thisallData = this$storegetterssocketMsgs thisarticle_list thisorder_lists thisopenWebsocket; try

原文地址: https://www.cveoy.top/t/topic/iNhJ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录