1
李凌
5 days ago 349c48e168b9f2580334422228acde7d1b21bede
src/views/morePage/index.vue
@@ -83,6 +83,7 @@
import { showToast } from "vant";
import { useI18n } from "vue-i18n";
import { useUserStore } from '@/store/user';
import { getStorage, setStorage } from '@/utils/index.js'
const useStore = useUserStore();
const { t } = useI18n()
@@ -93,6 +94,7 @@
    recommend: [
        { name: t('公告中心'), url: new URL('@/assets/theme/dark/image/nav/announcement.png', import.meta.url), path: '/cryptos/announce', isLogin: false },
        { name: t('充值'), url: new URL('@/assets/theme/dark/image/nav/recharge.png', import.meta.url), path: '/cryptos/recharge/rechargeList', isLogin: true },
        { name: t('交割合约'), url: new URL('@/assets/imgs/home/home_8.png', import.meta.url), path: '/trade/index?selectIndex=2', isLogin: false },
        { name: t('提现'), url: new URL('@/assets/theme/dark/image/nav/withdraw.png', import.meta.url), path: '/cryptos/withdraw/withdrawPage', isLogin: true },
        { name: t('账变记录'), url: new URL('@/assets/theme/dark/image/nav/record.png', import.meta.url), path: '/cryptos/accountChange?type=cryptos', isLogin: true },
        // { name: t('质押借币'), url: new URL('@/assets/theme/dark/image/nav/PledgeLoan.png', import.meta.url), path: '/cryptos/pledgeLoan', isLogin: false },
@@ -132,6 +134,11 @@
    }
}
const openUrl = (item) => {
    if (item.path && item.path.includes('/trade/index')) {
        if (!getStorage('symbol')) {
            setStorage('symbol', 'btcusdt')
        }
    }
    if (item.isLogin) {
        if (!useStore.userInfo.token) {
            router.push('/login')