lxf
2025-07-05 8c51de06d839339f428ca0691099fe60740765cf
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"
@@ -187,8 +188,8 @@
    </div>
    <div class="fixed-box">
      <div class="flex justify-between items-center px-30 py-20" @click.stop="handleClickShowKlineChart()">
        <span class="font-30  textColor2">{{ symbol.toUpperCase() }}&nbsp;&nbsp;{{ $t('k线图表') }}</span>
        <van-icon class="textColor font-20" :name="showCharts ? 'arrow-down' : 'arrow-up'"></van-icon>
        <span class="font-30  textColor2" style="color:#fff;">{{ symbol.toUpperCase() }}&nbsp;&nbsp;{{ $t('k线图表') }}</span>
        <van-icon class="font-30" style="color:#fff;" :name="showCharts ? 'arrow-down' : 'arrow-up'"></van-icon>
      </div>
      <!-- <section class="indicator-index-container" v-if="showKlineChart">
        <div class="indicator-index-box">
@@ -449,20 +450,18 @@
      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('下单后更新数据')
    },
    onTab(evt) { // 点击tab后的回调
      console.log('evt', evt)
      console.log('evt2', evt)
      this.clearTimer()
      // this.clearTimeout()
      this.curTab = evt