From 8588fe30f17d0d28190a279aab8675de0dbf1a5b Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Wed, 16 Jul 2025 18:46:29 +0800
Subject: [PATCH] 个人添加图片
---
src/views/cryptos/TrendDetails/index.vue | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/views/cryptos/TrendDetails/index.vue b/src/views/cryptos/TrendDetails/index.vue
index 25845ca..680de1d 100644
--- a/src/views/cryptos/TrendDetails/index.vue
+++ b/src/views/cryptos/TrendDetails/index.vue
@@ -8,7 +8,7 @@
<div class="w-368 h-80 mr-32 font-28 flex justify-center items-center rounded box-border tabBtn"
:class="tab === '1' ? 'activeBtn' : ''" @click="onTab('1')">{{ $t('永续合约') }}</div>
<div class="w-368 h-80 font-28 flex justify-center items-center rounded box-border tabBtn"
- :class="tab === '2' ? 'activeBtn' : ''" @click="onTab('2')">{{ queryType == 'cryptos' ? $t('交割合约') : $t('期货交易')
+ :class="tab === '2' ? 'activeBtn' : ''" @click="onTab('2')">{{ queryType == 'cryptos' ? $t('交割合约') : $t('货币交易')
}}</div>
</div> -->
<!-- 数据区 -->
@@ -16,11 +16,11 @@
<div class="data-index">
<div class="flex flex-1 px-32 mt-40">
<div class="flex flex-col font-22">
- <p class="font-70 font-600" :class="quote.change_ratio > 0 ? 'text-green' : 'text-red'">
+ <p class="font-70 font-600" :class="quote.change_ratio_str > 0 ? 'text-green' : 'text-red'">
{{ quote.close || '--' }}</p>
<p class="font-22 mt-10">≈ {{ currency.currency_symbol }}{{ quote.close ? (quote.close *
currency.rate).toFixed(2) : '--' }}
- <span :class="quote.change_ratio > 0 ? 'text-green' : 'text-red'">{{ quote.change_ratio
+ <span :class="quote.change_ratio_str > 0 ? 'text-green' : 'text-red'">{{ quote.changeRatioStr
||
'--' }}%</span>
</p>
@@ -43,7 +43,8 @@
<p>{{ quote.low || '--' }}</p>
</div>
<div class="flex w-1/2 flex-col justify-between w-220 mt-20">
- <p class="text-grey">{{ queryType == 'cryptos' ? $t('24h成交额') + '(USDT)' : $t('24h成交额') + '(USD)' }}</p>
+ <p class="text-grey">{{ queryType == 'cryptos' ? $t('24h成交额') + '(USDT)' : $t('24h成交额') + '(USD)' }}
+ </p>
<p>{{ (quote.volume * 1).toFixed(2) || '--' }}</p>
</div>
</div>
@@ -72,7 +73,7 @@
<p>{{ $t('买入') }}</p>
<p class="flex justify-between font-22">
<span style="margin-right: -10px;">{{ $t('价格') }}{{ queryType == 'cryptos' ? '(USDT)' : '(USD)'
- }}</span>
+ }}</span>
<span class="buy-title">{{ $t('数量') }}({{ symbolData.toUpperCase() }})</span>
</p>
</li>
@@ -114,7 +115,8 @@
<span class="flex-1">{{ $t('时间') }}</span>
<span class="flex-1">{{ $t('方向') }}</span>
<span class="flex-1">{{ $t('价格') }}{{ queryType == 'cryptos' ? '(USDT)' : '(USD)' }}</span>
- <span class="flex-1 flex justify-center buy-title">{{ $t('数量') }}({{ symbolData.toUpperCase() }})</span>
+ <span class="flex-1 flex justify-center buy-title">{{ $t('数量') }}({{ symbolData.toUpperCase()
+ }})</span>
</li>
<li v-for="(item, index) in deals" :key="item.ts + item.price + item.amount || index"
class="flex justify-between mt-30">
@@ -213,10 +215,11 @@
</div>
</div>
<van-popup v-model:show="show" class="rounded-2xl" :key="initFutrue.session_token">
- <popup-confirm-order :paras="initFutrue.para" :symbol="symbol" :direction="direction" :balance="initFutrue.amount"
- :price="quote.close" @close="onClose" @confirm="onOrderConfirm" v-if="popType === 'confirm'" />
+ <popup-confirm-order :paras="initFutrue.para" :symbol="symbol" :direction="direction"
+ :balance="initFutrue.amount" :price="quote.close" @close="onClose" @confirm="onOrderConfirm"
+ v-if="popType === 'confirm'" />
<popup-delivery showBtns :detailData="detailData" :key="detailData.order_no" @close="onClose"
- @continueToBuy="order()" @timeEnd="handleTimeEnd" :price="quote.close" v-else />
+ @continueToBuy="order" @timeEnd="handleTimeEnd" :price="quote.close" v-else />
</van-popup>
</div>
</div>
@@ -335,6 +338,7 @@
}
},
order() {
+ console.log('order', this.direction)
this.onSubmit(this.direction);
},
onTab(e) {
@@ -443,7 +447,7 @@
})
return
} else {
- this.$router.push(`/cryptos/perpetualContract/${this.symbol}`)
+ this.$router.push(`/cryptos/perpetualContract/${this.symbol}?type=cryptos&selectIndex=2`)
}
},
onClose() {
@@ -525,6 +529,7 @@
this.sockets.quote = null
this.sockets.deals = null
this.sockets.askBid = null
+ clearTimeout(this.timeout)
},
beforeRouteEnter(to, from, next) {
const { params: { symbol } } = to
@@ -551,7 +556,7 @@
}
:deep(.van-tabs__nav) {
- background-color: $night !important;
+ // background-color: $night !important;
}
@keyframes animate1 {
--
Gitblit v1.9.3