| | |
| | | <van-swipe-item><img src="@/assets/imgs/home/Slider-4.jpg" alt=""></van-swipe-item> |
| | | </van-swipe> --> |
| | | |
| | | <video autoplay loop muted playsinline class="home_logo"> |
| | | <van-swipe v-if="bannerList.length" class="home_logo" :autoplay="3000" indicator-color="white"> |
| | | <van-swipe-item v-for="(item, index) in bannerList" :key="index"> |
| | | <img :src="item.image" alt="" @click="onBannerClick(item.url)" class="banner-img" /> |
| | | </van-swipe-item> |
| | | </van-swipe> |
| | | <video v-else autoplay loop muted playsinline class="home_logo"> |
| | | <source src="@/assets/video/home_1.mp4" type="video/mp4"> |
| | | </video> |
| | | |
| | |
| | | </div> --> |
| | | |
| | | <div id="cryptos" class="pt-10"> |
| | | <list-quatation :listData="qList" :tabShow="false" :tabActive="2" /> |
| | | <list-quatation :listData="qList" :tabShow="false" :tabActive="0" /> |
| | | </div> |
| | | |
| | | <van-popup v-model:show="item.showPopUp" style="border-radius:10px;" :close-on-click-overlay="false" |
| | |
| | | import { useRouter } from 'vue-router'; |
| | | import ListQuatation from "@/components/Transform/list-quotation/index.vue"; |
| | | import { _getHomeList } from '@/service/cryptos.api' |
| | | import { _getNewsList1, _getPopupNews } from '@/service/user.api' |
| | | import { _getNewsList1, _getPopupNews, _getBanner } from '@/service/user.api' |
| | | import { useStore } from "vuex"; |
| | | import { TIME_OUT, customerServiceUrl } from "@/config"; |
| | | import { useUserStore } from '@/store/user'; |
| | |
| | | setStorage('symbol', 'btcusdt'); |
| | | } |
| | | const userStore = useUserStore() |
| | | const { t } = useI18n() |
| | | const { t, locale } = useI18n() |
| | | const router = useRouter() |
| | | const store = useStore(); |
| | | |
| | |
| | | // { key: 1, name: t('跟单'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url) }, |
| | | // { key: 3, name: `C2C ${t('交易')}`, icon: new URL('@/assets/imgs/home/home_3.png', import.meta.url) }, |
| | | // { key: 4, name: t('邀请好友'), icon: new URL('@/assets/imgs/home/home_4.png', import.meta.url) }, |
| | | { key: 5, name: t('合约'), icon: new URL('@/assets/imgs/home/home_5.png', import.meta.url), path: '/trade/index' }, |
| | | { key: 5, name: t('AI Quant'), icon: new URL('@/assets/imgs/home/home_5.png', import.meta.url), path: '/trade/index?selectIndex=2' }, |
| | | { key: 6, name: t('现货'), icon: new URL('@/assets/imgs/home/home_7.png', import.meta.url), path: '/cryptos/trade/btcusdt' }, |
| | | { key: 2, name: t('recharge'), icon: new URL('@/assets/imgs/home/home_2.png', import.meta.url), path: '/cryptos/recharge/rechargeList?isForeign=true' }, |
| | | // { key: 7, name: t('提现'), icon: new URL('@/assets/imgs/home/home_6.png', import.meta.url), path: '/exchange/withdraw-usdt' } |
| | | { key: 7, name: t('提现'), icon: new URL('@/assets/imgs/home/home_6.png', import.meta.url), path: '/cryptos/Withdraw/withdrawPage' }, |
| | | // { key: 8, name: t('卡券中心'), icon: new URL('@/assets/imgs/home/home_7.png', import.meta.url) }, |
| | | { key: 9, name: t('闪兑'), icon: new URL('@/assets/imgs/home/home_8.png', import.meta.url), path: '/cryptos/exchangePage' }, |
| | | { key: 16, name: t('理财'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/cryptos/fund' }, |
| | | // { key: 9, name: t('划转'), icon: new URL('@/assets/imgs/home/home_8.png', import.meta.url), path: '/my/transfer' }, |
| | | // { key: 16, name: t('理财'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/cryptos/fm-home' }, |
| | | { key: 18, name: t('助力贷'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/cryptos/loan' }, |
| | | // { key: 10, name: t('更多'), icon: new URL('@/assets/imgs/home/home_9.png', import.meta.url) }, |
| | | |
| | | // { key: 11, name: "STO", icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/ICO/ico' }, |
| | |
| | | { key: 15, name: t('矿机'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/cryptos/machine' }, |
| | | ] |
| | | |
| | | // 获取公告数据 |
| | | // 首页轮播(后台横幅管理 model=top 配置) |
| | | const bannerList = ref([]) |
| | | const getBannerLanguage = () => { |
| | | if (locale.value === 'en-US') return 'en' |
| | | if (locale.value.indexOf('CN') >= 0) return 'CN' |
| | | return locale.value |
| | | } |
| | | const fetchBannerList = () => { |
| | | _getBanner({ model: 'top', language: getBannerLanguage() }).then(res => { |
| | | bannerList.value = Array.isArray(res) ? res : [] |
| | | }).catch(() => { |
| | | bannerList.value = [] |
| | | }) |
| | | } |
| | | fetchBannerList() |
| | | |
| | | const onBannerClick = (url) => { |
| | | if (!url) return |
| | | if (url.startsWith('http://') || url.startsWith('https://')) { |
| | | window.open(url, '_blank') |
| | | } else { |
| | | router.push(url) |
| | | } |
| | | } |
| | | |
| | | const announceList = ref([]) |
| | | _getNewsList1({ |
| | | language: useI18n().locale.value, |
| | |
| | | margin: 2rem auto 1rem; |
| | | border-radius: 1rem; |
| | | |
| | | img { |
| | | img, .banner-img { |
| | | width: 100%; |
| | | border-radius: 1rem; |
| | | } |
| | | } |
| | | |