From 411edaf3d05d0a7393e4784ff8f3310a0ccb2196 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sun, 02 Nov 2025 15:33:02 +0800
Subject: [PATCH] 1

---
 src/page/kline/index.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/page/kline/index.vue b/src/page/kline/index.vue
index a3a11f1..5c22296 100644
--- a/src/page/kline/index.vue
+++ b/src/page/kline/index.vue
@@ -481,7 +481,8 @@
       newsdetailList: [],
       bayType: "",
       timer: null,
-      key: 0
+      key: 0,
+      preMarket:0,
     };
   },
   components: {
@@ -489,6 +490,13 @@
   },
 
   created() {
+    // 进入页面的时候清除所以得计时器,防止页面切换的时候出现多个定时器
+    let end = setTimeout(function() {}, 0);
+    for (let i = 0; i <= end; i++) {
+      clearTimeout(i);
+      clearInterval(i);
+    }
+
     const { query } = this.$route;
     this.kLineDetails = query;
     if (query.if_us === "1") {
@@ -497,7 +505,7 @@
       this.getSingDetails();
       this.timer = setInterval(() => {
         this.getSingDetails();
-      }, 5000);
+      }, 2000);
     }
     this.getOpation();
     this.getUserInfo();
@@ -598,7 +606,7 @@
         if (res.status === 0) {
           this.singDetails = res.data.stock;
           this.bayType = res.data.stock.type;
-
+          this.preMarket = res.data.stock.preMarket
           if (res.data.introduction) {
             this.jianjie = res.data.introduction;
           } else {
@@ -688,7 +696,8 @@
           spell: this.singDetails.spell,
           if_us: this.kLineDetails.if_us,
           bayType: this.bayType,
-          gid: this.singDetails.gid
+          gid: this.singDetails.gid,
+          preMarket:this.preMarket
         }
       });
       if (navigator.vibrate) {

--
Gitblit v1.9.3