1
李凌
2025-09-19 e1e51991ad91c14fa00c5cf46f95e514f676ac4d
src/views/homePage/index.vue
@@ -2,9 +2,21 @@
    <div class="home_page">
        <Head></Head>
        <div class="home_logo flex justify-center"><img src="@/assets/imgs/home/home_logo.png" alt=""></div>
        <div class="text-center font-bold mt-8 logo_text">{{ $t('复制财富,從此刻開始') }}</div>
        <div class="text-center mt-2 logo_text_small">{{ $t('超6000種熱門交易類別,立即註冊领取5000USDT') }}!</div>
        <!-- <div class="home_logo flex justify-center"><img src="@/assets/imgs/home/home_logo.png" alt=""></div> -->
        <!-- <van-swipe class="home_logo" :autoplay="3000" indicator-color="white">
            <van-swipe-item><img src="@/assets/imgs/home/Slider-1.jpg" alt=""></van-swipe-item>
            <van-swipe-item><img src="@/assets/imgs/home/Slider-2.jpg" alt=""></van-swipe-item>
            <van-swipe-item><img src="@/assets/imgs/home/Slider-3.jpg" alt=""></van-swipe-item>
            <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">
            <source src="@/assets/video/home_1.mp4" type="video/mp4">
            您的浏览器不支持 video 标签。
        </video>
        <!-- <div class="text-center font-bold mt-8 logo_text">{{ $t('复制财富,從此刻開始') }}</div>
        <div class="text-center mt-2 logo_text_small">{{ $t('超6000種熱門交易類別,立即註冊领取5000USDT') }}!</div> -->
        <div class="login_buts flex justify-between pl-10 pr-10 pt-10"
@@ -13,14 +25,15 @@
            <div class="login_but_d text-center" @click="toPage('/login')">{{ $t('登录') }}</div>
        </div>
        <div class="home_grid flex justify-between flex-wrap">
        <div class="home_grid flex justify-start flex-wrap">
            <div class="grid_item pt-10" v-for="value in tabbers" :key="value.key" @click="toPage(value.path)">
                <div class="grid_item_img flex justify-center"><img :src="value.icon" alt=""></div>
                <div class="text-center mt-2">{{ value.name }}</div>
            </div>
        </div>
        <van-notice-bar class="font-26 mt-10 index_notice" background="#fafbfc" :scrollable="false" wrapable
        <!-- 新闻 -->
        <!-- <van-notice-bar class="font-26 mt-10 index_notice" background="#fafbfc" :scrollable="false" wrapable
            color="#333333">
            <van-swipe vertical class="notice-swipe" :autoplay="2000" :show-indicators="false">
                <van-swipe-item v-for="item in announceList" :key="item.id" @click="toAnnounceDetail(item.uuid)">
@@ -33,7 +46,7 @@
                    </div>
                </van-swipe-item>
            </van-swipe>
        </van-notice-bar>
        </van-notice-bar> -->
        <!-- <div class="flex justify-between mt-10">
            <van-swipe class="home_swipe_1" :autoplay="2000">
@@ -67,7 +80,7 @@
</div> -->
        <div id="cryptos" class="pt-10">
            <list-quatation :listData="qList" :tabShow="false" />
            <list-quatation :listData="qList" :tabShow="false" :tabActive="2" />
        </div>
    </div>
</template>
@@ -81,25 +94,37 @@
import { _getHomeList } from '@/service/cryptos.api'
import { _getNewsList1, _getPopupNews } from '@/service/user.api'
import { useStore } from "vuex";
import { TIME_OUT } from "@/config";
import { TIME_OUT, customerServiceUrl } from "@/config";
import { useUserStore } from '@/store/user';
import { setStorage, getStorage } from '@/utils/index.js';
let catchSymbol = getStorage('symbol')
if (!catchSymbol) {
    setStorage('symbol', 'btcusdt');
}
const userStore = useUserStore()
const { t } = useI18n()
const router = useRouter()
const store = useStore();
const customer_service_url = ref(customerServiceUrl) // 客服链接,有值的话就会跳转到客服外链
const tabbers = [
    // { key: 1, name: t('跟单'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url) },
    // { key: 2, name: t('储值'), icon: new URL('@/assets/imgs/home/home_2.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('合约'), icon: new URL('@/assets/imgs/home/home_5.png', import.meta.url), path: '/trade/index' },
    { key: 6, name: t('现货'), icon: new URL('@/assets/imgs/home/home_5.png', import.meta.url), path: '/cryptos/trade/btcusdt' },
    { key: 7, name: t('提现'), icon: new URL('@/assets/imgs/home/home_6.png', import.meta.url), path: '/exchange/withdraw-usdt' },
    { key: 2, name: t('储值'), 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: 9, name: t('闪兑'), icon: new URL('@/assets/imgs/home/home_8.png', import.meta.url), path: '/cryptos/exchangePage' },
    // { key: 9, name: t('划转'), icon: new URL('@/assets/imgs/home/home_8.png', import.meta.url), path: '/my/transfer' },
    // { 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: 12, name: "C2C", icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/wantBuy' },
    // { key: 13, name: t('质押'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '' },
    { key: 14, name: t('onLineService'), icon: new URL('@/assets/imgs/home/home_10.png', import.meta.url), path: '/customerService' },
]
// 获取公告数据
@@ -120,7 +145,16 @@
// 跳转页面
const toPage = (path) => {
    if (!path) return
    router.push(path)
    if (path == '/customerService') {
        if (customer_service_url.value) {
            window.location.href = customer_service_url.value;
        } else {
            router.push(path)
        }
    } else {
        router.push(path)
    }
}
// 轮播图数据
@@ -160,7 +194,7 @@
onBeforeUnmount(() => {
    if (timeout.value) {
        clearInterval(timeout.value)
        clearTimeout(timeout.value)
    }
})
//#endregion----------------------------------------------
@@ -200,10 +234,12 @@
    }
    .home_logo {
        width: 100%;
        width: 48rem;
        margin: 2rem auto 1rem;
        border-radius: 1rem;
        img {
            width: 22.5rem;
            width: 100%;
        }
    }
@@ -242,7 +278,7 @@
        width: 100%;
        .grid_item {
            width: 24%;
            width: 25%;
            color: $tab-c;
            font-size: 1.6rem;