| | |
| | | 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() |
| | |
| | | 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 }, |
| | |
| | | } |
| | | } |
| | | 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') |