From 95e138158db3e61e0be67691a4142f20c561634c Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Tue, 13 Jan 2026 18:50:38 +0800
Subject: [PATCH] 1

---
 src/page/kline/index.vue |   50 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/src/page/kline/index.vue b/src/page/kline/index.vue
index 732090a..e5f51b5 100644
--- a/src/page/kline/index.vue
+++ b/src/page/kline/index.vue
@@ -438,21 +438,15 @@
         </div> -->
       </div>
       <div class="rights">
-        <div class="buy_btn">
+        <!-- <div class="buy_btn">
           <div class="top_buy" @click="goBuy(0)">
             <span>{{ $t("hj84") }}</span>
           </div>
-          <!-- <div class="bottom_buy">
-            <span>{{ singDetails.nowPrice }}</span>
-          </div> -->
-        </div>
+        </div> -->
         <div class="sell_btn" @click="goBuy(1)">
           <div class="top_sell">
             <span>{{ $t("hj85") }}</span>
           </div>
-          <!-- <div class="bottom_sell">
-            <span>{{ singDetails.nowPrice }}</span>
-          </div> -->
         </div>
       </div>
     </div>
@@ -481,7 +475,8 @@
       newsdetailList: [],
       bayType: "",
       timer: null,
-      key: 0
+      key: 0,
+      messageInstances: [] // 保存所有消息提示实例
     };
   },
   components: {
@@ -492,7 +487,6 @@
     // 进入页面的时候清除所以得计时器,防止页面切换的时候出现多个定时器
     let end = setTimeout(function() {}, 0);
     for (let i = 0; i <= end; i++) {
-      clearTimeout(i);
       clearInterval(i);
     }
 
@@ -502,6 +496,7 @@
       this.getSingDetailUs();
     } else {
       this.getSingDetails();
+
       this.timer = setInterval(() => {
         this.getSingDetails();
       }, 5000);
@@ -511,10 +506,24 @@
     this.getNohknews();
   },
   beforeDestroy() {
-    this.clearInterval(this.timer); // 在组件销毁前清除定时器
+    clearInterval(this.timer); // 在组件销毁前清除定时器
+    // 关闭所有消息提示
+    this.messageInstances.forEach(instance => {
+      if (instance && typeof instance.close === 'function') {
+        instance.close();
+      }
+    });
+    this.messageInstances = [];
   },
   destroyed() {
-    this.clearInterval(this.timer); // 在组件销毁前清除定时器
+    clearInterval(this.timer); // 在组件销毁前清除定时器
+    // 确保所有消息提示都已关闭
+    this.messageInstances.forEach(instance => {
+      if (instance && typeof instance.close === 'function') {
+        instance.close();
+      }
+    });
+    this.messageInstances = [];
   },
   // beforeDestroy() {
   //   this.Klinetype = false;
@@ -542,31 +551,35 @@
         if (data.status === 0) {
           this.getOpation();
           this.optionBtn = false;
-          this.$message({
+          const messageInstance = this.$message({
             message: this.$t("hj97"),
             type: "success"
           });
+          this.messageInstances.push(messageInstance);
         } else {
           this.optionBtn = false;
-          this.$message({
+          const messageInstance = this.$message({
             message: data.msg,
             type: "warning"
           });
+          this.messageInstances.push(messageInstance);
         }
       } else {
         let data = await api.addOption({ code: this.kLineDetails.code });
         if (data.status === 0) {
           this.getOpation();
           this.optionBtn = false;
-          this.$message({
+          const messageInstance = this.$message({
             message: this.$t("hj96"),
             type: "success"
           });
+          this.messageInstances.push(messageInstance);
         } else {
-          this.$message({
+          const messageInstance = this.$message({
             message: data.msg,
             type: "warning"
           });
+          this.messageInstances.push(messageInstance);
           this.optionBtn = false;
         }
       }
@@ -1231,11 +1244,12 @@
     }
 
     .sell_btn {
-      width: 50%;
+      width: 100%;
       height: 80%;
       background: #c4d600;
       color: #fff;
-      border-radius: 0 3rem 3rem 0 !important;
+      // border-radius: 0 3rem 3rem 0 !important;
+      border-radius: 3rem  !important;
 
       .top_sell {
         width: 100%;

--
Gitblit v1.9.3