From 8c51de06d839339f428ca0691099fe60740765cf Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Sat, 05 Jul 2025 18:36:11 +0800
Subject: [PATCH] style

---
 src/views/cryptos/PerpetualContract/index.vue |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/views/cryptos/PerpetualContract/index.vue b/src/views/cryptos/PerpetualContract/index.vue
index e3446bb..c1a3290 100644
--- a/src/views/cryptos/PerpetualContract/index.vue
+++ b/src/views/cryptos/PerpetualContract/index.vue
@@ -84,11 +84,12 @@
           </div>
         </section>
         <div class="mainBackground rounded-view" key="x">
-          <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol"
+          <!-- 永续合约 -->
+          <!-- <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol"
             :green-data="bids" :red-data="asks" :price="price" :init-open="initOpen" :init-close="initClose"
             :init-futrue="initFutrue" :currentType="currentType" @changeValueBack="changeValueBack"
             @changeCurrentType="changeCurrentType" @ordered="onOrdered">
-          </PerpetualOpen>
+          </PerpetualOpen> -->
           <div class="line"></div>
           <!-- 委托/持仓-->
           <PerpetualOrder class="pl-30 pr-30" :key="keyIndex + 'b'" :symbol="symbol" :order-cur="orderCur"
@@ -449,15 +450,13 @@
       this.clearTimer()
       // this.clearTimeout()
       this.initParam(this.symbol, evt) // 重新初始化
-      // TODO: 这里要做判断
-      if (this.selectIndex / 1 === 1) {
-        this[this.curTab](this.symbol) // 重新调取记录
-        console.log('this.curTab', this.curTab)
-      } else { // 交割合约
-        this[this.curTab](this.symbol)
-        // this.show = true
-        console.log('curTab', evt, this.curTab)
-
+        // 判断方法是否存在
+      const fn = this[this.curTab];
+      if (typeof fn === 'function') {
+        fn.call(this, this.symbol);
+        console.log('[onOrdered] 调用方法:', this.curTab, '参数:', this.symbol, '事件:', evt);
+      } else {
+        console.warn(`[onOrdered] curTab 方法不存在: ${this.curTab}`);
       }
       //console.log('下单后更新数据')
     },

--
Gitblit v1.9.3