1917 lines
51 KiB
Vue
1917 lines
51 KiB
Vue
<template>
|
|
<div class="shop-detail">
|
|
<header class="shop-topbar">
|
|
<a-button class="nav-button" type="text" aria-label="返回" @click="handleBackClick">
|
|
<LeftOutlined />
|
|
</a-button>
|
|
<h1>{{ shopInfo.shopName || '店铺详情' }}</h1>
|
|
<a-button class="nav-button" type="text" aria-label="前往购物车" @click="router.push('/cart')">
|
|
<ShoppingOutlined />
|
|
</a-button>
|
|
</header>
|
|
|
|
<main class="shop-content">
|
|
<section class="shop-hero" :class="{ 'shop-hero--empty': !heroImage }" aria-label="店铺封面">
|
|
<img
|
|
v-if="heroImage"
|
|
:src="heroImage"
|
|
:alt="`${shopInfo.shopName || '店铺'}封面`"
|
|
loading="eager"
|
|
decoding="async"
|
|
@click="showImageModal(heroImage)"
|
|
/>
|
|
<div v-else class="shop-hero-placeholder">
|
|
<ShopOutlined />
|
|
</div>
|
|
</section>
|
|
|
|
<section class="shop-summary-card" aria-label="店铺信息">
|
|
<div class="summary-head">
|
|
<div class="summary-copy">
|
|
<span class="section-kicker">Nail Studio</span>
|
|
<h2 class="shop-name" @click="copyToClipboard(shopInfo.shopName, '店名')">
|
|
{{ shopInfo.shopName || '店铺' }}
|
|
<CopyOutlined class="copy-icon" />
|
|
</h2>
|
|
<p class="shop-address" @click="copyToClipboard(shopInfo.address, '地址')">
|
|
<EnvironmentOutlined />
|
|
<span>{{ shopInfo.address || '暂未设置详细地址' }}</span>
|
|
<CopyOutlined v-if="shopInfo.address" class="copy-icon" />
|
|
</p>
|
|
<p v-if="distanceText" class="shop-distance">{{ distanceText }}</p>
|
|
</div>
|
|
<span class="status-chip">{{ trustProfile?.businessStatusText || '可浏览' }}</span>
|
|
</div>
|
|
|
|
<div class="trust-grid">
|
|
<button class="trust-card" type="button" @click="handleReviewStatsClick">
|
|
<strong>{{ formatRating(trustProfile?.stats?.averageRating) }}</strong>
|
|
<span>{{ reviewCount }} 条评价</span>
|
|
</button>
|
|
<button class="trust-card" type="button" @click="handleProductStatsClick">
|
|
<strong>{{ Number(trustProfile?.stats?.productCount || 0) }}</strong>
|
|
<span>在售作品</span>
|
|
</button>
|
|
<button class="trust-card" type="button" @click="handleArtistStatsClick">
|
|
<strong>{{ artistCount }}</strong>
|
|
<span>位美甲师</span>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="quick-actions">
|
|
<a-button type="primary" @click="openManagerContact">一键联系店长</a-button>
|
|
<a-button v-if="hasLocation" @click="openMapPreview">查看地图位置</a-button>
|
|
<a-button v-else disabled>暂无地图位置</a-button>
|
|
</div>
|
|
</section>
|
|
|
|
<section v-if="displayEnvironmentImages.length > 0" class="content-section environment-section">
|
|
<div class="section-head">
|
|
<div>
|
|
<span class="section-kicker">Space</span>
|
|
<h3>环境展示</h3>
|
|
</div>
|
|
</div>
|
|
<a-carousel
|
|
class="environment-carousel"
|
|
:dots="displayEnvironmentImages.length > 1"
|
|
:autoplay="displayEnvironmentImages.length > 1"
|
|
:autoplay-speed="3600"
|
|
>
|
|
<div
|
|
v-for="(url, index) in displayEnvironmentImages"
|
|
:key="`${url}-${index}`"
|
|
class="environment-slide"
|
|
>
|
|
<button
|
|
class="environment-card"
|
|
type="button"
|
|
@click="showImageModal(url)"
|
|
>
|
|
<img
|
|
:src="url"
|
|
:alt="`店铺环境图 ${index + 1}`"
|
|
:loading="index === 0 ? 'eager' : 'lazy'"
|
|
decoding="async"
|
|
/>
|
|
</button>
|
|
</div>
|
|
</a-carousel>
|
|
</section>
|
|
|
|
<section class="content-section intro-section">
|
|
<div class="section-head">
|
|
<div>
|
|
<span class="section-kicker">About</span>
|
|
<h3>门店介绍</h3>
|
|
</div>
|
|
</div>
|
|
<p class="intro-copy">{{ shopInfo.description || '店家暂未补充门店介绍。' }}</p>
|
|
<div class="intro-facts">
|
|
<div class="intro-fact">
|
|
<ClockCircleOutlined />
|
|
<div>
|
|
<span>营业时间</span>
|
|
<strong>{{ trustProfile?.businessHoursText || shopInfo.businessHours || '暂未设置' }}</strong>
|
|
</div>
|
|
</div>
|
|
<div class="intro-fact">
|
|
<EnvironmentOutlined />
|
|
<div>
|
|
<span>到店指引</span>
|
|
<strong>{{ trustProfile?.distanceCapabilityText || (hasLocation ? '支持地图导航' : '预约后联系门店确认') }}</strong>
|
|
</div>
|
|
</div>
|
|
<div class="intro-fact">
|
|
<StarOutlined />
|
|
<div>
|
|
<span>预约提示</span>
|
|
<strong>{{ trustProfile?.availabilitySummary?.summaryText || '下单前选择美甲师和时间' }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section v-if="trustProfile?.featuredProducts?.length" class="content-section featured-section">
|
|
<div class="section-head">
|
|
<div>
|
|
<span class="section-kicker">Works</span>
|
|
<h3>特色作品</h3>
|
|
</div>
|
|
<button class="section-link" type="button" @click="openShopProducts()">查看更多</button>
|
|
</div>
|
|
<div class="featured-products">
|
|
<button
|
|
v-for="product in featuredProductCards"
|
|
:key="product.id"
|
|
type="button"
|
|
class="featured-product"
|
|
@click="openProduct(product.id)"
|
|
>
|
|
<span class="featured-product__image">
|
|
<img
|
|
v-if="product.displayImageUrl"
|
|
:src="product.displayImageUrl"
|
|
:alt="product.title || '作品'"
|
|
loading="lazy"
|
|
decoding="async"
|
|
@error="handleFeaturedImageError(product.id)"
|
|
/>
|
|
<span v-else class="featured-product__placeholder">作</span>
|
|
</span>
|
|
<span class="featured-product__copy">
|
|
<strong>{{ product.title || '美甲作品' }}</strong>
|
|
<span>参考价 ¥{{ Number(product.price || 0).toFixed(2) }}</span>
|
|
<small>{{ product.bookingHint || '下单前选择美甲师和时间' }}</small>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
</section>
|
|
|
|
<section v-if="reviewCount > 0" ref="reviewSectionRef" class="content-section review-section">
|
|
<div class="section-head">
|
|
<div>
|
|
<span class="section-kicker">Reviews</span>
|
|
<h3>近期评价</h3>
|
|
</div>
|
|
</div>
|
|
<div v-if="trustProfile?.recentReviews?.length" class="recent-reviews">
|
|
<article v-for="review in trustProfile.recentReviews" :key="review.id" class="recent-review">
|
|
<div class="recent-review__head">
|
|
<strong>{{ review.productTitle || '订单评价' }}</strong>
|
|
<span>{{ formatRating(review.ratingScore) }}</span>
|
|
</div>
|
|
<p>{{ review.content || '用户已完成评价' }}</p>
|
|
<small>{{ formatTime(review.submittedAt) }}</small>
|
|
</article>
|
|
</div>
|
|
<div v-else class="recent-review">
|
|
<p>暂无近期评价</p>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="content-section navigation-section">
|
|
<div class="section-head">
|
|
<div>
|
|
<span class="section-kicker">Location</span>
|
|
<h3>到店导航</h3>
|
|
</div>
|
|
</div>
|
|
<template v-if="hasLocation">
|
|
<div class="navigation-actions">
|
|
<a-button block @click="openNavigation('TENCENT')">腾讯地图导航</a-button>
|
|
<a-button block @click="openNavigation('AMAP')">高德地图导航</a-button>
|
|
</div>
|
|
</template>
|
|
<a-alert v-else type="info" show-icon message="店铺暂未设置地图位置" />
|
|
</section>
|
|
</main>
|
|
|
|
<footer class="booking-bar">
|
|
<button class="booking-secondary" type="button" @click="openManagerContact">
|
|
<WechatOutlined />
|
|
一键联系
|
|
</button>
|
|
<button class="booking-primary" type="button" @click="openShopProducts()">
|
|
立即预约
|
|
</button>
|
|
</footer>
|
|
|
|
<a-modal v-model:open="imageModalVisible" title="店铺环境图" :width="800" :footer="null" @cancel="handleImageCancel">
|
|
<img :src="selectedImage" alt="店铺环境图" class="modal-image" />
|
|
</a-modal>
|
|
|
|
<a-modal v-model:open="contactOpen" title="一键联系店长" :footer="null">
|
|
<div class="contact-box">
|
|
<p class="contact-name">{{ contactInfo.contactName || contactInfo.roleLabel || '联系人' }}</p>
|
|
<div class="contact-row">
|
|
<span>联系电话</span>
|
|
<strong>{{ contactInfo.phoneAvailable ? contactInfo.phone : '暂无电话' }}</strong>
|
|
</div>
|
|
<div class="contact-actions">
|
|
<a-button v-if="contactInfo.phoneAvailable" type="primary" :href="`tel:${contactInfo.phone}`">
|
|
<PhoneOutlined />
|
|
拨号
|
|
</a-button>
|
|
<a-button v-if="contactInfo.phoneAvailable" @click="copyToClipboard(contactInfo.phone || '', '联系电话')">
|
|
<CopyOutlined />
|
|
复制电话
|
|
</a-button>
|
|
</div>
|
|
<div class="contact-row">
|
|
<span>微信号</span>
|
|
<strong>{{ contactInfo.wechatAvailable ? contactInfo.wechatId : '暂无微信' }}</strong>
|
|
</div>
|
|
<img v-if="contactInfo.wechatQrCode" :src="contactInfo.wechatQrCode" alt="微信二维码" class="contact-qr" />
|
|
<div class="contact-actions">
|
|
<a-button v-if="contactInfo.wechatAvailable" @click="copyToClipboard(contactInfo.wechatId || '', '微信号')">
|
|
<CopyOutlined />
|
|
复制微信
|
|
</a-button>
|
|
<a-button v-if="contactInfo.wechatAvailable" type="primary" @click="openWechatContact">
|
|
<WechatOutlined />
|
|
复制并打开微信
|
|
</a-button>
|
|
<a-button v-if="contactInfo.phoneAvailable || contactInfo.wechatAvailable" @click="copyContactInfo">
|
|
<CopyOutlined />
|
|
一键复制
|
|
</a-button>
|
|
</div>
|
|
<a-button v-if="!contactInfo.phoneAvailable && !contactInfo.wechatAvailable" block disabled>
|
|
{{ contactInfo.platformContactText || '平台联系暂未接入' }}
|
|
</a-button>
|
|
</div>
|
|
</a-modal>
|
|
|
|
<a-modal v-model:open="mapOpen" title="店铺位置" :width="900" :footer="null" class="map-modal">
|
|
<div class="map-panel">
|
|
<div class="map-summary">
|
|
<strong>{{ shopInfo.shopName }}</strong>
|
|
<span>{{ shopInfo.address }}</span>
|
|
<span v-if="distanceText">{{ distanceText }}</span>
|
|
</div>
|
|
<iframe v-if="mapPreviewUrl" class="map-frame" :src="mapPreviewUrl" title="店铺地图位置"></iframe>
|
|
<div class="navigation-actions">
|
|
<a-button type="primary" block @click="openNavigation('TENCENT')">腾讯地图导航</a-button>
|
|
<a-button block @click="openNavigation('AMAP')">高德地图导航</a-button>
|
|
</div>
|
|
</div>
|
|
</a-modal>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed, onMounted, ref, shallowRef } from 'vue'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import {
|
|
ClockCircleOutlined,
|
|
CopyOutlined,
|
|
EnvironmentOutlined,
|
|
LeftOutlined,
|
|
PhoneOutlined,
|
|
ShopOutlined,
|
|
ShoppingOutlined,
|
|
StarOutlined,
|
|
WechatOutlined
|
|
} from '@ant-design/icons-vue'
|
|
import { message } from 'ant-design-vue'
|
|
/**
|
|
* Purpose: ShopVO supports ShopDetailView.vue by holding or executing the shop 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.
|
|
*/
|
|
import { shopApi, type ShopTrustProfileVO, type ShopVO } from '@/api/shop'
|
|
import { nailArtistApi } from '@/api/nail-artist'
|
|
/**
|
|
* Purpose: ContactInfoVO supports ShopDetailView.vue by holding or executing the contact info 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.
|
|
*/
|
|
import { userApi, type ContactInfoVO } from '@/api/user'
|
|
import { toOptionalIdString } from '@/utils/id'
|
|
import {
|
|
getPublicImageFileIds,
|
|
refreshPublicImageUrl,
|
|
resolvePublicImageUrl,
|
|
resolvePublicImageUrls
|
|
} from '@/utils/public-image-assets'
|
|
import { parseImageFileIds } from '@/utils/signed-image-cache'
|
|
|
|
/**
|
|
* Purpose: router supports ShopDetailView.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.
|
|
*/
|
|
const router = useRouter()
|
|
/**
|
|
* Purpose: route supports ShopDetailView.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.
|
|
*/
|
|
const route = useRoute()
|
|
|
|
/**
|
|
* Purpose: shopInfo supports ShopDetailView.vue by holding or executing the shop info 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.
|
|
*/
|
|
const shopInfo = ref<ShopVO>({
|
|
id: '',
|
|
shopName: '',
|
|
description: '',
|
|
address: '',
|
|
mapProvider: 'TENCENT',
|
|
longitude: '',
|
|
latitude: '',
|
|
businessHours: '',
|
|
imageFileIds: '',
|
|
createTime: '',
|
|
updateTime: ''
|
|
})
|
|
|
|
/**
|
|
* Purpose: shopImages supports ShopDetailView.vue by holding or executing the shop images 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.
|
|
*/
|
|
const shopImages = ref<string[]>([])
|
|
const shopEnvironmentImages = ref<string[]>([])
|
|
const featuredProductImageUrls = ref<Record<string, string>>({})
|
|
const failedFeaturedProductImages = ref<Record<string, boolean>>({})
|
|
/**
|
|
* Purpose: imageModalVisible supports ShopDetailView.vue by holding or executing the image modal visible 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.
|
|
*/
|
|
const imageModalVisible = ref(false)
|
|
/**
|
|
* Purpose: selectedImage supports ShopDetailView.vue by holding or executing the selected 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.
|
|
*/
|
|
const selectedImage = ref('')
|
|
/**
|
|
* Purpose: contactOpen supports ShopDetailView.vue by holding or executing the contact open 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.
|
|
*/
|
|
const contactOpen = ref(false)
|
|
/**
|
|
* Purpose: contactInfo supports ShopDetailView.vue by holding or executing the contact info 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.
|
|
*/
|
|
const contactInfo = ref<ContactInfoVO>({})
|
|
/**
|
|
* Purpose: mapOpen supports ShopDetailView.vue by holding or executing the map open 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.
|
|
*/
|
|
const mapOpen = ref(false)
|
|
/**
|
|
* Purpose: distanceText supports ShopDetailView.vue by holding or executing the distance text 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.
|
|
*/
|
|
const distanceText = ref('')
|
|
/** trustProfile stores public confidence signals for this shop. */
|
|
const trustProfile = ref<ShopTrustProfileVO | null>(null)
|
|
const shopArtistCount = shallowRef<number | null>(null)
|
|
const reviewSectionRef = ref<HTMLElement | null>(null)
|
|
|
|
const normalizeImageUrl = (value: unknown): string => String(value || '').replace(/[`]/g, '').trim()
|
|
const uniqueImageUrls = (urls: string[]) => Array.from(new Set(urls.map(normalizeImageUrl).filter(Boolean)))
|
|
const parseDirectImageUrls = (value: unknown): string[] => {
|
|
if (Array.isArray(value)) {
|
|
return uniqueImageUrls(value.map(item => String(item || '')))
|
|
}
|
|
return uniqueImageUrls(String(value || '').split(','))
|
|
}
|
|
|
|
const parseFileIdList = (value: unknown): string[] => {
|
|
if (Array.isArray(value)) {
|
|
return value.map(item => String(item || '').trim()).filter(Boolean)
|
|
}
|
|
return parseImageFileIds(String(value || ''))
|
|
}
|
|
|
|
const heroImage = computed(() => shopImages.value[0] || '')
|
|
const displayEnvironmentImages = computed(() => shopEnvironmentImages.value)
|
|
const reviewCount = computed(() => Number(trustProfile.value?.stats?.reviewCount || 0))
|
|
const artistCount = computed(() => {
|
|
const statsCount = Number(trustProfile.value?.stats?.artistCount || 0)
|
|
return shopArtistCount.value === null ? statsCount : Math.max(statsCount, shopArtistCount.value)
|
|
})
|
|
const featuredProducts = computed(() => trustProfile.value?.featuredProducts || [])
|
|
const featuredProductCards = computed(() => featuredProducts.value.map(product => {
|
|
const productId = String(product.id)
|
|
const directUrl = normalizeImageUrl(product.imageUrl)
|
|
|
|
return {
|
|
...product,
|
|
displayImageUrl: failedFeaturedProductImages.value[productId]
|
|
? ''
|
|
: (featuredProductImageUrls.value[productId] || directUrl)
|
|
}
|
|
}))
|
|
/**
|
|
* Purpose: hasLocation supports ShopDetailView.vue by holding or executing the has location 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.
|
|
*/
|
|
const hasLocation = computed(() => Boolean(shopInfo.value.longitude && shopInfo.value.latitude))
|
|
/**
|
|
* Purpose: mapPreviewUrl supports ShopDetailView.vue by holding or executing the map preview url 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.
|
|
*/
|
|
const mapPreviewUrl = computed(() => shopInfo.value.navigationUrls?.BROWSER || shopInfo.value.navigationUrls?.TENCENT || '')
|
|
|
|
/**
|
|
* Purpose: handleBackClick supports ShopDetailView.vue by holding or executing the handle back click 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.
|
|
*/
|
|
const handleBackClick = () => {
|
|
router.back()
|
|
}
|
|
|
|
/**
|
|
* Purpose: showImageModal supports ShopDetailView.vue by holding or executing the show image modal 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.
|
|
*/
|
|
const showImageModal = (imageUrl: string) => {
|
|
selectedImage.value = imageUrl
|
|
imageModalVisible.value = true
|
|
}
|
|
|
|
/**
|
|
* Purpose: handleImageCancel supports ShopDetailView.vue by holding or executing the handle image cancel 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.
|
|
*/
|
|
const handleImageCancel = () => {
|
|
imageModalVisible.value = false
|
|
selectedImage.value = ''
|
|
}
|
|
|
|
/**
|
|
* Purpose: openManagerContact supports ShopDetailView.vue by holding or executing the open manager contact 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.
|
|
*/
|
|
const openManagerContact = async () => {
|
|
try {
|
|
contactInfo.value = await userApi.getShopManagerContact(shopInfo.value.id)
|
|
contactOpen.value = true
|
|
} catch (error: any) {
|
|
message.error(error?.message || '获取联系方式失败')
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Purpose: openMapPreview supports ShopDetailView.vue by holding or executing the open map preview 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.
|
|
*/
|
|
const openMapPreview = () => {
|
|
if (!mapPreviewUrl.value) {
|
|
message.warning('店铺暂未设置地图位置')
|
|
return
|
|
}
|
|
mapOpen.value = true
|
|
}
|
|
|
|
/**
|
|
* Purpose: openNavigation supports ShopDetailView.vue by holding or executing the open navigation 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.
|
|
*/
|
|
const openNavigation = (provider: 'TENCENT' | 'AMAP') => {
|
|
const url = shopInfo.value.navigationUrls?.[provider]
|
|
if (!url) {
|
|
message.warning('店铺暂未设置地图位置')
|
|
return
|
|
}
|
|
window.open(url, '_blank')
|
|
}
|
|
|
|
/** openProduct routes from shop trust cards to the product detail page. */
|
|
const openProduct = (productId: string | number) => {
|
|
router.push(`/product/${productId}`)
|
|
}
|
|
|
|
/** openShopProducts routes to the shop's product gallery. */
|
|
const openShopProducts = (extraQuery: Record<string, string> = {}) => {
|
|
const query: Record<string, string> = { ...extraQuery }
|
|
if (shopInfo.value.id) {
|
|
query.shopId = String(shopInfo.value.id)
|
|
}
|
|
if (shopInfo.value.shopName) {
|
|
query.shopName = shopInfo.value.shopName
|
|
}
|
|
router.push({ path: '/products', query })
|
|
}
|
|
|
|
const handleReviewStatsClick = () => {
|
|
if (!reviewCount.value || !reviewSectionRef.value) {
|
|
message.info('暂无评价')
|
|
return
|
|
}
|
|
reviewSectionRef.value.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
}
|
|
|
|
const handleProductStatsClick = () => {
|
|
openShopProducts()
|
|
}
|
|
|
|
const handleArtistStatsClick = () => {
|
|
if (!shopInfo.value.id) {
|
|
message.info('店铺信息加载中')
|
|
return
|
|
}
|
|
router.push({
|
|
path: `/shop/${shopInfo.value.id}/artists`,
|
|
query: shopInfo.value.shopName ? { shopName: shopInfo.value.shopName } : {}
|
|
})
|
|
}
|
|
|
|
const loadShopArtistCount = async (shopId: string) => {
|
|
shopArtistCount.value = null
|
|
try {
|
|
const artists = await nailArtistApi.listByShopId(shopId)
|
|
shopArtistCount.value = Array.isArray(artists) ? artists.length : 0
|
|
} catch {
|
|
shopArtistCount.value = Number(trustProfile.value?.stats?.artistCount || 0)
|
|
}
|
|
}
|
|
|
|
/** formatRating renders trust scores without exposing backend numeric details. */
|
|
const formatRating = (value: unknown) => {
|
|
const rating = Number(value || 0)
|
|
return rating > 0 ? rating.toFixed(1) : '暂无'
|
|
}
|
|
|
|
/** formatTime renders review timestamps for the trust section. */
|
|
const formatTime = (value?: string) => {
|
|
if (!value) return ''
|
|
return String(value).replace('T', ' ').slice(0, 16)
|
|
}
|
|
|
|
/**
|
|
* Purpose: calculateDistanceText supports ShopDetailView.vue by holding or executing the calculate distance text 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.
|
|
*/
|
|
const calculateDistanceText = (currentLat: number, currentLng: number) => {
|
|
const shopLat = Number(shopInfo.value.latitude)
|
|
const shopLng = Number(shopInfo.value.longitude)
|
|
if (!Number.isFinite(currentLat) || !Number.isFinite(currentLng) || !Number.isFinite(shopLat) || !Number.isFinite(shopLng)) {
|
|
distanceText.value = ''
|
|
return
|
|
}
|
|
|
|
const toRad = (value: number) => value * Math.PI / 180
|
|
const earthRadius = 6371000
|
|
const dLat = toRad(shopLat - currentLat)
|
|
const dLng = toRad(shopLng - currentLng)
|
|
const a = Math.sin(dLat / 2) ** 2 + Math.cos(toRad(currentLat)) * Math.cos(toRad(shopLat)) * Math.sin(dLng / 2) ** 2
|
|
const meters = 2 * earthRadius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
|
|
distanceText.value = meters >= 1000 ? `距你约 ${(meters / 1000).toFixed(1)} km` : `距你约 ${Math.round(meters)} m`
|
|
}
|
|
|
|
/**
|
|
* Purpose: loadCurrentDistance supports ShopDetailView.vue by holding or executing the load current distance 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.
|
|
*/
|
|
const loadCurrentDistance = () => {
|
|
if (!hasLocation.value || !navigator.geolocation) return
|
|
navigator.geolocation.getCurrentPosition(
|
|
position => calculateDistanceText(position.coords.latitude, position.coords.longitude),
|
|
() => {
|
|
distanceText.value = ''
|
|
},
|
|
{ enableHighAccuracy: false, timeout: 8000, maximumAge: 300000 }
|
|
)
|
|
}
|
|
|
|
/**
|
|
* Purpose: copyToClipboard supports ShopDetailView.vue by holding or executing the copy to clipboard 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.
|
|
*/
|
|
const copyToClipboard = async (text: string, type: string) => {
|
|
if (!text) return
|
|
try {
|
|
await navigator.clipboard.writeText(text)
|
|
message.success(`${type}已复制到剪贴板`)
|
|
} catch {
|
|
message.error('复制失败,请手动复制')
|
|
}
|
|
}
|
|
|
|
/** openWechatContact copies the WeChat ID and then asks the browser to open WeChat. */
|
|
const openWechatContact = async () => {
|
|
const wechatId = contactInfo.value.wechatId
|
|
if (!wechatId) return
|
|
await copyToClipboard(wechatId, '微信号')
|
|
window.location.href = 'weixin://'
|
|
}
|
|
|
|
/** copyContactInfo copies all available contact channels in one action. */
|
|
const copyContactInfo = async () => {
|
|
const lines = [
|
|
contactInfo.value.contactName || contactInfo.value.roleLabel || '联系人',
|
|
contactInfo.value.phoneAvailable && contactInfo.value.phone ? `电话:${contactInfo.value.phone}` : '',
|
|
contactInfo.value.wechatAvailable && contactInfo.value.wechatId ? `微信:${contactInfo.value.wechatId}` : ''
|
|
].filter(Boolean)
|
|
await copyToClipboard(lines.join('\n'), '联系方式')
|
|
}
|
|
|
|
const handleFeaturedImageError = (productId: string | number) => {
|
|
const product = featuredProducts.value.find(item => String(item.id) === String(productId))
|
|
const fileId = product ? getPublicImageFileIds({ imageFileIds: product.imageFileIds, imageUrl: product.imageUrl })[0] : ''
|
|
if (!fileId) {
|
|
failedFeaturedProductImages.value = {
|
|
...failedFeaturedProductImages.value,
|
|
[String(productId)]: true
|
|
}
|
|
return
|
|
}
|
|
refreshPublicImageUrl(fileId, '').then(url => {
|
|
featuredProductImageUrls.value = { ...featuredProductImageUrls.value, [String(productId)]: url }
|
|
failedFeaturedProductImages.value = { ...failedFeaturedProductImages.value, [String(productId)]: false }
|
|
})
|
|
}
|
|
|
|
const loadFeaturedProductImages = async () => {
|
|
const entries = await Promise.all(featuredProducts.value.map(async product => {
|
|
const productId = String(product.id)
|
|
const signedUrl = await resolvePublicImageUrl({ imageFileIds: product.imageFileIds, imageUrl: product.imageUrl }, '')
|
|
return [productId, signedUrl] as const
|
|
}))
|
|
|
|
featuredProductImageUrls.value = Object.fromEntries(entries.filter(([, url]) => Boolean(url)))
|
|
failedFeaturedProductImages.value = {}
|
|
}
|
|
|
|
/**
|
|
* Purpose: loadShopImages supports ShopDetailView.vue by holding or executing the load shop images 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.
|
|
*/
|
|
const loadShopImages = async () => {
|
|
const shop = shopInfo.value as ShopVO & Record<string, unknown>
|
|
const bannerDirectUrls = uniqueImageUrls([
|
|
...parseDirectImageUrls(shop.coverImageUrls),
|
|
...parseDirectImageUrls(shop.coverImageUrl),
|
|
...parseDirectImageUrls(shop.bannerImageUrls),
|
|
...parseDirectImageUrls(shop.bannerImageUrl)
|
|
])
|
|
const shopEnvironmentDirectUrls = parseDirectImageUrls(shop.imageUrls)
|
|
const trustEnvironmentUrls = parseDirectImageUrls(trustProfile.value?.environmentImages)
|
|
const bannerFileIds = uniqueImageUrls([
|
|
...parseFileIdList(shop.coverImageFileId),
|
|
...parseFileIdList(shop.bannerImageFileId),
|
|
...parseFileIdList(shop.bannerImageFileIds)
|
|
])
|
|
const environmentFileIds = parseFileIdList(shop.imageFileIds)
|
|
const [bannerSignedUrls, environmentSignedUrls] = await Promise.all([
|
|
resolvePublicImageUrls({ imageFileIds: bannerFileIds.join(',') }, ''),
|
|
resolvePublicImageUrls({ imageFileIds: environmentFileIds.join(',') }, '')
|
|
])
|
|
|
|
const bannerUrls = bannerFileIds.length > 0
|
|
? uniqueImageUrls([...bannerSignedUrls, ...bannerDirectUrls])
|
|
: uniqueImageUrls([...bannerDirectUrls, ...bannerSignedUrls])
|
|
const shopEnvironmentUrls = environmentFileIds.length > 0 ? environmentSignedUrls : shopEnvironmentDirectUrls
|
|
const fallbackTrustEnvironmentUrls = environmentFileIds.length > 0 || shopEnvironmentDirectUrls.length > 0
|
|
? []
|
|
: (bannerUrls.length > 0 || bannerFileIds.length > 0 ? trustEnvironmentUrls.slice(1) : trustEnvironmentUrls)
|
|
|
|
shopImages.value = bannerUrls.slice(0, 1)
|
|
shopEnvironmentImages.value = uniqueImageUrls([
|
|
...shopEnvironmentUrls,
|
|
...fallbackTrustEnvironmentUrls
|
|
])
|
|
}
|
|
|
|
/**
|
|
* Purpose: fetchShopDetail supports ShopDetailView.vue by holding or executing the fetch shop detail 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.
|
|
*/
|
|
const fetchShopDetail = async () => {
|
|
try {
|
|
const shopId = toOptionalIdString(route.params.id || localStorage.getItem('userShopId'))
|
|
if (!shopId) {
|
|
message.error('店铺ID不存在')
|
|
router.back()
|
|
return
|
|
}
|
|
|
|
shopInfo.value = await shopApi.getShopById(shopId)
|
|
trustProfile.value = await shopApi.getTrustProfile(shopId).catch(() => null)
|
|
await Promise.all([
|
|
loadShopArtistCount(shopId),
|
|
loadShopImages(),
|
|
loadFeaturedProductImages()
|
|
])
|
|
loadCurrentDistance()
|
|
} catch (error: any) {
|
|
message.error(error?.message || '获取店铺详情失败')
|
|
}
|
|
}
|
|
|
|
onMounted(fetchShopDetail)
|
|
</script>
|
|
|
|
<style scoped>
|
|
.shop-detail {
|
|
min-height: 100vh;
|
|
background: var(--bg-color);
|
|
position: relative;
|
|
}
|
|
|
|
.header-bg {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 120px;
|
|
background: var(--theme-gradient);
|
|
z-index: 0;
|
|
}
|
|
|
|
.header {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 100;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 15px;
|
|
background: transparent;
|
|
color: white;
|
|
}
|
|
|
|
.back-btn,
|
|
.header-placeholder {
|
|
width: 40px;
|
|
height: 40px;
|
|
}
|
|
|
|
.back-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
}
|
|
|
|
.shop-content {
|
|
padding: 100px 15px 20px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.shop-card {
|
|
border-radius: 16px;
|
|
overflow: hidden;
|
|
box-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
|
|
}
|
|
|
|
.shop-card :deep(.ant-card-body) {
|
|
padding: 24px;
|
|
}
|
|
|
|
.shop-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.shop-icon-wrapper {
|
|
width: 76px;
|
|
height: 76px;
|
|
background: var(--theme-gradient);
|
|
border-radius: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.shop-icon {
|
|
font-size: 28px;
|
|
color: white;
|
|
}
|
|
|
|
.shop-header-content {
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.shop-name {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
margin: 0 0 8px;
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.shop-address {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
margin: 0;
|
|
line-height: 1.5;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.shop-distance {
|
|
margin: 6px 0 0;
|
|
color: var(--theme-primary);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.copy-icon {
|
|
font-size: 13px;
|
|
margin-left: 6px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.shop-details {
|
|
display: grid;
|
|
gap: 16px;
|
|
margin-top: 22px;
|
|
}
|
|
|
|
.trust-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
.trust-card {
|
|
display: grid;
|
|
gap: 4px;
|
|
min-height: 74px;
|
|
padding: 12px;
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 8px;
|
|
background: var(--theme-primary-soft);
|
|
}
|
|
|
|
.trust-card strong {
|
|
color: var(--theme-primary);
|
|
font-size: 17px;
|
|
}
|
|
|
|
.trust-card span {
|
|
color: var(--text-secondary);
|
|
font-size: 12px;
|
|
line-height: 1.35;
|
|
}
|
|
|
|
.detail-label {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.detail-value {
|
|
margin-top: 6px;
|
|
font-size: 16px;
|
|
color: var(--text-primary);
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.action-area {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 10px;
|
|
margin-top: 22px;
|
|
}
|
|
|
|
.action-area .navigation-actions {
|
|
display: contents;
|
|
}
|
|
|
|
.action-area :deep(.ant-btn) {
|
|
min-width: 0;
|
|
}
|
|
|
|
.action-area :deep(.ant-alert) {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.navigation-actions {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
.shop-images {
|
|
margin-top: 24px;
|
|
}
|
|
|
|
.shop-trust-section {
|
|
margin-top: 24px;
|
|
}
|
|
|
|
.featured-products {
|
|
display: grid;
|
|
gap: 10px;
|
|
}
|
|
|
|
.featured-product {
|
|
display: grid;
|
|
grid-template-columns: 84px minmax(0, 1fr);
|
|
gap: 12px;
|
|
width: 100%;
|
|
padding: 10px;
|
|
text-align: left;
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 8px;
|
|
background: var(--theme-card-bg);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.featured-product img,
|
|
.featured-product__placeholder {
|
|
width: 84px;
|
|
height: 84px;
|
|
border-radius: 8px;
|
|
object-fit: cover;
|
|
background: var(--theme-primary-soft);
|
|
}
|
|
|
|
.featured-product__placeholder {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--theme-primary);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.featured-product strong,
|
|
.featured-product span,
|
|
.featured-product small {
|
|
display: block;
|
|
}
|
|
|
|
.featured-product strong {
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.featured-product span {
|
|
margin-top: 4px;
|
|
color: var(--theme-primary);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.featured-product small {
|
|
margin-top: 6px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.recent-reviews {
|
|
display: grid;
|
|
gap: 10px;
|
|
}
|
|
|
|
.recent-review {
|
|
padding: 12px;
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 8px;
|
|
background: var(--theme-card-bg);
|
|
}
|
|
|
|
.recent-review__head {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.recent-review__head span {
|
|
color: var(--theme-primary);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.recent-review p {
|
|
margin: 8px 0 6px;
|
|
color: var(--text-secondary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.recent-review small {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin: 0 0 12px;
|
|
}
|
|
|
|
.image-carousel {
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 4px 12px rgba(31, 41, 55, 0.12);
|
|
width: 100%;
|
|
height: 220px;
|
|
}
|
|
|
|
.carousel-item {
|
|
width: 100%;
|
|
height: 220px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.carousel-image {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.carousel-item:hover .carousel-image {
|
|
transform: scale(1.04);
|
|
}
|
|
|
|
.image-carousel :deep(.slick-dots) {
|
|
bottom: 10px;
|
|
}
|
|
|
|
.image-carousel :deep(.slick-dots li button) {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, 0.65);
|
|
}
|
|
|
|
.image-carousel :deep(.slick-dots li.slick-active button) {
|
|
width: 20px;
|
|
border-radius: 4px;
|
|
background: white;
|
|
}
|
|
|
|
.modal-image {
|
|
width: 100%;
|
|
max-height: 600px;
|
|
object-fit: contain;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.contact-box,
|
|
.map-panel {
|
|
display: grid;
|
|
gap: 14px;
|
|
}
|
|
|
|
.contact-name {
|
|
margin: 0;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.contact-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 10px 12px;
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 8px;
|
|
background: var(--theme-primary-soft);
|
|
}
|
|
|
|
.contact-row span {
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.contact-row strong {
|
|
min-width: 0;
|
|
overflow-wrap: break-word;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.contact-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.contact-qr {
|
|
width: 128px;
|
|
height: 128px;
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 8px;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.map-summary {
|
|
display: grid;
|
|
gap: 4px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.map-frame {
|
|
width: 100%;
|
|
height: 420px;
|
|
border: 0;
|
|
border-radius: 10px;
|
|
background: var(--theme-primary-soft);
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.shop-card :deep(.ant-card-body) {
|
|
padding: 18px;
|
|
}
|
|
|
|
.shop-header {
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.shop-icon-wrapper {
|
|
width: 60px;
|
|
height: 60px;
|
|
}
|
|
|
|
.shop-name {
|
|
font-size: 19px;
|
|
}
|
|
|
|
.navigation-actions {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.trust-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.map-frame {
|
|
height: 320px;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
.shop-content {
|
|
max-width: 1040px;
|
|
margin: 0 auto;
|
|
padding: 100px 24px 24px;
|
|
}
|
|
}
|
|
|
|
.shop-detail {
|
|
background:
|
|
radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--theme-primary) 26%, transparent), transparent 32%),
|
|
linear-gradient(180deg, color-mix(in srgb, var(--theme-card-bg) 76%, transparent), var(--theme-page-bg));
|
|
}
|
|
|
|
.header-bg {
|
|
height: 210px;
|
|
background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 28%, var(--theme-card-bg)), color-mix(in srgb, var(--theme-secondary) 22%, var(--theme-page-bg)));
|
|
}
|
|
|
|
.header {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.back-btn {
|
|
border-radius: 999px;
|
|
color: var(--theme-primary-action);
|
|
background: color-mix(in srgb, var(--theme-card-bg) 76%, transparent);
|
|
box-shadow: 0 12px 24px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
|
|
}
|
|
|
|
.header h1 {
|
|
color: var(--text-primary);
|
|
font-weight: 820;
|
|
}
|
|
|
|
.shop-content {
|
|
padding: 92px 18px 28px;
|
|
}
|
|
|
|
.shop-card {
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 28px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 90%, transparent);
|
|
box-shadow: 0 24px 54px color-mix(in srgb, var(--theme-neutral) 11%, transparent);
|
|
}
|
|
|
|
.shop-card :deep(.ant-card-body) {
|
|
padding: 22px;
|
|
}
|
|
|
|
.shop-icon-wrapper {
|
|
border-radius: 22px;
|
|
background: linear-gradient(135deg, var(--theme-primary-action), var(--theme-secondary));
|
|
}
|
|
|
|
.shop-name {
|
|
font-size: 20px;
|
|
font-weight: 850;
|
|
}
|
|
|
|
.shop-distance,
|
|
.trust-card strong,
|
|
.featured-product span,
|
|
.recent-review__head span {
|
|
color: var(--theme-primary-action);
|
|
}
|
|
|
|
.trust-card,
|
|
.featured-product,
|
|
.recent-review,
|
|
.contact-row {
|
|
border-radius: 18px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 86%, var(--theme-primary-soft));
|
|
}
|
|
|
|
.image-carousel,
|
|
.carousel-item,
|
|
.carousel-image {
|
|
border-radius: 22px;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 17px;
|
|
font-weight: 820;
|
|
}
|
|
|
|
:deep(.ant-btn-primary) {
|
|
border-color: transparent;
|
|
background: linear-gradient(135deg, var(--theme-primary-action), var(--theme-secondary));
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.shop-content {
|
|
padding: 92px 18px 28px;
|
|
}
|
|
|
|
.trust-grid {
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
}
|
|
}
|
|
|
|
.shop-detail {
|
|
min-height: 100vh;
|
|
padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
|
|
overflow-x: hidden;
|
|
color: var(--text-primary);
|
|
background:
|
|
linear-gradient(180deg, color-mix(in srgb, var(--theme-card-bg) 88%, var(--theme-primary-soft)) 0%, var(--theme-page-bg) 46%, color-mix(in srgb, var(--theme-secondary-soft) 20%, var(--theme-page-bg)) 100%);
|
|
}
|
|
|
|
.shop-topbar,
|
|
.booking-bar {
|
|
left: 50%;
|
|
width: min(100%, var(--app-mobile-max-width, 480px));
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
.shop-topbar {
|
|
position: fixed;
|
|
top: 0;
|
|
z-index: 100;
|
|
display: grid;
|
|
grid-template-columns: 42px minmax(0, 1fr) 42px;
|
|
align-items: center;
|
|
min-height: 52px;
|
|
padding: 6px 18px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent);
|
|
border-bottom: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
|
|
backdrop-filter: blur(18px);
|
|
}
|
|
|
|
.shop-topbar h1 {
|
|
margin: 0;
|
|
overflow: hidden;
|
|
font-size: 15px;
|
|
font-weight: 850;
|
|
line-height: 1.2;
|
|
text-align: center;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.nav-button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 38px;
|
|
height: 38px;
|
|
border-radius: 999px;
|
|
color: var(--theme-primary-action);
|
|
background: color-mix(in srgb, var(--theme-card-bg) 78%, transparent);
|
|
box-shadow: 0 10px 24px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
|
|
}
|
|
|
|
.shop-content {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: grid;
|
|
gap: 18px;
|
|
width: min(100%, var(--app-mobile-max-width, 480px));
|
|
margin: 0 auto;
|
|
padding: 52px 16px 28px;
|
|
}
|
|
|
|
.shop-hero {
|
|
position: relative;
|
|
min-height: 292px;
|
|
margin: 0 -16px;
|
|
overflow: hidden;
|
|
background: var(--theme-primary-soft);
|
|
}
|
|
|
|
.shop-hero img,
|
|
.shop-hero-placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
min-height: 292px;
|
|
}
|
|
|
|
.shop-hero img {
|
|
display: block;
|
|
object-fit: cover;
|
|
object-position: center;
|
|
cursor: zoom-in;
|
|
}
|
|
|
|
.shop-hero-placeholder {
|
|
display: grid;
|
|
place-items: center;
|
|
color: color-mix(in srgb, var(--theme-primary-action) 42%, transparent);
|
|
font-size: 54px;
|
|
}
|
|
|
|
.shop-summary-card {
|
|
position: relative;
|
|
z-index: 2;
|
|
display: grid;
|
|
gap: 16px;
|
|
margin-top: -54px;
|
|
padding: 18px;
|
|
border: 1px solid color-mix(in srgb, var(--theme-card-bg) 74%, var(--theme-border));
|
|
border-radius: 22px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 94%, transparent);
|
|
box-shadow: 0 20px 48px color-mix(in srgb, var(--theme-neutral) 12%, transparent);
|
|
backdrop-filter: blur(18px);
|
|
}
|
|
|
|
.summary-head,
|
|
.section-head,
|
|
.recent-review__head {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
|
|
.summary-copy {
|
|
min-width: 0;
|
|
}
|
|
|
|
.section-kicker {
|
|
display: block;
|
|
margin-bottom: 6px;
|
|
color: var(--theme-secondary);
|
|
font-size: 11px;
|
|
font-weight: 800;
|
|
letter-spacing: 0;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.shop-name {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
max-width: 100%;
|
|
margin: 0;
|
|
overflow-wrap: anywhere;
|
|
color: var(--text-primary);
|
|
font-size: 20px;
|
|
font-weight: 880;
|
|
line-height: 1.18;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.shop-address {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 6px;
|
|
margin: 9px 0 0;
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
line-height: 1.45;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.shop-address span {
|
|
min-width: 0;
|
|
}
|
|
|
|
.shop-distance {
|
|
margin: 8px 0 0;
|
|
color: var(--theme-primary-action);
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.copy-icon {
|
|
flex: 0 0 auto;
|
|
margin-left: 5px;
|
|
color: var(--theme-secondary);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.status-chip {
|
|
flex: 0 0 auto;
|
|
max-width: 104px;
|
|
padding: 7px 10px;
|
|
border-radius: 999px;
|
|
color: var(--theme-primary-action);
|
|
background: color-mix(in srgb, var(--theme-primary) 20%, var(--theme-card-bg));
|
|
font-size: 12px;
|
|
font-weight: 800;
|
|
line-height: 1.2;
|
|
text-align: center;
|
|
}
|
|
|
|
.trust-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
gap: 9px;
|
|
}
|
|
|
|
.trust-card {
|
|
appearance: none;
|
|
display: grid;
|
|
gap: 5px;
|
|
min-height: 70px;
|
|
padding: 10px 8px;
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 66%, transparent);
|
|
border-radius: 14px;
|
|
color: inherit;
|
|
background: color-mix(in srgb, var(--theme-primary-soft) 62%, var(--theme-card-bg));
|
|
cursor: pointer;
|
|
font: inherit;
|
|
text-align: left;
|
|
transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
|
|
}
|
|
|
|
.trust-card:hover,
|
|
.trust-card:focus {
|
|
border-color: color-mix(in srgb, var(--theme-primary) 52%, var(--theme-border));
|
|
box-shadow: 0 12px 28px color-mix(in srgb, var(--theme-primary) 14%, transparent);
|
|
outline: 0;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.trust-card strong {
|
|
overflow: hidden;
|
|
color: var(--theme-primary-action);
|
|
font-size: 15px;
|
|
font-weight: 850;
|
|
line-height: 1.2;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.trust-card span {
|
|
display: -webkit-box;
|
|
overflow: hidden;
|
|
color: var(--text-secondary);
|
|
font-size: 11px;
|
|
line-height: 1.3;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 2;
|
|
}
|
|
|
|
.quick-actions {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
|
|
gap: 10px;
|
|
}
|
|
|
|
.quick-actions :deep(.ant-btn) {
|
|
min-width: 0;
|
|
height: 42px;
|
|
border-radius: 999px;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.content-section {
|
|
display: grid;
|
|
gap: 14px;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
.section-head h3 {
|
|
margin: 0;
|
|
color: var(--text-primary);
|
|
font-size: 18px;
|
|
font-weight: 850;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.section-link {
|
|
border: 0;
|
|
color: var(--theme-primary-action);
|
|
background: transparent;
|
|
font-size: 12px;
|
|
font-weight: 800;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.environment-carousel {
|
|
position: relative;
|
|
aspect-ratio: 16 / 10;
|
|
overflow: hidden;
|
|
border-radius: 18px;
|
|
background: var(--theme-primary-soft);
|
|
box-shadow: 0 14px 30px color-mix(in srgb, var(--theme-neutral) 10%, transparent);
|
|
}
|
|
|
|
.environment-carousel :deep(.slick-list),
|
|
.environment-carousel :deep(.slick-track),
|
|
.environment-carousel :deep(.slick-slide),
|
|
.environment-carousel :deep(.slick-slide > div) {
|
|
height: 100%;
|
|
}
|
|
|
|
.environment-slide {
|
|
position: relative;
|
|
height: 100%;
|
|
}
|
|
|
|
.environment-card {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 0;
|
|
background: var(--theme-primary-soft);
|
|
cursor: zoom-in;
|
|
}
|
|
|
|
.environment-card img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
object-position: center;
|
|
}
|
|
|
|
.environment-carousel :deep(.slick-dots) {
|
|
bottom: 12px;
|
|
}
|
|
|
|
.environment-carousel :deep(.slick-dots li button) {
|
|
width: 7px;
|
|
height: 7px;
|
|
border-radius: 999px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 78%, transparent);
|
|
opacity: 1;
|
|
}
|
|
|
|
.environment-carousel :deep(.slick-dots li.slick-active button) {
|
|
width: 18px;
|
|
background: var(--theme-card-bg);
|
|
}
|
|
|
|
.intro-copy {
|
|
margin: 0;
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
line-height: 1.8;
|
|
}
|
|
|
|
.intro-facts {
|
|
display: grid;
|
|
gap: 10px;
|
|
}
|
|
|
|
.intro-fact {
|
|
display: grid;
|
|
grid-template-columns: 34px minmax(0, 1fr);
|
|
gap: 10px;
|
|
align-items: center;
|
|
padding: 12px;
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 68%, transparent);
|
|
border-radius: 16px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 84%, var(--theme-primary-soft));
|
|
}
|
|
|
|
.intro-fact :deep(.anticon) {
|
|
display: grid;
|
|
width: 34px;
|
|
height: 34px;
|
|
place-items: center;
|
|
border-radius: 999px;
|
|
color: var(--theme-primary-action);
|
|
background: color-mix(in srgb, var(--theme-primary) 18%, var(--theme-card-bg));
|
|
}
|
|
|
|
.intro-fact span,
|
|
.featured-product small,
|
|
.recent-review small {
|
|
display: block;
|
|
color: var(--text-secondary);
|
|
font-size: 12px;
|
|
line-height: 1.35;
|
|
}
|
|
|
|
.intro-fact strong {
|
|
display: block;
|
|
margin-top: 3px;
|
|
overflow-wrap: anywhere;
|
|
color: var(--text-primary);
|
|
font-size: 13px;
|
|
font-weight: 780;
|
|
line-height: 1.35;
|
|
}
|
|
|
|
.featured-products {
|
|
display: grid;
|
|
gap: 14px;
|
|
}
|
|
|
|
.featured-product {
|
|
display: grid;
|
|
grid-template-columns: 82px minmax(0, 1fr);
|
|
align-items: center;
|
|
gap: 12px;
|
|
width: 100%;
|
|
min-height: 104px;
|
|
padding: 10px 14px 10px 10px;
|
|
overflow: hidden;
|
|
text-align: left;
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 68%, transparent);
|
|
border-radius: 20px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 92%, transparent);
|
|
box-shadow: 0 16px 34px color-mix(in srgb, var(--theme-neutral) 9%, transparent);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.featured-product .featured-product__image {
|
|
display: block;
|
|
width: 82px;
|
|
height: 82px;
|
|
margin-top: 0;
|
|
overflow: hidden;
|
|
border-radius: 14px;
|
|
color: inherit;
|
|
background: var(--theme-primary-soft);
|
|
font-weight: inherit;
|
|
}
|
|
|
|
.featured-product .featured-product__image img,
|
|
.featured-product .featured-product__placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.featured-product .featured-product__image img {
|
|
display: block;
|
|
border-radius: 0;
|
|
background: transparent;
|
|
object-fit: cover;
|
|
object-position: center;
|
|
}
|
|
|
|
.featured-product .featured-product__placeholder {
|
|
display: grid;
|
|
place-items: center;
|
|
color: var(--theme-primary-action);
|
|
font-size: 34px;
|
|
font-weight: 850;
|
|
}
|
|
|
|
.featured-product .featured-product__copy {
|
|
display: grid;
|
|
gap: 5px;
|
|
min-width: 0;
|
|
margin-top: 0;
|
|
color: inherit;
|
|
font-weight: inherit;
|
|
}
|
|
|
|
.featured-product strong {
|
|
overflow: hidden;
|
|
color: var(--text-primary);
|
|
font-size: 15px;
|
|
font-weight: 850;
|
|
line-height: 1.25;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.featured-product span:not(.featured-product__image):not(.featured-product__copy):not(.featured-product__placeholder) {
|
|
color: var(--theme-primary-action);
|
|
font-size: 15px;
|
|
font-weight: 850;
|
|
}
|
|
|
|
.recent-reviews {
|
|
display: grid;
|
|
gap: 10px;
|
|
}
|
|
|
|
.recent-review {
|
|
padding: 14px;
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 70%, transparent);
|
|
border-radius: 16px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 88%, var(--theme-primary-soft));
|
|
}
|
|
|
|
.recent-review__head strong {
|
|
min-width: 0;
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.recent-review__head span {
|
|
flex: 0 0 auto;
|
|
color: var(--theme-primary-action);
|
|
font-weight: 850;
|
|
}
|
|
|
|
.recent-review p {
|
|
margin: 8px 0 6px;
|
|
color: var(--text-secondary);
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.navigation-actions {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
.navigation-actions :deep(.ant-btn) {
|
|
min-width: 0;
|
|
border-radius: 14px;
|
|
}
|
|
|
|
.booking-bar {
|
|
position: fixed;
|
|
bottom: 0;
|
|
z-index: 120;
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
|
|
gap: 10px;
|
|
padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
|
|
border-top: 1px solid color-mix(in srgb, var(--theme-border) 70%, transparent);
|
|
background: color-mix(in srgb, var(--theme-card-bg) 92%, transparent);
|
|
backdrop-filter: blur(18px);
|
|
box-shadow: 0 -12px 30px color-mix(in srgb, var(--theme-neutral) 9%, transparent);
|
|
}
|
|
|
|
.booking-bar button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
min-width: 0;
|
|
min-height: 46px;
|
|
border-radius: 999px;
|
|
font-size: 14px;
|
|
font-weight: 850;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.booking-secondary {
|
|
border: 1px solid color-mix(in srgb, var(--theme-primary) 36%, var(--theme-border));
|
|
color: var(--theme-primary-action);
|
|
background: var(--theme-card-bg);
|
|
}
|
|
|
|
.booking-primary {
|
|
border: 0;
|
|
color: var(--theme-card-bg);
|
|
background: linear-gradient(135deg, var(--theme-primary-action), var(--theme-secondary));
|
|
box-shadow: var(--theme-button-shadow);
|
|
}
|
|
|
|
.modal-image {
|
|
width: 100%;
|
|
max-height: 70vh;
|
|
object-fit: contain;
|
|
border-radius: 14px;
|
|
}
|
|
|
|
.contact-box,
|
|
.map-panel {
|
|
display: grid;
|
|
gap: 14px;
|
|
}
|
|
|
|
.contact-name {
|
|
margin: 0;
|
|
color: var(--text-primary);
|
|
font-weight: 850;
|
|
}
|
|
|
|
.contact-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 11px 12px;
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 14px;
|
|
background: color-mix(in srgb, var(--theme-card-bg) 88%, var(--theme-primary-soft));
|
|
}
|
|
|
|
.contact-row span {
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.contact-row strong {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.contact-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.contact-actions :deep(.ant-btn) {
|
|
border-radius: 999px;
|
|
}
|
|
|
|
.contact-qr {
|
|
width: 128px;
|
|
height: 128px;
|
|
border: 1px solid var(--theme-border);
|
|
border-radius: 14px;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.map-summary {
|
|
display: grid;
|
|
gap: 4px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.map-frame {
|
|
width: 100%;
|
|
height: 420px;
|
|
border: 0;
|
|
border-radius: 16px;
|
|
background: var(--theme-primary-soft);
|
|
}
|
|
|
|
@media (max-width: 380px) {
|
|
.shop-content {
|
|
padding-right: 14px;
|
|
padding-left: 14px;
|
|
}
|
|
|
|
.shop-hero {
|
|
margin-right: -14px;
|
|
margin-left: -14px;
|
|
}
|
|
|
|
.trust-card {
|
|
padding: 9px 6px;
|
|
}
|
|
|
|
.quick-actions,
|
|
.navigation-actions,
|
|
.booking-bar {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.shop-content {
|
|
padding-right: 0;
|
|
padding-left: 0;
|
|
}
|
|
|
|
.shop-hero {
|
|
margin-right: 0;
|
|
margin-left: 0;
|
|
border-radius: 0 0 28px 28px;
|
|
}
|
|
}
|
|
</style>
|