1
李凌
4 days ago 416ef077b916de27c88439d2fb679691e85df743
src/page/kline/index.vue
@@ -150,7 +150,7 @@
                  >₹{{ singDetails.preclose_px   }}</span
                >
              </div>
              <div class="rights bots">
               <div class="rights bots">
                <span class="titles">{{ $t("hj75") }}</span>
                <!-- <span :class="singDetails.preclose_px < 0 ? 'number green' : 'number red'">{{
                    singDetails.today_min
@@ -167,7 +167,7 @@
        </div>
      </div>
      <div class="k_line_detail">
        <Kline :type="singDetails.type" />
        <Kline :key="key" :type="singDetails.type" />
      </div>
      <div
        class="priect_top_bottom"
@@ -471,6 +471,7 @@
      newsdetailList: [],
      bayType: "",
      timer: null,
      key:0,
    };
  },
  components: {
@@ -485,7 +486,7 @@
    } else {
      this.timer = setInterval(() => {
        this.getSingDetails();
      }, 500);
      }, 2000);
    }
    this.getOpation();
    // this.$Lazyload();
@@ -493,13 +494,19 @@
    this.getNohknews();
  },
  beforeDestroy() {
    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) {
@@ -648,7 +655,7 @@
      }
    },
    handleBackaa() {
      clearInterval(this.timer);
      this.clearStockTimer();
      window.localStorage.removeItem("kLine");
      this.$router.go(-1);
    },
@@ -664,7 +671,7 @@
      });
    },
    goBuy(index) {
      clearInterval(this.timer);
      this.clearStockTimer();
      this.$router.push({
        path: "/TradingBuy",
        query: {
@@ -930,10 +937,10 @@
    .top_now {
      width: 100%;
      // height: 65%;
      font-size: 0.741rem;
      font-size: 25px;
      display: flex;
      align-items: center;
      font-weight: bold;
      span {
        font-weight: 500;
      }