From fca02c905b1407644dd4ca7feb0fe5f276bc2f79 Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Mon, 29 Dec 2025 15:17:35 +0800
Subject: [PATCH] 首页新闻弹出
---
src/views/homePage/index.vue | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/src/views/homePage/index.vue b/src/views/homePage/index.vue
index 55cacfe..c5cc3d2 100644
--- a/src/views/homePage/index.vue
+++ b/src/views/homePage/index.vue
@@ -81,6 +81,19 @@
<div id="cryptos" class="pt-10">
<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-button color="#1194F7" class="w-full h-40 rounded-full" type="info" @click="closePopNotice(item)">
+ {{ $t('我知道了') }}
+ </van-button>
+ </div>
+ </van-popup>
</div>
</template>
@@ -133,6 +146,24 @@
}).then(res => {
announceList.value = res
})
+
+// 获取弹出新闻
+const popupNewsList = ref([])
+_getPopupNews({
+ language: useI18n().locale.value,
+}).then(res => {
+ if (res && res.length > 0) {
+ let list = res
+ list.forEach(item => {
+ item.showPopUp = true
+ })
+ popupNewsList.value = list
+ }
+})
+// 关闭弹窗新闻
+const closePopNotice = (item) => {
+ item.showPopUp = false
+}
// 跳转公告详情
const toAnnounceDetail = (announceId) => {
@@ -244,6 +275,9 @@
$tab-c: #888;
$inp-c: #999;
$crd-b: #f7f7f7;
+ .popup_news{
+ font-size: 1.8rem;
+ }
.index_notice {
height: 100px;
--
Gitblit v1.9.3