From 951d4283643b626c3cadaa87094bc03aba211854 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Sun, 4 Oct 2026 16:01:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(distribution):=20=E5=88=86=E7=AB=99?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=BD=AE=E6=92=AD=E4=B8=8D=E5=86=8D=E5=8F=A0?= =?UTF-8?q?=E5=8E=8B=E6=9A=97=E9=81=AE=E7=BD=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 海报已含文案,再叠标题会触发整幅渐变遮罩,把左右两侧颜色压暗。 Co-authored-by: Cursor --- .../src/features/listings/views/HomeView.vue | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/frontend/src/features/listings/views/HomeView.vue b/frontend/src/features/listings/views/HomeView.vue index fd717e0..8fdbe23 100644 --- a/frontend/src/features/listings/views/HomeView.vue +++ b/frontend/src/features/listings/views/HomeView.vue @@ -60,14 +60,27 @@ const displayAnnouncements = computed(() => { const banners = ref(defaultHomeBanners) const displayBanners = computed(() => { if (siteStore.isDistribution && siteStore.banners && siteStore.banners.length > 0) { - return siteStore.banners.map(b => ({ - eyebrow: siteStore.siteName, - title: b.title || '精选游戏账号 · 随租随玩', - badge: '本店精选', - pill: '官方保障', - tone: 'gold', - image_url: b.image_url, - })) + return siteStore.banners.map(b => { + const imageUrl = b.image_url?.trim() || '' + // 整张海报已含文案。再叠标题会触发整幅压暗遮罩,左右两侧颜色会被压暗。 + if (imageUrl) { + return { + eyebrow: '', + title: '', + badge: '本店精选', + pill: '', + tone: 'gold', + image_url: imageUrl, + } + } + return { + eyebrow: siteStore.siteName, + title: b.title || '精选游戏账号 · 随租随玩', + badge: '本店精选', + pill: '官方保障', + tone: 'gold', + } + }) } return banners.value })