From 872daddd00287cd44963483ba15f997d25a3da53 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Sat, 05 Jul 2025 11:54:34 +0800
Subject: [PATCH] stye

---
 src/components/fx-footer/index.vue |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/components/fx-footer/index.vue b/src/components/fx-footer/index.vue
index 624c19e..c74e5a8 100644
--- a/src/components/fx-footer/index.vue
+++ b/src/components/fx-footer/index.vue
@@ -15,12 +15,12 @@
         </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">
@@ -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