2026-02-13 17:34:32 +08:00
< template >
2026-05-29 13:30:56 +08:00
< div class = "mobile-container product-list-page" >
< header class = "gallery-header" >
2026-05-31 18:36:52 +08:00
< span class = "header-spacer" aria -hidden =" true " ></ span >
< div class = "brand-lockup" :aria-label = "currentShopName" >
< h1 >{{ currentShopName }}</ h1 >
2026-03-05 16:02:34 +08:00
</ div >
2026-05-31 18:36:52 +08:00
< span class = "header-spacer" aria -hidden =" true " ></ span >
2026-02-13 17:34:32 +08:00
</ header >
2026-05-29 13:30:56 +08:00
< main class = "gallery-content" >
< section class = "search-panel" aria -label =" 作品搜索与筛选 " >
< div class = "search-field" >
< SearchOutlined class = "search-field__icon" />
< input
v-model = "searchKeyword"
class = "search-field__input"
type = "search"
placeholder = "搜索美甲款式..."
@keydown.enter ="handleSearch"
/>
2026-05-23 21:56:18 +08:00
< button
2026-05-29 13:30:56 +08:00
type = "button"
class = "search-field__action"
@click ="handleSearch"
>
搜索
</ button >
</ div >
< div class = "category-rail" aria -label =" 作品分类 " >
< button
class = "category-item"
: class = "{ active: selectedCategory === '全部' }"
type = "button"
@click ="handleCategoryClick('全部')"
>
2026-05-30 18:31:35 +08:00
全部款式
2026-05-29 13:30:56 +08:00
</ button >
< button
v-for = "tag in allTags"
2026-05-23 21:56:18 +08:00
:key = "tag.id"
class = "category-item"
: class = "{ active: selectedTagId === String(tag.id) }"
type = "button"
@click ="handleTagClick(tag)"
>
{{ tag . displayName || tag . tagName }}
</ button >
2026-02-13 17:34:32 +08:00
</ div >
2026-05-29 13:30:56 +08:00
</ section >
< div v-if = "activeBannerText" class="page-banner" role="status" >
{{ activeBannerText }}
2026-02-13 17:34:32 +08:00
</ div >
2026-05-29 13:30:56 +08:00
< section class = "product-section" aria -label =" 作品列表 " >
2026-02-13 17:34:32 +08:00
< div class = "product-grid" >
2026-05-29 13:30:56 +08:00
< article
2026-02-13 17:34:32 +08:00
v-for = "item in products"
:key = "item.id"
class = "product-card"
2026-05-29 13:30:56 +08:00
role = "button"
tabindex = "0"
2026-02-13 17:34:32 +08:00
@click ="handleProductClick(item)"
2026-05-29 13:30:56 +08:00
@keydown.enter ="handleProductClick(item)"
@keydown.space.prevent ="handleProductClick(item)"
2026-02-13 17:34:32 +08:00
>
2026-05-29 13:30:56 +08:00
< div class = "product-media" >
< div class = "product-img" >
< img
v-if = "getProductImages(item).length > 0"
:src = "getProductImages(item)[0]"
: alt = "item.title || item.name"
class = "product-image"
loading = "lazy"
decoding = "async"
/>
< div v-else class = "product-img-placeholder" >
< span >{{ ( item . title || item . name ) ? .[ 0 ] || '作' }}</ span >
</ div >
2026-02-24 09:59:22 +08:00
</ div >
</ div >
2026-03-26 10:28:28 +08:00
2026-02-24 09:59:22 +08:00
< div class = "product-info" >
2026-05-29 13:30:56 +08:00
< div class = "product-head" >
< div class = "product-title-block" >
< h2 class = "name" >{{ item . title || item . name }}</ h2 >
< p v-if = "item.shopName" class="shop-name" >{{ item.shopName }}</ p >
< div class = "duration" >
< ClockCircleOutlined />
2026-06-04 16:39:06 +08:00
< span >{{ displayProductDuration ( item ) }}</ span >
2026-05-29 13:30:56 +08:00
</ div >
2026-02-24 09:59:22 +08:00
</ div >
2026-05-29 13:30:56 +08:00
< button
class = "cart-btn"
: class = "{ 'cart-btn-in-cart': item.inCart }"
type = "button"
: aria -label =" item.inCart ? ' 购物车已有 ' : ` 加入购物车 : ${ item.title || item.name || ' 作品 ' } `"
@click.stop ="handleAddToCart(item)"
>
< CheckOutlined v-if = "item.inCart" />
2026-05-31 18:36:52 +08:00
< ShoppingCartOutlined v-else />
2026-05-29 13:30:56 +08:00
</ button >
2026-02-24 09:59:22 +08:00
</ div >
2026-03-26 10:28:28 +08:00
2026-02-24 09:59:22 +08:00
< div class = "product-tags" >
2026-03-26 10:28:28 +08:00
< template v-if = "item.tagInfos?.length" >
< a-tag
2026-03-03 17:50:10 +08:00
v-for = "tag in item.tagInfos"
:key = "tag.id"
size = "small"
: style = "{
2026-03-26 10:28:28 +08:00
marginRight: '4px',
2026-03-03 17:50:10 +08:00
marginBottom: '4px',
2026-05-29 13:30:56 +08:00
color: tag.textColor || 'var(--text-primary)',
backgroundColor: tag.bgColor || 'var(--theme-primary-soft)',
borderColor: tag.borderColor || 'var(--theme-border)'
2026-03-03 17:50:10 +08:00
}"
>
{{ tag . tagName }}
</ a-tag >
</ template >
2026-05-29 13:30:56 +08:00
< a-tag v-else size = "small" color = "default" > 精选款式 </ a-tag >
2026-02-24 09:59:22 +08:00
</ div >
2026-03-26 10:28:28 +08:00
2026-05-29 13:30:56 +08:00
< div class = "card-foot" >
2026-06-04 16:39:06 +08:00
< p class = "price" > 参考价 ¥ {{ Number ( item . price || 0 ). toFixed ( 2 ) }}</ p >
2026-05-29 13:30:56 +08:00
< div class = "stats" >
< span >< HeartOutlined />{{ item . likeCount || 0 }}</ span >
< span >< StarOutlined />{{ item . collectCount || 0 }}</ span >
2026-05-13 12:43:01 +08:00
</ div >
2026-02-24 09:59:22 +08:00
</ div >
</ div >
2026-05-29 13:30:56 +08:00
</ article >
2026-02-13 17:34:32 +08:00
</ div >
2026-02-24 09:59:22 +08:00
< div v-if = "products.length === 0 && !loading" class="empty-state" >
2026-03-26 10:28:28 +08:00
< a-empty description = "暂时没有匹配的作品" >
< a-button type = "primary" @click ="resetFilters" > 查看全部作品 </ a -button >
</ a-empty >
2026-02-24 09:59:22 +08:00
</ div >
2026-03-26 10:28:28 +08:00
< div v-if = "loading" class="loading-state" >
< a-spin />
2026-02-24 09:59:22 +08:00
</ div >
2026-05-29 13:30:56 +08:00
</ section >
</ main >
2026-05-31 18:36:52 +08:00
< button
v-show = "showBackTop"
class = "back-to-top-button"
type = "button"
aria -label =" 返回顶部 "
@click ="scrollToTop"
>
< UpOutlined />
</ button >
2026-02-13 17:34:32 +08:00
</ div >
</ template >
< script setup lang = "ts" >
2026-05-18 09:46:11 +08:00
/**
* ProductListView page script.
* Call guide: the template binds the reactive state below, and the methods are triggered by button clicks, lifecycle hooks, or router events.
*/
2026-05-31 18:36:52 +08:00
import { computed , inject , onMounted , onUnmounted , ref , watch } from 'vue'
2026-03-26 10:28:28 +08:00
import { useRouter , useRoute } from 'vue-router'
2026-05-29 13:30:56 +08:00
import {
CheckOutlined ,
ClockCircleOutlined ,
HeartOutlined ,
SearchOutlined ,
2026-05-31 18:36:52 +08:00
ShoppingCartOutlined ,
StarOutlined ,
UpOutlined
2026-05-29 13:30:56 +08:00
} from '@ant-design/icons-vue'
2026-02-13 17:34:32 +08:00
import { message } from 'ant-design-vue'
2026-05-23 18:44:57 +08:00
/**
* Purpose: ProductVO supports ProductListView.vue by holding or executing the product vo page or API role.
* Usage: import, call, read, or update this type from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-02-24 09:59:22 +08:00
import { productApi , type ProductVO } from '@/api/product'
2026-05-23 18:44:57 +08:00
/**
* Purpose: TagVO supports ProductListView.vue by holding or executing the tag vo page or API role.
* Usage: import, call, read, or update this type from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-05-23 21:56:18 +08:00
import { tagApi , type TagFilterGroupVO , type TagVO } from '@/api/tag'
2026-02-27 15:57:22 +08:00
import { cartApi } from '@/api/cart'
2026-05-13 12:43:01 +08:00
import { runWithGlobalLoading } from '@/utils/action-loading'
import { fetchCartProductIdSet , hasCartProduct , withAddedCartProduct } from '@/utils/cart-state'
2026-05-29 13:30:56 +08:00
import { getCachedSignedImageUrls , getCachedSignedImageUrlsSync , parseImageFileIds } from '@/utils/signed-image-cache'
2026-05-13 12:43:01 +08:00
2026-05-23 18:44:57 +08:00
/**
* Purpose: ProductListItem supports ProductListView.vue by holding or executing the product list item page or API role.
* Usage: import, call, read, or update this type from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-05-13 12:43:01 +08:00
type ProductListItem = ProductVO & {
inCart ?: boolean
}
2026-02-13 17:34:32 +08:00
2026-05-23 18:44:57 +08:00
/**
* Purpose: router supports ProductListView.vue by holding or executing the router page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-03-26 10:28:28 +08:00
const router = useRouter ()
2026-05-23 18:44:57 +08:00
/**
* Purpose: route supports ProductListView.vue by holding or executing the route page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-03-26 10:28:28 +08:00
const route = useRoute ()
2026-05-23 18:44:57 +08:00
/**
* Purpose: updateCartCount supports ProductListView.vue by holding or executing the update cart count page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-03-19 20:51:07 +08:00
const updateCartCount = inject < () => Promise < void > > ( 'updateCartCount' , async () => {})
2026-03-05 16:28:05 +08:00
2026-05-23 21:56:18 +08:00
/** filterGroups stores scene-based tag filters shown above the product grid. */
const filterGroups = ref < TagFilterGroupVO [] >([])
/** allTags flattens filter groups for route/query lookup. */
const allTags = computed (() => filterGroups . value . flatMap ( group => group . tags || []))
2026-05-18 09:46:11 +08:00
/** selectedCategory is a reactive state variable used by the template and event handlers. */
2026-03-26 10:28:28 +08:00
const selectedCategory = ref ( '全部' )
2026-05-23 21:56:18 +08:00
/** selectedTagId tracks the grouped filter id sent to the backend. */
const selectedTagId = ref ( '' )
2026-05-31 18:36:52 +08:00
const selectedShopId = ref ( '' )
const bookableOnly = ref ( false )
2026-05-23 18:44:57 +08:00
/**
* Purpose: products supports ProductListView.vue by holding or executing the products page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-05-13 12:43:01 +08:00
const products = ref < ProductListItem [] >([])
2026-05-18 09:46:11 +08:00
/** loading is a reactive state variable used by the template and event handlers. */
2026-02-24 09:59:22 +08:00
const loading = ref ( false )
2026-05-31 18:36:52 +08:00
/** showBackTop toggles the floating shortcut after the gallery scrolls down. */
const showBackTop = ref ( false )
2026-05-18 09:46:11 +08:00
/** showSearch is a reactive state variable used by the template and event handlers. */
2026-03-05 16:02:34 +08:00
const showSearch = ref ( false )
2026-05-18 09:46:11 +08:00
/** searchKeyword is a reactive state variable used by the template and event handlers. */
2026-03-05 16:02:34 +08:00
const searchKeyword = ref ( '' )
2026-05-23 18:44:57 +08:00
/**
* Purpose: imageUrls supports ProductListView.vue by holding or executing the image urls page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-03-27 14:55:41 +08:00
const imageUrls = ref < Record < string , string [] > > ({})
2026-05-18 09:46:11 +08:00
/** cartProductIdSet is a reactive state variable used by the template and event handlers. */
2026-05-13 12:43:01 +08:00
const cartProductIdSet = ref ( new Set < string >())
2026-05-23 18:44:57 +08:00
/**
* Purpose: useGlobalLoadingForNextRouteSync supports ProductListView.vue by holding or executing the use global loading for next route sync page or API role.
* Usage: import, call, read, or update this let from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-05-13 12:43:01 +08:00
let useGlobalLoadingForNextRouteSync = false
2026-02-26 11:16:24 +08:00
2026-05-18 09:46:11 +08:00
/** isLoggedIn is a reactive state variable used by the template and event handlers. */
2026-03-26 10:28:28 +08:00
const isLoggedIn = computed (() => Boolean ( localStorage . getItem ( 'accessToken' ) || sessionStorage . getItem ( 'accessToken' )))
2026-05-31 18:36:52 +08:00
/** currentShopName renders the active shop name in the page navigation bar. */
const currentShopName = computed (() => {
const routeShopName = typeof route . query . shopName === 'string' ? route . query . shopName . trim () : ''
if ( routeShopName ) {
return routeShopName
}
if ( typeof window !== 'undefined' ) {
try {
const raw = localStorage . getItem ( 'userInfo' )
const storedUser = raw ? JSON . parse ( raw ) as { shopName ?: string ; shopNames ?: string [] } : null
return storedUser ? . shopName || storedUser ? . shopNames ? . find ( Boolean ) || '当前门店'
} catch {
return '当前门店'
}
}
return '当前门店'
})
2026-05-18 09:46:11 +08:00
/** activeBannerText is a reactive state variable used by the template and event handlers. */
2026-03-26 10:28:28 +08:00
const activeBannerText = computed (() => {
if ( searchKeyword . value . trim ()) {
2026-05-13 12:43:01 +08:00
return `当前显示“ ${ searchKeyword . value . trim () } ”的匹配结果`
2026-03-26 10:28:28 +08:00
}
2026-05-31 18:36:52 +08:00
if ( selectedShopId . value && bookableOnly . value ) {
return `当前显示“ ${ currentShopName . value } ”的可预约作品`
}
if ( selectedShopId . value ) {
return `当前显示“ ${ currentShopName . value } ”的作品`
}
2026-03-26 10:28:28 +08:00
if ( selectedCategory . value !== '全部' ) {
2026-05-23 21:56:18 +08:00
return `当前按场景“ ${ selectedCategory . value } ”筛选`
2026-03-26 10:28:28 +08:00
}
return ''
})
2026-05-31 18:36:52 +08:00
const getScopedRouteQuery = ( includeBookable = true ) => {
const query : Record < string , string > = {}
const routeShopName = typeof route . query . shopName === 'string' ? route . query . shopName . trim () : ''
if ( selectedShopId . value ) {
query . shopId = selectedShopId . value
}
if ( routeShopName ) {
query . shopName = routeShopName
}
if ( includeBookable && bookableOnly . value ) {
query . bookable = '1'
}
return query
}
2026-05-23 18:44:57 +08:00
/**
* Purpose: DEFAULT_PRODUCT_IMAGE supports ProductListView.vue by holding or executing the default product image page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-03-26 10:28:28 +08:00
const DEFAULT_PRODUCT_IMAGE = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCBmaWxsPSIjZjVmNWY1IiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIvPjx0ZXh0IHg9IjUwJSIgeT0iNTAlIiBmaWxsPSIjYmZiZmJmIiBmb250LXNpemU9IjI0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBkeT0iLjNlbSI+YWFhPC90ZXh0Pjwvc3ZnPg=='
2026-05-18 09:46:11 +08:00
/** ensureLoginForAction is a local helper used by this page script. */
2026-03-26 10:28:28 +08:00
const ensureLoginForAction = ( actionText : string ) => {
if ( isLoggedIn . value ) {
return true
}
message . info ( ` ${ actionText } 前请先登录账号` )
router . push ( '/' )
return false
}
2026-05-18 09:46:11 +08:00
/** loadImageUrls is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
2026-03-26 10:28:28 +08:00
const loadImageUrls = async ( productList : ProductVO []) => {
for ( const product of productList ) {
if ( ! product . imageFileIds ) {
2026-03-27 14:55:41 +08:00
imageUrls . value [ String ( product . id )] = [ DEFAULT_PRODUCT_IMAGE ]
2026-03-26 10:28:28 +08:00
continue
}
2026-05-29 13:30:56 +08:00
const ids = parseImageFileIds ( product . imageFileIds )
const cachedUrls = getCachedSignedImageUrlsSync ( ids )
if ( cachedUrls . length ) {
imageUrls . value [ String ( product . id )] = cachedUrls
2026-03-26 10:28:28 +08:00
}
2026-05-29 13:30:56 +08:00
const urls = await getCachedSignedImageUrls ( ids , DEFAULT_PRODUCT_IMAGE )
2026-03-27 14:55:41 +08:00
imageUrls . value [ String ( product . id )] = urls . length ? urls : [ DEFAULT_PRODUCT_IMAGE ]
2026-03-26 10:28:28 +08:00
}
}
2026-05-18 09:46:11 +08:00
/** getProductImages is a local helper used by this page script. */
2026-03-27 14:55:41 +08:00
const getProductImages = ( product : ProductVO ) : string [] => imageUrls . value [ String ( product . id )] || [ DEFAULT_PRODUCT_IMAGE ]
2026-03-26 10:28:28 +08:00
2026-06-04 16:39:06 +08:00
const displayProductDuration = ( product : ProductVO ) => {
const duration = product . approximateDuration ? . trim ()
if ( duration ) return duration
const minutes = Number ( product . serviceDurationMinutes || product . estimatedTime || 0 )
return minutes > 0 ? ` ${ minutes } 分钟` : '时长待定'
}
2026-05-18 09:46:11 +08:00
/** markProductsInCart is a local helper used by this page script. */
2026-05-13 12:43:01 +08:00
const markProductsInCart = ( productList : ProductVO []) => {
return ( Array . isArray ( productList ) ? productList : []). map ( item => ({
... item ,
inCart : hasCartProduct ( cartProductIdSet . value , item . id )
}))
}
2026-05-18 09:46:11 +08:00
/** syncCartProductState is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
2026-05-13 12:43:01 +08:00
const syncCartProductState = async () => {
if ( ! isLoggedIn . value ) {
cartProductIdSet . value = new Set ()
return
}
cartProductIdSet . value = await fetchCartProductIdSet ()
}
2026-05-18 09:46:11 +08:00
/** fetchTags is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
2026-02-24 09:59:22 +08:00
const fetchTags = async () => {
try {
2026-05-23 21:56:18 +08:00
const response = await tagApi . getFilterOptions () as unknown as TagFilterGroupVO []
filterGroups . value = Array . isArray ( response ) ? response : []
2026-05-13 12:43:01 +08:00
} catch ( error : any ) {
2026-02-24 09:59:22 +08:00
console . error ( '获取标签失败:' , error )
2026-05-23 21:56:18 +08:00
filterGroups . value = []
2026-02-24 09:59:22 +08:00
}
}
2026-05-18 09:46:11 +08:00
/** fetchProducts is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
2026-02-24 09:59:22 +08:00
const fetchProducts = async () => {
loading . value = true
try {
2026-03-26 10:28:28 +08:00
let response : ProductVO [] = []
const keyword = searchKeyword . value . trim ()
if ( keyword ) {
response = await productApi . searchProducts ( keyword )
2026-05-23 21:56:18 +08:00
} else if ( ! selectedTagId . value ) {
2026-03-26 10:28:28 +08:00
response = await productApi . getAllProducts ()
2026-02-24 09:59:22 +08:00
} else {
2026-05-23 21:56:18 +08:00
const pageResult = await productApi . getProductPage ({
page : 1 ,
size : 200 ,
tagIds : selectedTagId . value
})
response = pageResult . list || []
2026-02-24 09:59:22 +08:00
}
2026-03-26 10:28:28 +08:00
2026-05-31 18:36:52 +08:00
let filteredProducts = Array . isArray ( response ) ? response : []
if ( selectedShopId . value ) {
filteredProducts = filteredProducts . filter ( item => String ( item . shopId || '' ) === selectedShopId . value )
}
if ( bookableOnly . value ) {
filteredProducts = filteredProducts . filter ( item => item . availableBookableArtistCount === undefined || Number ( item . availableBookableArtistCount ) > 0 )
}
products . value = markProductsInCart ( filteredProducts )
2026-03-03 17:50:10 +08:00
await loadImageUrls ( products . value )
2026-05-13 12:43:01 +08:00
} catch ( error : any ) {
2026-03-26 10:28:28 +08:00
console . error ( '获取作品列表失败:' , error )
2026-05-13 12:43:01 +08:00
message . error ( error ? . message || '加载作品列表失败,请稍后重试' )
2026-03-26 10:28:28 +08:00
products . value = []
2026-02-24 09:59:22 +08:00
} finally {
loading . value = false
}
2026-02-26 11:16:24 +08:00
}
2026-05-18 09:46:11 +08:00
/** syncRouteFilters is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
2026-03-26 10:28:28 +08:00
const syncRouteFilters = async () => {
2026-05-13 12:43:01 +08:00
await syncCartProductState ()
2026-03-26 10:28:28 +08:00
const keyword = typeof route . query . keyword === 'string' ? route . query . keyword . trim () : ''
const tag = typeof route . query . tag === 'string' ? route . query . tag . trim () : ''
2026-05-23 21:56:18 +08:00
const tagId = typeof route . query . tagId === 'string' ? route . query . tagId . trim () : ''
2026-05-31 18:36:52 +08:00
const shopId = typeof route . query . shopId === 'string' ? route . query . shopId . trim () : ''
const bookable = route . query . bookable === '1'
2026-05-23 21:56:18 +08:00
const matchedTag = tagId
? allTags . value . find ( item => String ( item . id ) === tagId )
: allTags . value . find ( item => item . tagName === tag || item . displayName === tag )
2026-02-26 11:16:24 +08:00
2026-03-26 10:28:28 +08:00
searchKeyword . value = keyword
showSearch . value = Boolean ( keyword )
2026-05-31 18:36:52 +08:00
selectedShopId . value = shopId
bookableOnly . value = bookable
2026-05-23 21:56:18 +08:00
selectedTagId . value = matchedTag ? String ( matchedTag . id ) : ''
selectedCategory . value = matchedTag ? ( matchedTag . displayName || matchedTag . tagName ) : '全部'
2026-05-13 12:43:01 +08:00
if ( useGlobalLoadingForNextRouteSync ) {
useGlobalLoadingForNextRouteSync = false
await runWithGlobalLoading (() => fetchProducts ())
return
}
2026-03-26 10:28:28 +08:00
await fetchProducts ()
}
2026-02-24 09:59:22 +08:00
2026-05-18 09:46:11 +08:00
/** handleCategoryClick is a local helper used by this page script. */
2026-02-13 17:34:32 +08:00
const handleCategoryClick = ( category : string ) => {
selectedCategory . value = category
2026-05-23 21:56:18 +08:00
selectedTagId . value = ''
searchKeyword . value = ''
showSearch . value = false
useGlobalLoadingForNextRouteSync = true
2026-05-31 18:36:52 +08:00
router . replace ({ path : '/products' , query : getScopedRouteQuery () })
2026-05-23 21:56:18 +08:00
}
/** handleTagClick is a local helper used by grouped scene-filter chips. */
const handleTagClick = ( tag : TagVO ) => {
selectedCategory . value = tag . displayName || tag . tagName
selectedTagId . value = String ( tag . id )
2026-03-05 16:02:34 +08:00
searchKeyword . value = ''
2026-03-26 10:28:28 +08:00
showSearch . value = false
2026-05-13 12:43:01 +08:00
useGlobalLoadingForNextRouteSync = true
2026-03-26 10:28:28 +08:00
router . replace ({
path : '/products' ,
2026-05-31 18:36:52 +08:00
query : { ... getScopedRouteQuery (), tag : tag . displayName || tag . tagName , tagId : String ( tag . id ) }
2026-03-26 10:28:28 +08:00
})
2026-02-13 17:34:32 +08:00
}
2026-05-18 09:46:11 +08:00
/** handleProductClick is a local helper used by this page script. */
2026-03-26 10:28:28 +08:00
const handleProductClick = ( item : ProductVO ) => {
2026-02-13 17:34:32 +08:00
router . push ( `/product/ ${ item . id } ` )
}
2026-05-18 09:46:11 +08:00
/** handleAddToCart is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
2026-05-13 12:43:01 +08:00
const handleAddToCart = async ( item : ProductListItem ) => {
2026-03-26 10:28:28 +08:00
if ( ! ensureLoginForAction ( '加入购物车' )) {
return
}
2026-05-13 12:43:01 +08:00
if ( hasCartProduct ( cartProductIdSet . value , item . id )) {
message . info ( '购物车已有' )
return
}
2026-02-27 15:57:22 +08:00
try {
2026-05-13 12:43:01 +08:00
await runWithGlobalLoading (() => cartApi . addToCart ({ productId : item . id , quantity : 1 }))
cartProductIdSet . value = withAddedCartProduct ( cartProductIdSet . value , item . id )
products . value = markProductsInCart ( products . value )
2026-03-19 20:51:07 +08:00
await updateCartCount ()
2026-03-26 10:28:28 +08:00
message . success ( `已将 ${ item . title || item . name || '作品' } 加入购物车` )
2026-05-13 12:43:01 +08:00
} catch ( error : any ) {
2026-03-26 10:28:28 +08:00
console . error ( '加入购物车失败:' , error )
2026-05-13 12:43:01 +08:00
message . error ( error ? . message || '加入购物车失败,请稍后重试' )
2026-02-27 15:57:22 +08:00
}
2026-02-13 17:34:32 +08:00
}
2026-05-18 09:46:11 +08:00
/** handleSearch is a local helper used by this page script. */
2026-03-26 10:28:28 +08:00
const handleSearch = () => {
const keyword = searchKeyword . value . trim ()
2026-05-13 12:43:01 +08:00
useGlobalLoadingForNextRouteSync = true
2026-03-26 10:28:28 +08:00
router . replace ({
path : '/products' ,
2026-05-31 18:36:52 +08:00
query : keyword ? { ... getScopedRouteQuery (), keyword } : getScopedRouteQuery ()
2026-03-26 10:28:28 +08:00
})
2026-02-13 17:34:32 +08:00
}
2026-02-24 09:59:22 +08:00
2026-05-18 09:46:11 +08:00
/** resetFilters is a local helper used by this page script. */
2026-03-26 10:28:28 +08:00
const resetFilters = () => {
selectedCategory . value = '全部'
2026-05-23 21:56:18 +08:00
selectedTagId . value = ''
2026-03-26 10:28:28 +08:00
searchKeyword . value = ''
showSearch . value = false
2026-05-31 18:36:52 +08:00
bookableOnly . value = false
2026-05-13 12:43:01 +08:00
useGlobalLoadingForNextRouteSync = true
2026-05-31 18:36:52 +08:00
router . replace ({ path : '/products' , query : getScopedRouteQuery ( false ) })
}
/** handleWindowScroll keeps the return-to-top shortcut in sync with page position. */
const handleWindowScroll = () => {
showBackTop . value = ( document . documentElement . scrollTop || document . body . scrollTop ) > 360
}
/** scrollToTop returns the product gallery to the top of the page. */
const scrollToTop = () => {
window . scrollTo ({ top : 0 , behavior : 'smooth' })
2026-03-05 16:02:34 +08:00
}
2026-03-26 10:28:28 +08:00
watch (
() => route . query ,
async () => {
await syncRouteFilters ()
},
{ deep : true }
)
2026-02-24 11:34:25 +08:00
onMounted ( async () => {
await fetchTags ()
2026-03-26 10:28:28 +08:00
await syncRouteFilters ()
2026-05-31 18:36:52 +08:00
handleWindowScroll ()
window . addEventListener ( 'scroll' , handleWindowScroll , { passive : true })
})
onUnmounted (() => {
window . removeEventListener ( 'scroll' , handleWindowScroll )
2026-02-24 09:59:22 +08:00
})
2026-02-13 17:34:32 +08:00
</ script >
< style scoped >
2026-05-29 13:30:56 +08:00
. product - list - page {
2026-05-30 18:31:35 +08:00
-- gallery - header - height : 52 px ;
2026-05-29 13:30:56 +08:00
-- gallery - gutter : 20 px ;
-- gallery - surface : color - mix ( in srgb , var ( -- theme - card - bg ) 76 % , transparent );
-- gallery - surface - strong : color - mix ( in srgb , var ( -- theme - card - bg ) 90 % , transparent );
-- gallery - border : color - mix ( in srgb , var ( -- theme - border ) 72 % , var ( -- theme - card - bg ));
-- gallery - muted : color - mix ( in srgb , var ( -- text - secondary ) 78 % , var ( -- theme - card - bg ));
-- gallery - shadow : 0 18 px 44 px color - mix ( in srgb , var ( -- theme - neutral ) 11 % , transparent );
-- gallery - soft - shadow : 0 10 px 30 px color - mix ( in srgb , var ( -- theme - primary ) 14 % , transparent );
2026-02-13 17:34:32 +08:00
min - height : 100 vh ;
2026-05-29 13:30:56 +08:00
padding : var ( -- gallery - header - height ) 0 calc ( 104 px + env ( safe - area - inset - bottom , 0 px ));
2026-05-21 18:43:59 +08:00
color : var ( -- text - primary );
background :
2026-05-29 13:30:56 +08:00
radial - gradient ( circle at 18 % 5 % , color - mix ( in srgb , var ( -- theme - secondary ) 22 % , transparent ) 0 , transparent 30 % ),
radial - gradient ( circle at 86 % 10 % , color - mix ( in srgb , var ( -- theme - primary ) 26 % , transparent ) 0 , transparent 34 % ),
linear - gradient ( 180 deg , color - mix ( in srgb , var ( -- theme - tertiary ) 96 % , var ( -- theme - card - bg )) 0 % , var ( -- theme - page - bg ) 62 % , var ( -- theme - primary - soft ) 100 % );
2026-02-13 17:34:32 +08:00
}
2026-05-29 13:30:56 +08:00
. gallery - header {
2026-02-13 17:34:32 +08:00
position : fixed ;
top : 0 ;
2026-05-31 18:36:52 +08:00
left : 50 % ;
2026-02-13 17:34:32 +08:00
z - index : 100 ;
display : flex ;
align - items : center ;
2026-05-29 13:30:56 +08:00
justify - content : space - between ;
2026-05-31 18:36:52 +08:00
width : min ( 100 % , var ( -- app - mobile - max - width , 480 px ));
2026-05-29 13:30:56 +08:00
height : var ( -- gallery - header - height );
padding : 0 var ( -- gallery - gutter );
border - bottom : 1 px solid var ( -- gallery - border );
background : color - mix ( in srgb , var ( -- theme - tertiary ) 86 % , transparent );
box - shadow : 0 12 px 36 px color - mix ( in srgb , var ( -- theme - neutral ) 8 % , transparent );
backdrop - filter : blur ( 20 px );
2026-05-31 18:36:52 +08:00
transform : translateX ( - 50 % );
}
. header - spacer {
flex : 0 0 36 px ;
width : 36 px ;
height : 36 px ;
2026-02-13 17:34:32 +08:00
}
2026-05-29 13:30:56 +08:00
. brand - lockup {
2026-05-30 18:31:35 +08:00
display : flex ;
align - items : center ;
justify - content : center ;
2026-05-29 13:30:56 +08:00
min - width : 0 ;
}
. brand - lockup h1 {
2026-05-30 18:31:35 +08:00
margin : 0 ;
2026-05-31 18:36:52 +08:00
overflow : hidden ;
2026-05-30 18:31:35 +08:00
color : var ( -- text - primary );
font - size : 16 px ;
font - weight : 800 ;
2026-05-29 13:30:56 +08:00
line - height : 1 ;
2026-05-21 18:43:59 +08:00
letter - spacing : 0 ;
2026-05-31 18:36:52 +08:00
text - overflow : ellipsis ;
white - space : nowrap ;
2026-05-21 18:43:59 +08:00
}
2026-05-29 13:30:56 +08:00
. gallery - content {
padding : 0 var ( -- gallery - gutter );
}
. search - panel {
display : grid ;
2026-05-31 18:36:52 +08:00
gap : 10 px ;
margin - bottom : 12 px ;
2026-05-29 13:30:56 +08:00
}
. search - field {
display : grid ;
grid - template - columns : 22 px minmax ( 0 , 1 fr ) auto ;
align - items : center ;
2026-05-31 18:36:52 +08:00
gap : 8 px ;
min - height : 46 px ;
padding : 6 px 7 px 6 px 15 px ;
2026-05-29 13:30:56 +08:00
border : 1 px solid var ( -- gallery - border );
border - radius : 999 px ;
background : var ( -- gallery - surface - strong );
box - shadow : var ( -- gallery - soft - shadow );
backdrop - filter : blur ( 16 px );
transition : border - color 0.2 s ease , box - shadow 0.2 s ease , transform 0.2 s ease ;
}
. search - field : focus - within {
border - color : var ( -- theme - primary );
box - shadow : var ( -- theme - focus - shadow ), var ( -- gallery - soft - shadow );
transform : translateY ( - 1 px );
}
. search - field__icon {
color : var ( -- theme - primary - action );
2026-05-31 18:36:52 +08:00
font - size : 18 px ;
2026-05-29 13:30:56 +08:00
}
. search - field__input {
min - width : 0 ;
border : 0 ;
outline : 0 ;
2026-05-21 18:43:59 +08:00
color : var ( -- text - primary );
2026-05-29 13:30:56 +08:00
background : transparent ;
font - size : 15 px ;
line - height : 1.4 ;
2026-05-21 18:43:59 +08:00
}
2026-05-29 13:30:56 +08:00
. search - field__input :: placeholder {
color : var ( -- gallery - muted );
2026-05-21 18:43:59 +08:00
}
2026-05-29 13:30:56 +08:00
. search - field__action {
2026-05-31 18:36:52 +08:00
min - width : 52 px ;
height : 32 px ;
padding : 0 12 px ;
2026-05-29 13:30:56 +08:00
border : 1 px solid color - mix ( in srgb , var ( -- theme - primary ) 54 % , var ( -- theme - card - bg ));
border - radius : 999 px ;
color : var ( -- theme - primary - action );
background : color - mix ( in srgb , var ( -- theme - primary ) 18 % , var ( -- theme - card - bg ));
font - size : 13 px ;
font - weight : 700 ;
cursor : pointer ;
transition : transform 0.18 s ease , background 0.18 s ease , color 0.18 s ease ;
2026-03-05 16:02:34 +08:00
}
2026-05-29 13:30:56 +08:00
. search - field__action : hover ,
. search - field__action : focus {
color : var ( -- theme - card - bg );
background : var ( -- theme - primary - action );
}
. search - field__action : active {
transform : scale ( 0.96 );
}
. category - rail {
2026-02-13 17:34:32 +08:00
display : flex ;
2026-05-31 18:36:52 +08:00
gap : 8 px ;
2026-05-21 18:43:59 +08:00
overflow - x : auto ;
overflow - y : hidden ;
2026-05-31 18:36:52 +08:00
padding : 0 0 5 px ;
2026-05-29 13:30:56 +08:00
scroll - snap - type : x proximity ;
2026-05-21 18:43:59 +08:00
scrollbar - width : none ;
}
2026-05-29 13:30:56 +08:00
. category - rail ::- webkit - scrollbar {
2026-05-21 18:43:59 +08:00
display : none ;
2026-02-13 17:34:32 +08:00
}
. category - item {
2026-05-21 18:43:59 +08:00
flex : 0 0 auto ;
2026-05-31 18:36:52 +08:00
min - height : 30 px ;
padding : 0 14 px ;
2026-05-29 13:30:56 +08:00
border : 1 px solid var ( -- gallery - border );
2026-05-21 18:43:59 +08:00
border - radius : 999 px ;
2026-05-23 21:56:18 +08:00
color : var ( -- text - secondary );
2026-05-29 13:30:56 +08:00
background : var ( -- gallery - surface - strong );
font - size : 13 px ;
2026-05-23 21:56:18 +08:00
font - weight : 700 ;
2026-05-29 13:30:56 +08:00
letter - spacing : 0 ;
cursor : pointer ;
scroll - snap - align : start ;
transition : transform 0.18 s ease , color 0.18 s ease , background 0.18 s ease , border - color 0.18 s ease , box - shadow 0.18 s ease ;
2026-05-23 21:56:18 +08:00
}
2026-05-29 13:30:56 +08:00
. category - item : hover ,
. category - item : focus {
color : var ( -- theme - primary - action );
2026-05-21 18:43:59 +08:00
border - color : var ( -- theme - primary );
transform : translateY ( - 1 px );
2026-02-13 17:34:32 +08:00
}
. category - item . active {
2026-05-29 13:30:56 +08:00
color : var ( -- theme - card - bg );
2026-05-21 18:43:59 +08:00
border - color : transparent ;
2026-05-29 13:30:56 +08:00
background : var ( -- theme - primary - action );
2026-05-21 18:43:59 +08:00
box - shadow : var ( -- theme - button - shadow );
2026-02-13 17:34:32 +08:00
}
2026-05-29 13:30:56 +08:00
. page - banner {
display : inline - flex ;
align - items : center ;
max - width : 100 % ;
min - height : 34 px ;
margin - bottom : 14 px ;
padding : 0 14 px ;
border : 1 px solid color - mix ( in srgb , var ( -- theme - secondary ) 36 % , var ( -- theme - border ));
border - radius : 999 px ;
color : var ( -- theme - primary - action );
background : color - mix ( in srgb , var ( -- theme - secondary ) 16 % , var ( -- theme - card - bg ));
font - size : 12 px ;
font - weight : 700 ;
line - height : 1.35 ;
2026-03-26 10:28:28 +08:00
}
2026-05-29 13:30:56 +08:00
. product - section {
min - height : 50 vh ;
2026-02-13 17:34:32 +08:00
}
. product - grid {
2026-05-29 13:30:56 +08:00
column - count : 2 ;
column - gap : 10 px ;
2026-02-13 17:34:32 +08:00
}
. product - card {
2026-05-29 13:30:56 +08:00
display : inline - block ;
width : 100 % ;
margin : 0 0 10 px ;
overflow : hidden ;
border : 1 px solid color - mix ( in srgb , var ( -- theme - card - bg ) 70 % , var ( -- theme - border ));
border - radius : 24 px ;
color : inherit ;
background : var ( -- gallery - surface );
box - shadow : var ( -- gallery - shadow );
backdrop - filter : blur ( 16 px );
cursor : pointer ;
break - inside : avoid ;
transition : transform 0.22 s ease , box - shadow 0.22 s ease , border - color 0.22 s ease ;
}
. product - card : hover ,
. product - card : focus {
border - color : color - mix ( in srgb , var ( -- theme - primary ) 58 % , var ( -- theme - border ));
box - shadow : 0 22 px 52 px color - mix ( in srgb , var ( -- theme - primary ) 18 % , transparent );
transform : translateY ( - 2 px );
outline : 0 ;
}
. product - media {
padding : 8 px 8 px 0 ;
2026-02-13 17:34:32 +08:00
}
. product - img {
width : 100 % ;
2026-05-29 13:30:56 +08:00
aspect - ratio : 3 / 4 ;
2026-02-24 09:59:22 +08:00
overflow : hidden ;
2026-05-29 13:30:56 +08:00
border - radius : 20 px ;
background :
linear - gradient ( 145 deg , var ( -- theme - primary - soft ), color - mix ( in srgb , var ( -- theme - secondary ) 18 % , var ( -- theme - card - bg )));
}
. product - card : nth - child ( 4 n + 2 ) . product - img {
aspect - ratio : 4 / 5 ;
}
. product - card : nth - child ( 4 n + 3 ) . product - img {
aspect - ratio : 1 / 1 ;
}
. product - card : nth - child ( 4 n ) . product - img {
aspect - ratio : 3 / 5 ;
2026-02-24 09:59:22 +08:00
}
. product - image {
width : 100 % ;
height : 100 % ;
object - fit : cover ;
2026-05-29 13:30:56 +08:00
transition : transform 0.55 s ease ;
}
. product - card : hover . product - image ,
. product - card : focus . product - image {
transform : scale ( 1.045 );
2026-02-24 09:59:22 +08:00
}
. product - img - placeholder {
2026-05-29 13:30:56 +08:00
display : grid ;
2026-02-24 09:59:22 +08:00
width : 100 % ;
height : 100 % ;
2026-05-29 13:30:56 +08:00
place - items : center ;
color : color - mix ( in srgb , var ( -- theme - primary - action ) 30 % , transparent );
font - family : "Playfair Display" , "Times New Roman" , serif ;
font - size : 42 px ;
2026-03-26 10:28:28 +08:00
font - weight : 700 ;
2026-05-29 13:30:56 +08:00
}
. product - info {
display : grid ;
gap : 10 px ;
padding : 12 px 12 px 14 px ;
}
. product - head {
display : grid ;
grid - template - columns : minmax ( 0 , 1 fr ) 32 px ;
align - items : start ;
gap : 8 px ;
}
. product - title - block {
min - width : 0 ;
2026-02-13 17:34:32 +08:00
}
. name {
2026-05-29 13:30:56 +08:00
display : - webkit - box ;
min - width : 0 ;
margin : 0 ;
2026-02-13 17:34:32 +08:00
overflow : hidden ;
2026-05-29 13:30:56 +08:00
color : var ( -- text - primary );
font - size : 15 px ;
font - weight : 800 ;
line - height : 1.28 ;
letter - spacing : 0 ;
- webkit - box - orient : vertical ;
- webkit - line - clamp : 2 ;
2026-05-21 18:43:59 +08:00
}
2026-05-18 09:46:11 +08:00
. shop - name {
2026-05-29 13:30:56 +08:00
margin : 5 px 0 0 ;
2026-05-18 09:46:11 +08:00
overflow : hidden ;
2026-05-29 13:30:56 +08:00
color : var ( -- gallery - muted );
font - size : 11 px ;
line - height : 1.3 ;
2026-05-18 09:46:11 +08:00
text - overflow : ellipsis ;
2026-05-29 13:30:56 +08:00
white - space : nowrap ;
2026-02-24 09:59:22 +08:00
}
. duration {
2026-03-26 10:28:28 +08:00
display : inline - flex ;
align - items : center ;
2026-05-29 13:30:56 +08:00
max - width : 100 % ;
margin - top : 7 px ;
color : var ( -- gallery - muted );
font - size : 11 px ;
line - height : 1.2 ;
white - space : nowrap ;
2026-02-24 09:59:22 +08:00
}
2026-05-29 13:30:56 +08:00
. duration : deep (. anticon ) {
flex : 0 0 auto ;
margin - right : 5 px ;
color : var ( -- theme - secondary );
font - size : 13 px ;
}
. cart - btn {
display : inline - grid ;
width : 32 px ;
height : 32 px ;
place - items : center ;
border : 0 ;
border - radius : 999 px ;
color : var ( -- theme - primary - action );
background : color - mix ( in srgb , var ( -- theme - primary ) 28 % , var ( -- theme - card - bg ));
box - shadow : 0 8 px 18 px color - mix ( in srgb , var ( -- theme - primary ) 22 % , transparent );
cursor : pointer ;
transition : transform 0.18 s ease , background 0.18 s ease , color 0.18 s ease ;
}
. cart - btn : hover ,
. cart - btn : focus {
color : var ( -- theme - card - bg );
background : var ( -- theme - primary - action );
outline : 0 ;
}
. cart - btn : active {
transform : scale ( 0.92 );
}
. cart - btn - in - cart {
color : var ( -- theme - primary - action );
background : color - mix ( in srgb , var ( -- theme - secondary ) 28 % , var ( -- theme - card - bg ));
box - shadow : 0 8 px 18 px color - mix ( in srgb , var ( -- theme - secondary ) 22 % , transparent );
2026-02-24 09:59:22 +08:00
}
2026-03-26 10:28:28 +08:00
. product - tags {
2026-05-29 13:30:56 +08:00
min - height : 24 px ;
max - height : 54 px ;
overflow : hidden ;
2026-02-24 09:59:22 +08:00
}
2026-05-29 13:30:56 +08:00
. product - tags : deep (. ant - tag ) {
max - width : 100 % ;
border - radius : 999 px ;
font - size : 11 px ;
line - height : 20 px ;
}
. card - foot {
2026-02-13 17:34:32 +08:00
display : flex ;
2026-05-29 13:30:56 +08:00
align - items : flex - end ;
2026-02-13 17:34:32 +08:00
justify - content : space - between ;
2026-05-29 13:30:56 +08:00
gap : 8 px ;
2026-02-13 17:34:32 +08:00
}
. price {
margin : 0 ;
2026-05-29 13:30:56 +08:00
color : var ( -- theme - primary - action );
font - size : 15 px ;
font - weight : 800 ;
line - height : 1 ;
2026-05-13 12:43:01 +08:00
white - space : nowrap ;
}
2026-05-29 13:30:56 +08:00
. stats {
display : flex ;
flex - wrap : wrap ;
justify - content : flex - end ;
gap : 6 px ;
min - width : 0 ;
color : var ( -- gallery - muted );
font - size : 11 px ;
line - height : 1 ;
2026-05-13 12:43:01 +08:00
}
2026-05-29 13:30:56 +08:00
. stats span {
display : inline - flex ;
align - items : center ;
gap : 3 px ;
white - space : nowrap ;
}
. stats : deep (. anticon ) {
color : var ( -- theme - secondary );
font - size : 12 px ;
2026-05-13 12:43:01 +08:00
}
2026-03-26 10:28:28 +08:00
. empty - state ,
. loading - state {
2026-05-29 13:30:56 +08:00
padding : 58 px 0 ;
text - align : center ;
2026-02-24 09:59:22 +08:00
}
2026-03-24 09:50:55 +08:00
2026-05-29 13:30:56 +08:00
. empty - state : deep (. ant - empty - description ) {
color : var ( -- text - secondary );
}
. empty - state : deep (. ant - btn - primary ) {
border - color : transparent ;
background : var ( -- theme - primary - action );
box - shadow : var ( -- theme - button - shadow );
}
2026-05-31 18:36:52 +08:00
. back - to - top - button {
position : fixed ;
right : max ( 18 px , calc (( 100 vw - var ( -- app - mobile - max - width , 480 px )) / 2 + 18 px ));
bottom : calc ( 92 px + env ( safe - area - inset - bottom , 0 px ));
z - index : 120 ;
display : inline - grid ;
width : 42 px ;
height : 42 px ;
place - items : center ;
border : 1 px solid color - mix ( in srgb , var ( -- theme - primary ) 36 % , var ( -- theme - border ));
border - radius : 999 px ;
color : var ( -- theme - card - bg );
background : var ( -- theme - primary - action );
box - shadow : 0 14 px 34 px color - mix ( in srgb , var ( -- theme - primary ) 26 % , transparent );
cursor : pointer ;
transition : transform 0.18 s ease , opacity 0.18 s ease ;
}
. back - to - top - button : hover ,
. back - to - top - button : focus {
transform : translateY ( - 2 px );
outline : 0 ;
}
. back - to - top - button : active {
transform : scale ( 0.94 );
}
2026-05-29 13:30:56 +08:00
@ media ( max - width : 360 px ) {
. product - list - page {
-- gallery - gutter : 14 px ;
2026-03-24 09:59:52 +08:00
}
2026-05-29 13:30:56 +08:00
. search - field {
grid - template - columns : 20 px minmax ( 0 , 1 fr ) auto ;
gap : 7 px ;
padding - left : 14 px ;
2026-03-24 09:59:52 +08:00
}
2026-05-29 13:30:56 +08:00
. search - field__action {
min - width : 50 px ;
padding : 0 11 px ;
2026-03-24 09:59:52 +08:00
}
. product - grid {
2026-05-29 13:30:56 +08:00
column - gap : 8 px ;
}
. product - info {
padding - right : 10 px ;
padding - left : 10 px ;
}
}
@ media ( min - width : 768 px ) {
. gallery - header {
top : 0 ;
left : 50 % ;
width : min ( 100 % , var ( -- frontend - page - max - width ), calc ( 100 vw - 48 px ));
border - top - left - radius : 32 px ;
border - top - right - radius : 32 px ;
transform : translateX ( - 50 % );
2026-03-24 09:50:55 +08:00
}
}
2026-03-19 20:51:07 +08:00
</ style >