lxf
2025-07-04 5ef5f50d09b49795c4cc9ca017294cbb74083cae
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'
  }
})