fix(distribution): 分站首页轮播不再叠压暗遮罩

海报已含文案,再叠标题会触发整幅渐变遮罩,把左右两侧颜色压暗。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-10-04 16:01:01 +08:00
co-authored by Cursor
parent 6d55ee12c2
commit 951d428364
@@ -60,14 +60,27 @@ const displayAnnouncements = computed(() => {
const banners = ref<HomeBannerSlide[]>(defaultHomeBanners)
const displayBanners = computed<HomeBannerSlide[]>(() => {
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
})