From 59269b6839c57aeb0d547dfd6da38157180483fd Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Tue, 15 Jul 2025 10:56:11 +0800
Subject: [PATCH] 1
---
src/components/Transform/contract-header/index.vue | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/components/Transform/contract-header/index.vue b/src/components/Transform/contract-header/index.vue
index 28d2b42..c4a25fc 100644
--- a/src/components/Transform/contract-header/index.vue
+++ b/src/components/Transform/contract-header/index.vue
@@ -13,7 +13,9 @@
</div>
<div class="pl-10 w-160 font-28" :class="{ 'text-green': range > 0, 'text-red': range <= 0 }">{{ range || '--' }}%</div>
<!-- 右上角小图标 -->
- <img src="@/assets/image/kline.png" class="w-44 h-44 right" alt="" @click="klineJump()">
+ <!-- <img src="@/assets/image/kline.png" class="w-44 h-44 right" alt="" @click="klineJump()"> -->
+ <img src="../../../assets/image/public/record.png" alt="record-img" class="w-44 h-44 right"
+ @click="goHistory" />
</div>
<!-- <div class="flex items-center">
<img src="../../assets/image/public/k-line.png" alt="line-img" class="w-38 h-35"
@@ -56,11 +58,11 @@
<div class="flex justify-between mb-50" v-for="item in list" :key="item.name" @click="onRoute(item)">
<div>
<div class="textColor font-28">{{ item.name }}</div>
- <!-- <div class="text-grey mt-10 font-28">{{ selectIndex == 1 ? $t('永续') : $t('交割') }}</div> -->
+ <!-- <div class="text-grey mt-10 font-28">{{ selectIndex == 1 ? $t('永续') : $t('兑换') }}</div> -->
</div>
<div class="text-right">
<div class="textColor font-28">{{ item.close }}</div>
- <div class="mt-10 font-28" :class="item.change_ratio_str > 0 ? 'text-green' : 'text-red'">{{ item.change_ratio_str
+ <div class="mt-10 font-28" :class="item.change_ratio > 0 ? 'text-green' : 'text-red'">{{ item.change_ratio
}}%</div>
</div>
</div>
@@ -118,7 +120,7 @@
myCoinList: 'qoutes/coinList'
}),
title() {
- return [this.$t('永续'), this.$t('交割')][this.selectIndex - 1]
+ return [this.$t('永续'), this.$t('兑换')][this.selectIndex - 1]
}
},
data() {
@@ -144,6 +146,21 @@
}
},
methods: {
+ goHistory() {
+ if (this.$store.state.user.userInfo.token) {
+ let type = 'forex'
+ if (this.$route.query.type) {
+ type = this.$route.query.type
+ }
+ const url = this.topIndex / 1 === 1 ? '/cryptos/perpetualHistory' : '/cryptos/deliveryContractHistory'
+ this.$router.push({
+ path: url, query: { symbol: this.symbol, type: type }
+ });
+ } else {
+ this.$router.push('/login')
+ }
+
+ },
onRoute(item) {
if (this.$route.params.symbol !== item.symbol) {
this.$router.push(`/cryptos/perpetualContract/${item.symbol}?selectIndex=${this.selectIndex}`)
--
Gitblit v1.9.3