diff --git a/frontend/src/features/listings/components/HomeBanner.vue b/frontend/src/features/listings/components/HomeBanner.vue index 2990cad..ee7871d 100644 --- a/frontend/src/features/listings/components/HomeBanner.vue +++ b/frontend/src/features/listings/components/HomeBanner.vue @@ -1,4 +1,6 @@ @@ -69,6 +109,10 @@ defineProps() background: linear-gradient(135deg, #eff6ff 0%, #ffffff 58%, #fff7ed 100%); } +.hero-slide.is-previewable { + cursor: zoom-in; +} + .hero-slide.tone-blue { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 56%, #fff7ed 100%); } diff --git a/frontend/src/features/listings/views/MobileHomeView.css b/frontend/src/features/listings/views/MobileHomeView.css index 6146d73..84a55b4 100644 --- a/frontend/src/features/listings/views/MobileHomeView.css +++ b/frontend/src/features/listings/views/MobileHomeView.css @@ -250,6 +250,10 @@ color: #fff; } +.mobile-banner.is-previewable { + cursor: zoom-in; +} + .mobile-banner.tone-warm { background: #9a3412; } diff --git a/frontend/src/features/listings/views/MobileHomeView.vue b/frontend/src/features/listings/views/MobileHomeView.vue index ba63a38..f7cf8fb 100644 --- a/frontend/src/features/listings/views/MobileHomeView.vue +++ b/frontend/src/features/listings/views/MobileHomeView.vue @@ -21,7 +21,7 @@ import { type AWRecycleConfig, type HomeBannerSlide, } from '@/features/listings/api/homeConfig' -import { showToast } from 'vant' +import { showImagePreview, showToast } from 'vant' import AuthImage from '@/shared/components/business/AuthImage.vue' import MobileHomeFilterSheet, { type FilterSection } from './MobileHomeFilterSheet.vue' import { @@ -485,6 +485,21 @@ function openAWRecycle() { awRecyclePreviewVisible.value = true } +function openBannerPreview(slide: HomeBannerSlide) { + const url = slide.image_url?.trim() + if (!url) return + const images = bannerSlides.value + .map(item => item.image_url?.trim() || '') + .filter((item): item is string => Boolean(item)) + const startPosition = images.indexOf(url) + if (startPosition < 0) return + showImagePreview({ + images, + startPosition, + closeable: true, + }) +} + async function onRefresh() { refreshing.value = true try { @@ -830,7 +845,11 @@ syncMobileHomeQuery()