1
李凌
3 days ago 416ef077b916de27c88439d2fb679691e85df743
src/page/kline/index.vue
@@ -486,7 +486,7 @@
    } else {
      this.timer = setInterval(() => {
        this.getSingDetails();
      }, 5000);
      }, 2000);
    }
    this.getOpation();
    // this.$Lazyload();
@@ -494,13 +494,19 @@
    this.getNohknews();
  },
  beforeDestroy() {
    this.clearInterval(this.timer); // 在组件销毁前清除定时器
    this.clearStockTimer();
  },
  // beforeDestroy() {
  //   this.Klinetype = false;
  //   window.clearInterval()
  // },
  methods: {
    clearStockTimer() {
      if (this.timer) {
        clearInterval(this.timer);
        this.timer = null;
      }
    },
    async getHknews() {
      await api.queryIndexNews().then((res) => {
        if (res.status === 0) {
@@ -649,7 +655,7 @@
      }
    },
    handleBackaa() {
      clearInterval(this.timer);
      this.clearStockTimer();
      window.localStorage.removeItem("kLine");
      this.$router.go(-1);
    },
@@ -665,7 +671,7 @@
      });
    },
    goBuy(index) {
      clearInterval(this.timer);
      this.clearStockTimer();
      this.$router.push({
        path: "/TradingBuy",
        query: {