From 66a33e936d39ec4db7fdffed5d646e044ccc43e9 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Fri, 18 Apr 2025 10:44:39 +0800
Subject: [PATCH] feat
---
src/components/contract-header/index.vue | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/components/contract-header/index.vue b/src/components/contract-header/index.vue
index ff46e75..ac0f4e7 100644
--- a/src/components/contract-header/index.vue
+++ b/src/components/contract-header/index.vue
@@ -3,24 +3,24 @@
<div>
<div class="contract-header">
<div class="pl-30 pr-30">
- <div class="flex justify-center pt-45 before">
- <div class="flex items-center justify-center ">
+ <div class="flex pt-45 before">
+ <div class="flex items-center ">
<!-- <img :src="require(`@/assets/theme/${theme}/image/icon_back.png`)" class="w-35 h-35 back" alt=""
@click="$router.push(`/trendDetails/${symbol}`)"> -->
- <img :src="require(`@/assets/theme/${theme}/image/convert.png`)" alt="convert-img" class="w-35 h-35"
+ <img :src="require(`@/assets/theme/${theme}/image/convert.png`)" alt="convert-img" class="w-35 h-35"
@click="onSidebar">
<div class="flex pl-21 textColor" @click="onSidebar">
- <div class="font-35">{{ symbol.toUpperCase() || '--' }}/USDT</div>
+ <div class="font-35">{{ symbolname || '--' }}</div>
<div class="ml-15">{{ title }}</div>
</div>
<div class="pl-30 w-160" :class="{ 'text-green': range > 0, 'text-red': range <= 0 }">{{ range > 0 ?
'+' : '' }}{{ range || '--' }}%</div>
- <!-- <img src="@/assets/image/kline.png" class="w-44 h-44 right" alt="" @click="$router.push(`/trendDetails/${symbol}`)"> -->
+ <img src="../../assets/image/public/k-line.png" class="w-44 h-44 right" alt="" @click="$router.push(`/trendDetails/${symbol}`)">
</div>
- <!-- <div class="flex items-center">
- <img src="../../assets/image/public/k-line.png" alt="line-img" class="w-38 h-35"
- @click="jump" />
- </div> -->
+ <div class="flex items-center">
+ <!-- <img src="../../assets/image/public/k-line.png" alt="line-img" class="w-38 h-35"
+ @click="jump" /> -->
+ </div>
</div>
<div class="flex justify-between pt-34">
<button class="tabBtn w-368 h-74 lh-74 border-none rounded"
@@ -75,7 +75,7 @@
import { Popup } from "vant";
import { mapGetters } from "vuex";
import { _getHomeList } from "@/API/home.api";
-import { setStorage } from '@/utils/utis'
+import { getStorage, setStorage } from '@/utils/utis'
export default {
name: "contractHeader",
props: {
@@ -126,12 +126,14 @@
// { name:"BTC/USDT",close:"22042.28",change_ratio:"2.21"},
// { name:"XTZ/USDT",close:"1.568",change_ratio:"-7.1"},
// { name:"ADA/USDT",close:"0.493085",change_ratio:"-4.08"},
- ]
+ ],
+ symbolname:'',
}
},
created() {
// this.coins = this.coinList.map(item => item.symbol)
// console.log('this.coins', this.coins)
+ this.symbolname = getStorage('symbolname')
},
methods: {
onRoute(item) {
@@ -139,6 +141,7 @@
this.$router.push(`/perpetualContract/${item.symbol}`)
this.$emit('update-coin', item.symbol)
setStorage('symbol', item.symbol)
+ setStorage('symbolname', item.name)
this.onClose()
this.$forceUpdate()
}
--
Gitblit v1.9.3