From 264ae424801ec3d1a1d6046121ecf3884deea069 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Tue, 15 Jul 2025 11:36:04 +0800
Subject: [PATCH] Merge branch 'dev6.19' of http://124.156.157.155:8060/r/composite_h5-main into dev6.19
---
src/components/Transform/contract-header/index.vue | 50 ++++++++++++++++++++++++--------------------------
1 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/src/components/Transform/contract-header/index.vue b/src/components/Transform/contract-header/index.vue
index f5e146d..31ab660 100644
--- a/src/components/Transform/contract-header/index.vue
+++ b/src/components/Transform/contract-header/index.vue
@@ -12,12 +12,11 @@
<div class="font-35">{{ symbolName.toUpperCase() || '--' }}</div>
<div class="ml-15 font-28">{{ title }}</div>
</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/public/record.png" alt="record-img" class="w-64 h-35 pr-30 record-img"
- @click="goHistory" />
+ <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/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"
@@ -60,13 +59,12 @@
<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>
+ <div class="mt-10 font-28" :class="item.change_ratio > 0 ? 'text-green' : 'text-red'">{{ item.change_ratio
+ }}%</div>
</div>
</div>
</div>
@@ -123,7 +121,7 @@
myCoinList: 'qoutes/coinList'
}),
title() {
- return [this.$t('永续'), this.$t('交割')][this.selectIndex - 1]
+ return [this.$t('永续'), this.$t('兑换')][this.selectIndex - 1]
}
},
data() {
@@ -149,21 +147,21 @@
}
},
methods: {
- goHistory() {
- if (this.$store.state.user.userInfo.token) {
- let type = 'cryptos'
- 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')
- }
-
- },
+ 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