From 5ef5f50d09b49795c4cc9ca017294cbb74083cae Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Fri, 04 Jul 2025 17:16:07 +0800
Subject: [PATCH] style
---
src/components/fx-footer/index.vue | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/components/fx-footer/index.vue b/src/components/fx-footer/index.vue
index 624c19e..54cca41 100644
--- a/src/components/fx-footer/index.vue
+++ b/src/components/fx-footer/index.vue
@@ -15,10 +15,10 @@
</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 name="funds" to="/cryptos/funds">
@@ -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,7 +92,8 @@
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'
}
})
--
Gitblit v1.9.3