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/components/fx-footer/index.vue | 49 +++++++++++++++++++++++++++++--------------------
1 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/src/components/fx-footer/index.vue b/src/components/fx-footer/index.vue
index 624c19e..6f5ee26 100644
--- a/src/components/fx-footer/index.vue
+++ b/src/components/fx-footer/index.vue
@@ -3,24 +3,24 @@
<!-- 底部 bar -->
<van-tabbar route v-model="active" active-color="#1194F7" @change="changeIndex" fixed safe-area-inset-bottom>
<van-tabbar-item name="news" to="/news">
- <span :class="[active === 'news' ? 'active' : '']">{{ $t('首页') }}</span>
+ <span :class="[active === 'news' ? 'active' : 'cor_t1']">{{ $t('首页') }}</span>
<template #icon="props">
<img :src="props.active ? icon.news.active : icon.news.inactive" />
</template>
</van-tabbar-item>
<van-tabbar-item name="quotes" to="/quotes">
- <span :class="[active === 'quotes' ? 'active' : '']">{{ $t('quotes') }}</span>
+ <span :class="[active === 'quotes' ? 'active' : 'cor_t1']">{{ $t('quotes') }}</span>
<template #icon="props">
<img :src="props.active ? icon.quotes.active : icon.quotes.inactive" />
</template>
</van-tabbar-item>
<!-- /foreign -->
- <van-tabbar-item name="trade" to="/foreign/deliveryContract/USDSGD">
+ <!-- <van-tabbar-item name="trade" :to="'/foreign/deliveryContract/'+jgSymbol">
<span :class="[active === 'trade' ? 'active' : '']">{{ $t('trade') }}</span>
<template #icon="props">
- <img :src="props.active ? icon.trade.active : icon.trade.inactive" />
+ <img :src="active === 'trade' ? icon.trade.active : icon.trade.inactive" />
</template>
- </van-tabbar-item>
+ </van-tabbar-item> -->
<!-- <van-tabbar-item name="funds" to="/cryptos/funds">
<span>{{ $t('资金') }}</span>
<template #icon="props">
@@ -28,7 +28,7 @@
</template>
</van-tabbar-item> -->
<van-tabbar-item name="optional" to="/optional">
- <span :class="[active === 'optional' ? 'active' : '']">{{ $t('资产') }}</span>
+ <span :class="[active === 'optional' ? 'active' : 'cor_t1']">{{ $t('资产') }}</span>
<template #icon="props">
<img :src="props.active ? icon.optional.active : icon.optional.inactive" />
</template>
@@ -41,7 +41,7 @@
</template>
</van-tabbar-item> -->
<van-tabbar-item name="mine" to="/my">
- <span :class="[active === 'mine' ? 'active' : '']">{{ $t('my') }}</span>
+ <span :class="[active === 'mine' ? 'active' : 'cor_t1']">{{ $t('my') }}</span>
<template #icon="props">
<img :src="props.active ? icon.mine.active : icon.mine.inactive" />
</template>
@@ -56,9 +56,12 @@
import { useI18n } from "vue-i18n";
import { useRoute } from 'vue-router';
import { watch } from "vue";
+import { getLocalStorageValue } from '@/utils/utis.js'
const { t } = useI18n()
const active = ref('home')
const route = useRoute()
+const jgSymbol = getLocalStorageValue('jgSymbol')
+
if (route.path == "/trade/index") {
active.value = 'trade'
} else if (route.path.indexOf('/quotes') != -1) {
@@ -69,7 +72,8 @@
active.value = 'mine'
} else if (route.path == "/foreign/index") {
active.value = 'optional'
-}else if (route.path == "/foreign/deliveryContract/USDSGD") {
+}else if (route.path.startsWith("/foreign/deliveryContract/")) {
+ console.log('出现了')
active.value = 'trade'
}else if (route.path == "/cryptos/funds") {
active.value = 'funds'
@@ -77,6 +81,7 @@
let quotesStore = useQuotesStore()
watch(() => route.path, (nv) => {
+ console.log('path', route.path)
if (route.path == "/trade/index") {
active.value = 'trade'
} else if (route.path.indexOf('/quotes') != -1) {
@@ -87,35 +92,36 @@
active.value = 'mine'
} else if (route.path == "/optional/index") {
active.value = 'optional'
- }else if (route.path == "/foreign/deliveryContract/USDSGD") {
+ }else if (route.path.startsWith("/foreign/deliveryContract/")) {
+ console.log('出现了')
active.value = 'trade'
}
})
// 底部列表
const icon = {
optional: {
- active: new URL('@/assets/imgs/footer/optional-active.png', import.meta.url),
- inactive: new URL('@/assets/imgs/footer/optional.png', import.meta.url),
+ active: new URL('@/assets/imgs/footer/position-select.png', import.meta.url),
+ inactive: new URL('@/assets/imgs/footer/position-unselect.png', import.meta.url),
},
quotes: {
- active: new URL('@/assets/imgs/footer/quotes-active.png', import.meta.url),
- inactive: new URL('@/assets/imgs/footer/quotes.png', import.meta.url),
+ active: new URL('@/assets/imgs/footer/quotes-select.png', import.meta.url),
+ inactive: new URL('@/assets/imgs/footer/quotes-unselect.png', import.meta.url),
},
news: {
- active: new URL('@/assets/imgs/footer/news-active.png', import.meta.url),
- inactive: new URL('@/assets/imgs/footer/news.png', import.meta.url),
+ active: new URL('@/assets/imgs/footer/home-select.png', import.meta.url),
+ inactive: new URL('@/assets/imgs/footer/home-unselect.png', import.meta.url),
},
trade: {
- active: new URL('@/assets/imgs/footer/trade-active.png', import.meta.url),
- inactive: new URL('@/assets/imgs/footer/trade.png', import.meta.url),
+ active: new URL('@/assets/imgs/footer/position-select.png', import.meta.url),
+ inactive: new URL('@/assets/imgs/footer/position-unselect.png', import.meta.url),
},
// funds: {
// active: new URL('@/assets/imgs/footer/funds-active.png', import.meta.url),
// inactive: new URL('@/assets/imgs/footer/funds.png', import.meta.url),
// },
mine: {
- active: new URL('@/assets/imgs/footer/menu-active.png', import.meta.url),
- inactive: new URL('@/assets/imgs/footer/menu.png', import.meta.url),
+ active: new URL('@/assets/imgs/footer/mine-select.png', import.meta.url),
+ inactive: new URL('@/assets/imgs/footer/mine-unselect.png', import.meta.url),
}
}
const changeIndex = (index) => {
@@ -149,7 +155,10 @@
}
.active {
- color: $blue !important;
+ color: #000 !important;
+}
+.cor_t1{
+ color: #333;
}
.footer {
--
Gitblit v1.9.3