From 0b9151cd668ef8474c263888e0884a58f56e48cb Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Mon, 02 Feb 2026 18:31:29 +0800
Subject: [PATCH] 1
---
src/views/homePage/index.vue | 61 ++++++++++++++++++------------
1 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/src/views/homePage/index.vue b/src/views/homePage/index.vue
index dc8058d..020f54b 100644
--- a/src/views/homePage/index.vue
+++ b/src/views/homePage/index.vue
@@ -4,11 +4,11 @@
<Head @search="onSearch"></Head>
<!-- <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 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>
+ </van-swipe> -->
<!-- <video autoplay loop muted playsinline class="home_logo">
<source src="@/assets/video/home_1.mp4" type="video/mp4">
@@ -47,9 +47,6 @@
</van-swipe>
</van-notice-bar>
- <h4 class="font-bold mt-10 mb-5 js_title">会社紹介</h4>
- <p class="js_content mb-5">ZFXデジタル通貨取引プラットフォーム(メタバース全球デジタル通貨取引プラットフォーム)は、現在唯ーの真に分散化されたメタパース·プロジェクトです。これは、コイン対コイン取引、先物契約、コインの融資·借入、OTC取引、全ネットワーク取引、分散型取引など、多様なシステム機能を提供するグローバルな総合取引プラットフォームであり、あらゆる種類の投資家の取引ニーズを満たします。メタバースの概念を暗号通貨に基づく経済と結びつけ、世界中の主要取引所の市場深度と効果的に接続し、より高い流動性を提供することを目指しています。メタ·ユニバース·トークン(ZFX、以下「ZFX」)は、メタバース内の交換手段として使用され人々がメタパース世界を探検し、理解することを導きます。さらに、ZFXはZFXデジタル通貨取引プラットフォームのエコシステムのさまざまな分野への入ロとして機能しますーゲーム、パーチャル·コンサート&クラブ、メディア、エンターテインメント、教育、メタバース内での旅行、仮想不動産への投資、ゲーム内の素材採掘、他のプレイヤーへのサービス支払い、ソーシャル体験およびアプリケーション、そして通貨が物理世界で使用できるあらゆるものに対してーただしZFXは仮想世界で作用します。要するに、それは仮想世界のデジタル通貨です。</p>
-
<!-- <div class="flex justify-between mt-10">
<van-swipe class="home_swipe_1" :autoplay="2000">
<van-swipe-item v-for="value in swipe1" :key="value.key" class="flex justify-center items-center">
@@ -85,13 +82,14 @@
<list-quatation :listData="qList" :tabShow="false" :tabActive="2" />
</div>
- <van-popup v-model:show="item.showPopUp" style="border-radius:10px;" :close-on-click-overlay="false"
- v-for="item in popupNewsList" :key="item.id">
- <div class="w-350 p-20 box-border popup_news">
- <div class="font-700 text-center font-28 textColor">{{ item.title }}</div>
- <div class="flex justify-center mt-30" v-if="item.imgUrl"><img :src="`${item.imgUrl}`"
- class="w-200 h-200" alt="" /></div>
- <div class="py-10 textColor content-title" v-html="item.content"></div>
+ <van-popup v-model:show="item.showPopUp" style="border-radius:10px;" v-for="item in popupNewsList"
+ :key="item.id">
+ <div class="w-350 p-20 pb-10 box-border popup_news">
+ <div class="font-700 text-center font-28">{{ item.title }}</div>
+ <div class="flex justify-center mt-30" v-if="item.imgUrl">
+ <img :src="`${item.imgUrl}`" class="w-200 h-200" alt="" />
+ </div>
+ <div class="py-10 content-title" v-html="item.content"></div>
<van-button color="#1194F7" class="w-full h-40 rounded-full" type="info" @click="closePopNotice(item)">
{{ $t('我知道了') }}
</van-button>
@@ -103,7 +101,7 @@
<script setup>
import Head from './components/head.vue'
import { useI18n } from "vue-i18n";
-import { ref, computed, onBeforeUnmount } from 'vue';
+import { ref, computed, onBeforeUnmount, onMounted, watch } from 'vue';
import { useRouter } from 'vue-router';
import ListQuatation from "@/components/Transform/list-quotation/index.vue";
import { _getHomeList } from '@/service/cryptos.api'
@@ -117,7 +115,7 @@
setStorage('symbol', 'btcusdt');
}
const userStore = useUserStore()
-const { t } = useI18n()
+const { t, locale } = useI18n()
const router = useRouter()
const store = useStore();
@@ -134,35 +132,46 @@
// { 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' },
- { key: 15, name: 'DXCM PDF', icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: 'https://www.dexm-whitepaper.com/' },
+ // { key: 15, name: 'DXCM PDF', icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: 'https://www.dexm-whitepaper.com/' },
+ { key: 11, name: "ICO", icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/ICO/ico' },
]
// 获取公告数据
const announceList = ref([])
_getNewsList1({
- language: useI18n().locale.value,
+ language: locale.value,
}).then(res => {
announceList.value = res
})
// 获取弹出新闻
const popupNewsList = ref([])
-_getPopupNews({
- language: useI18n().locale.value,
-}).then(res => {
+const fetchPopupNews = async () => {
+ const partyId = userStore.userInfo?.partyId
+ const language = locale.value
+
+ // 未登录/未拿到 partyId 时也允许请求(后端若需要 partyId,会自行返回空)
+ const params = partyId ? { language, partyId } : { language }
+
+ const res = await _getPopupNews(params).catch(() => null)
if (res && res.length > 0) {
- let list = res
+ const list = res
list.forEach(item => {
item.showPopUp = true
})
popupNewsList.value = list
}
+}
+
+onMounted(() => {
+ setTimeout(() => {
+ fetchPopupNews()
+ }, 1000)
})
+
// 关闭弹窗新闻
const closePopNotice = (item) => {
item.showPopUp = false
@@ -278,7 +287,8 @@
$tab-c: #888;
$inp-c: #999;
$crd-b: #f7f7f7;
- .js_title{
+
+ .js_title {
font-size: 2rem;
text-align: center;
background: linear-gradient(to right, #87CEEB, #1E90FF, #0000CD);
@@ -287,12 +297,13 @@
-webkit-text-fill-color: transparent;
color: transparent;
}
- .js_content{
+
+ .js_content {
font-size: 1.6rem;
text-align: center;
}
- .popup_news{
+ .popup_news {
font-size: 1.8rem;
}
--
Gitblit v1.9.3