1
李凌
9 days ago 349c48e168b9f2580334422228acde7d1b21bede
src/components/fx-footer/index.vue
@@ -21,8 +21,8 @@
        </template>
      </van-tabbar-item>
      <van-tabbar-item name="STO" to="/ICO/ico">
        <span :class="[active === 'STO' ? 'active' : '']">STO</span>
      <van-tabbar-item name="fund" to="/cryptos/machine">
        <span :class="[active === 'fund' ? 'active' : '']">{{ $t('矿池') }}</span>
        <template #icon="props">
          <img :src="props.active ? icon.sto.active : icon.sto.inactive" />
        </template>
@@ -35,12 +35,12 @@
        </template>
      </van-tabbar-item>
      <!-- <van-tabbar-item name="trade" to="/trade">
      <van-tabbar-item name="trade" to="/trade">
        <span :class="[active === 'trade' ? 'active' : '']">{{ $t('trade') }}</span>
        <template #icon="props">
          <img :src="props.active ? icon.trade.active : icon.trade.inactive" />
        </template>
      </van-tabbar-item> -->
      </van-tabbar-item>
      <!-- <van-tabbar-item name="funds" to="/cryptos/funds">
        <span>{{ $t('资金') }}</span>
@@ -114,8 +114,8 @@
  active.value = 'assets'
} else if (route.path == "/documentation/index") {
  active.value = 'documentation'
} else if (route.path == "/ICO/ico") {
  active.value = 'sto'
} else if (isFundTabPath(route.path)) {
  active.value = 'fund'
}
let quotesStore = useQuotesStore()
@@ -136,10 +136,26 @@
    active.value = 'assets'
  } else if (route.path == "/documentation/index") {
    active.value = 'documentation'
  } else if (route.path == "/ICO/ico") {
    active.value = 'sto'
  } else if (isFundTabPath(route.path)) {
    active.value = 'fund'
  }
})
const fundTabPrefixes = [
  '/cryptos/machine',
  '/cryptos/fm-home',
  '/cryptos/loan',
  '/cryptos/pool-lock',
  '/cryptos/machine-buy',
  '/cryptos/machine-rule',
  '/cryptos/machine-confirm',
  '/cryptos/order-success',
  '/cryptos/loanHistory',
  '/cryptos/loanRule',
]
function isFundTabPath(path) {
  return fundTabPrefixes.some((p) => path === p || path.startsWith(p + '/'))
}
// 底部列表
const icon = {
  // optional: {