修复:对齐用户端店铺页面
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<ShoppingOutlined :style="{ fontSize: '22px' }" />
|
<ShoppingOutlined :style="{ fontSize: '22px' }" />
|
||||||
</div>
|
</div>
|
||||||
</a-badge>
|
</a-badge>
|
||||||
<span class="nav-label">作品</span>
|
<span class="nav-label">作品集</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button class="nav-item" :class="{ active: currentRoute === 'cart' }" type="button" @click="handleNavClick('cart')">
|
<button class="nav-item" :class="{ active: currentRoute === 'cart' }" type="button" @click="handleNavClick('cart')">
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mobile-container">
|
<div class="mobile-container">
|
||||||
<main class="auth-page">
|
<main class="auth-page">
|
||||||
<section class="brand-stage" aria-label="YumiNail">
|
<section class="brand-stage" aria-label="指尖设计师">
|
||||||
<div class="brand-mark" aria-hidden="true">
|
<div class="brand-mark" aria-hidden="true">
|
||||||
<span>Y</span>
|
<span>指</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="brand-name">YumiNail</p>
|
<p class="brand-name">指尖设计师</p>
|
||||||
<h1 class="brand-title">
|
<h1 class="brand-title">
|
||||||
{{ activeTab === 'login' ? '艺术触手可及' : '开启你的预约账号' }}
|
{{ activeTab === 'login' ? '艺术触手可及' : '开启你的预约账号' }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -6,10 +6,12 @@
|
|||||||
<LeftOutlined />
|
<LeftOutlined />
|
||||||
</button>
|
</button>
|
||||||
<div class="header-title">
|
<div class="header-title">
|
||||||
<span>{{ isBuyNowMode ? '确认订单' : '购物车' }}</span>
|
<strong>{{ isBuyNowMode ? '确认订单' : '购物车' }}</strong>
|
||||||
<strong>YumiNail</strong>
|
</div>
|
||||||
|
<div class="header-count" aria-label="购物车数量">
|
||||||
|
<ShoppingOutlined />
|
||||||
|
<span v-if="cartItems.length">{{ cartItems.length }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-count" aria-label="购物车数量">{{ cartItems.length }}</div>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<a-empty v-if="!cartItems.length" class="empty-cart" description="购物车还是空的">
|
<a-empty v-if="!cartItems.length" class="empty-cart" description="购物车还是空的">
|
||||||
@@ -58,9 +60,9 @@
|
|||||||
<div class="checkout-layout">
|
<div class="checkout-layout">
|
||||||
<section class="cart-group-card" aria-label="购物车商品">
|
<section class="cart-group-card" aria-label="购物车商品">
|
||||||
<div class="group-head">
|
<div class="group-head">
|
||||||
<div class="shop-mark">Y</div>
|
<div class="shop-mark">指</div>
|
||||||
<div class="group-copy">
|
<div class="group-copy">
|
||||||
<span>YumiNail Studio</span>
|
<span>{{ checkoutShopName }}</span>
|
||||||
<strong>{{ cartItems.length }} 项作品</strong>
|
<strong>{{ cartItems.length }} 项作品</strong>
|
||||||
</div>
|
</div>
|
||||||
<em>{{ selectedCount }} 项已选</em>
|
<em>{{ selectedCount }} 项已选</em>
|
||||||
@@ -287,7 +289,7 @@
|
|||||||
*/
|
*/
|
||||||
import { computed, inject, onMounted, ref } from 'vue'
|
import { computed, inject, onMounted, ref } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { DeleteOutlined, LeftOutlined, RightOutlined } from '@ant-design/icons-vue'
|
import { DeleteOutlined, LeftOutlined, RightOutlined, ShoppingOutlined } from '@ant-design/icons-vue'
|
||||||
import { message, Modal } from 'ant-design-vue'
|
import { message, Modal } from 'ant-design-vue'
|
||||||
import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'
|
import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'
|
||||||
import { cartApi } from '../api/cart'
|
import { cartApi } from '../api/cart'
|
||||||
@@ -352,6 +354,7 @@ interface CartItem {
|
|||||||
id: IdType
|
id: IdType
|
||||||
productId: IdType
|
productId: IdType
|
||||||
shopId?: IdType
|
shopId?: IdType
|
||||||
|
shopName?: string
|
||||||
productTitle: string
|
productTitle: string
|
||||||
productImage: string
|
productImage: string
|
||||||
originalProductImage?: string
|
originalProductImage?: string
|
||||||
@@ -439,6 +442,26 @@ const isBuyNowMode = computed(() => Boolean(buyNowProductId.value))
|
|||||||
|
|
||||||
/** selectedItems is a reactive state variable used by the template and event handlers. */
|
/** selectedItems is a reactive state variable used by the template and event handlers. */
|
||||||
const selectedItems = computed(() => cartItems.value.filter(item => item.selected))
|
const selectedItems = computed(() => cartItems.value.filter(item => item.selected))
|
||||||
|
const checkoutShopName = computed(() => {
|
||||||
|
const itemWithShopName = selectedItems.value.find(item => item.shopName) || cartItems.value.find(item => item.shopName)
|
||||||
|
if (itemWithShopName?.shopName) {
|
||||||
|
return itemWithShopName.shopName
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
try {
|
||||||
|
const raw = localStorage.getItem('userInfo')
|
||||||
|
const storedUser = raw ? JSON.parse(raw) as { shopName?: string } : null
|
||||||
|
if (storedUser?.shopName) {
|
||||||
|
return storedUser.shopName
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// Ignore malformed cached user data and fall back to the neutral shop label.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return '当前门店'
|
||||||
|
})
|
||||||
/** selectedCount is a reactive state variable used by the template and event handlers. */
|
/** selectedCount is a reactive state variable used by the template and event handlers. */
|
||||||
const selectedCount = computed(() => selectedItems.value.length)
|
const selectedCount = computed(() => selectedItems.value.length)
|
||||||
/** totalQuantity is a reactive state variable used by the template and event handlers. */
|
/** totalQuantity is a reactive state variable used by the template and event handlers. */
|
||||||
@@ -1033,6 +1056,7 @@ onMounted(async () => {
|
|||||||
--cart-radius-lg: 24px;
|
--cart-radius-lg: 24px;
|
||||||
--cart-radius-md: 18px;
|
--cart-radius-md: 18px;
|
||||||
--cart-bottom-offset: 60px;
|
--cart-bottom-offset: 60px;
|
||||||
|
--cart-shell-width: var(--frontend-page-max-width);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
background:
|
background:
|
||||||
@@ -1041,7 +1065,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
width: min(100%, 430px);
|
width: min(100%, var(--cart-shell-width));
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 16px calc(168px + env(safe-area-inset-bottom));
|
padding: 0 16px calc(168px + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
@@ -1079,6 +1103,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header-count {
|
.header-count {
|
||||||
|
position: relative;
|
||||||
justify-self: end;
|
justify-self: end;
|
||||||
color: var(--theme-secondary);
|
color: var(--theme-secondary);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -1090,26 +1115,34 @@ onMounted(async () => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-title span,
|
|
||||||
.header-title strong {
|
.header-title strong {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-title span {
|
|
||||||
color: var(--text-secondary);
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-title strong {
|
.header-title strong {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
font-size: 15px;
|
font-size: 16px;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-count span {
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
right: 3px;
|
||||||
|
min-width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
padding: 0 4px;
|
||||||
|
border: 1px solid var(--theme-card-bg);
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--theme-primary);
|
||||||
|
color: var(--theme-accent);
|
||||||
|
font-size: 9px;
|
||||||
|
line-height: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.empty-cart {
|
.empty-cart {
|
||||||
margin-top: 64px;
|
margin-top: 64px;
|
||||||
padding: 44px 18px;
|
padding: 44px 18px;
|
||||||
@@ -1745,7 +1778,7 @@ onMounted(async () => {
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
bottom: var(--cart-bottom-offset);
|
bottom: var(--cart-bottom-offset);
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
width: min(100%, 430px);
|
width: min(100%, var(--cart-shell-width));
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ onMounted(loadContact)
|
|||||||
|
|
||||||
<main class="content">
|
<main class="content">
|
||||||
<section class="hero-card">
|
<section class="hero-card">
|
||||||
<span>YumiNail Support</span>
|
<span>指尖设计师客服</span>
|
||||||
<h2>帮助与客服</h2>
|
<h2>帮助与客服</h2>
|
||||||
<p>订单、预约、售后和账号问题都可以从这里继续处理。</p>
|
<p>订单、预约、售后和账号问题都可以从这里继续处理。</p>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<button class="yumi-icon-button" type="button" aria-label="打开菜单" @click="router.push('/profile')">
|
<button class="yumi-icon-button" type="button" aria-label="打开菜单" @click="router.push('/profile')">
|
||||||
<MenuOutlined />
|
<MenuOutlined />
|
||||||
</button>
|
</button>
|
||||||
<strong class="home-brand">YumiNail</strong>
|
<strong class="home-brand">首页</strong>
|
||||||
<button class="yumi-icon-button" type="button" aria-label="查看购物车" @click="router.push('/cart')">
|
<button class="yumi-icon-button" type="button" aria-label="查看购物车" @click="router.push('/cart')">
|
||||||
<ShoppingOutlined />
|
<ShoppingOutlined />
|
||||||
</button>
|
</button>
|
||||||
@@ -13,8 +13,11 @@
|
|||||||
<section class="hero">
|
<section class="hero">
|
||||||
<div class="hero-copy" @click="handleUserClick">
|
<div class="hero-copy" @click="handleUserClick">
|
||||||
<p class="hero-kicker">{{ greeting }}</p>
|
<p class="hero-kicker">{{ greeting }}</p>
|
||||||
<h1>早上好,{{ displayName }}</h1>
|
<h1>{{ displayName }}</h1>
|
||||||
<p>{{ isLoggedIn ? '为你挑选今天适合预约的美甲灵感。' : '先看看门店和作品,喜欢了再登录也可以。' }}</p>
|
<div class="member-line" aria-label="会员等级">
|
||||||
|
<span></span>
|
||||||
|
<p>{{ memberLevelText }}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="avatar-button" type="button" @click="handleUserClick">
|
<button class="avatar-button" type="button" @click="handleUserClick">
|
||||||
<a-avatar :size="42" :src="userInfo?.avatar || DEFAULT_AVATAR" />
|
<a-avatar :size="42" :src="userInfo?.avatar || DEFAULT_AVATAR" />
|
||||||
@@ -23,7 +26,7 @@
|
|||||||
|
|
||||||
<form class="search-card" @submit.prevent="handleSearch">
|
<form class="search-card" @submit.prevent="handleSearch">
|
||||||
<SearchOutlined class="search-card__icon" />
|
<SearchOutlined class="search-card__icon" />
|
||||||
<input v-model="searchQuery" type="search" placeholder="搜索美甲风格或美甲师..." />
|
<input v-model="searchQuery" type="search" placeholder="搜索服务或美甲款式..." />
|
||||||
<button type="submit">搜索</button>
|
<button type="submit">搜索</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@@ -75,19 +78,19 @@
|
|||||||
/>
|
/>
|
||||||
<div class="feature-banner__shade"></div>
|
<div class="feature-banner__shade"></div>
|
||||||
<div class="feature-banner__copy">
|
<div class="feature-banner__copy">
|
||||||
<span>新品上线</span>
|
<span>新品上市</span>
|
||||||
<h2>{{ item.name }}</h2>
|
<h2>{{ item.name }}</h2>
|
||||||
<p>{{ item.shopName || item.meta }} · ¥{{ item.price }}</p>
|
<p>{{ item.shopName || item.meta }} · ¥{{ item.price }}</p>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</a-carousel>
|
</a-carousel>
|
||||||
<button v-else-if="featuredItems.length || popularItems.length" class="new-arrival-card" type="button" @click="router.push('/products')">
|
<button v-else class="new-arrival-card" type="button" @click="router.push('/products')">
|
||||||
<img :src="DEFAULT_PRODUCT_IMAGE" alt="春日柔彩系列" class="feature-banner__image" />
|
<img :src="DEFAULT_PRODUCT_IMAGE" alt="春日繁花系列" class="feature-banner__image" loading="eager" decoding="async" />
|
||||||
<div class="feature-banner__shade"></div>
|
<div class="feature-banner__shade"></div>
|
||||||
<div class="feature-banner__copy">
|
<div class="feature-banner__copy">
|
||||||
<span>新品上线</span>
|
<span>新品上市</span>
|
||||||
<h2>春日柔彩系列</h2>
|
<h2>春日繁花系列</h2>
|
||||||
<p>轻盈裸粉、微闪珠光与日常通勤都刚好。</p>
|
<p>轻盈裸粉、微闪珠光与日常通勤都刚好。</p>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
@@ -96,19 +99,19 @@
|
|||||||
<nav class="quick-actions" aria-label="快捷入口">
|
<nav class="quick-actions" aria-label="快捷入口">
|
||||||
<button type="button" @click="router.push('/products')">
|
<button type="button" @click="router.push('/products')">
|
||||||
<span><CalendarOutlined /></span>
|
<span><CalendarOutlined /></span>
|
||||||
<b>约时间</b>
|
<b>在线预约</b>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" @click="router.push('/products')">
|
<button type="button" @click="router.push('/products')">
|
||||||
<span><ShopOutlined /></span>
|
<span><AppstoreOutlined /></span>
|
||||||
<b>找门店</b>
|
<b>作品集</b>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" @click="router.push('/cart')">
|
<button type="button" @click="router.push('/vip-center')">
|
||||||
<span><ShoppingOutlined /></span>
|
<span><CreditCardOutlined /></span>
|
||||||
<b>购物车</b>
|
<b>会员中心</b>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" @click="router.push('/wishlist')">
|
<button type="button" @click="router.push('/coupons')">
|
||||||
<span><HeartOutlined /></span>
|
<span><TagsOutlined /></span>
|
||||||
<b>我的收藏</b>
|
<b>优惠活动</b>
|
||||||
</button>
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@@ -196,7 +199,7 @@
|
|||||||
<h3>门店环境</h3>
|
<h3>门店环境</h3>
|
||||||
</div>
|
</div>
|
||||||
<button class="see-all" type="button" @click="router.push('/products')">
|
<button class="see-all" type="button" @click="router.push('/products')">
|
||||||
去预约 <RightOutlined />
|
参观门店 <RightOutlined />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="shop-strip">
|
<div class="shop-strip">
|
||||||
@@ -224,13 +227,14 @@ import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import {
|
import {
|
||||||
|
AppstoreOutlined,
|
||||||
CalendarOutlined,
|
CalendarOutlined,
|
||||||
HeartOutlined,
|
CreditCardOutlined,
|
||||||
MenuOutlined,
|
MenuOutlined,
|
||||||
RightOutlined,
|
RightOutlined,
|
||||||
SearchOutlined,
|
SearchOutlined,
|
||||||
ShopOutlined,
|
|
||||||
ShoppingOutlined,
|
ShoppingOutlined,
|
||||||
|
TagsOutlined,
|
||||||
} from '@ant-design/icons-vue'
|
} from '@ant-design/icons-vue'
|
||||||
/**
|
/**
|
||||||
* Purpose: AnnouncementVO supports HomeView.vue by holding or executing the announcement vo page or API role.
|
* Purpose: AnnouncementVO supports HomeView.vue by holding or executing the announcement vo page or API role.
|
||||||
@@ -348,9 +352,10 @@ const pageSize = 8
|
|||||||
/** isLoggedIn is a reactive state variable used by the template and event handlers. */
|
/** isLoggedIn is a reactive state variable used by the template and event handlers. */
|
||||||
const isLoggedIn = computed(() => Boolean(localStorage.getItem('accessToken') || sessionStorage.getItem('accessToken')))
|
const isLoggedIn = computed(() => Boolean(localStorage.getItem('accessToken') || sessionStorage.getItem('accessToken')))
|
||||||
/** greeting is a reactive state variable used by the template and event handlers. */
|
/** greeting is a reactive state variable used by the template and event handlers. */
|
||||||
const greeting = computed(() => (isLoggedIn.value ? '欢迎回来' : '游客模式'))
|
const greeting = computed(() => '早上好,')
|
||||||
/** displayName is a reactive state variable used by the template and event handlers. */
|
/** displayName is a reactive state variable used by the template and event handlers. */
|
||||||
const displayName = computed(() => userInfo.value?.nickname || (isLoggedIn.value ? '用户' : '先看看门店和作品'))
|
const displayName = computed(() => userInfo.value?.nickname || (isLoggedIn.value ? '用户' : '朋友'))
|
||||||
|
const memberLevelText = computed(() => `会员等级:${userInfo.value?.level || (isLoggedIn.value ? '普通会员' : '游客')}`)
|
||||||
/** announcementLoop is a reactive state variable used by the template and event handlers. */
|
/** announcementLoop is a reactive state variable used by the template and event handlers. */
|
||||||
const announcementLoop = computed(() => [...announcements.value, ...announcements.value].map((item, index) => ({ ...item, loopKey: index })))
|
const announcementLoop = computed(() => [...announcements.value, ...announcements.value].map((item, index) => ({ ...item, loopKey: index })))
|
||||||
const selectedAnnouncementContentHtml = computed(() => renderRichContent(selectedAnnouncement.value?.content || '暂无公告内容'))
|
const selectedAnnouncementContentHtml = computed(() => renderRichContent(selectedAnnouncement.value?.content || '暂无公告内容'))
|
||||||
@@ -587,13 +592,10 @@ onMounted(async () => {
|
|||||||
loadAnnouncements(),
|
loadAnnouncements(),
|
||||||
loadNewArrivalProducts(),
|
loadNewArrivalProducts(),
|
||||||
loadFeaturedProducts(),
|
loadFeaturedProducts(),
|
||||||
loadPopularProducts()
|
loadPopularProducts(),
|
||||||
|
loadPublicShops()
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!isLoggedIn.value) {
|
|
||||||
homeTasks.push(loadPublicShops())
|
|
||||||
}
|
|
||||||
|
|
||||||
await Promise.all(homeTasks)
|
await Promise.all(homeTasks)
|
||||||
window.addEventListener('scroll', handleScroll)
|
window.addEventListener('scroll', handleScroll)
|
||||||
})
|
})
|
||||||
@@ -1068,17 +1070,23 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.home-topbar {
|
.home-topbar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 40;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 12px 18px 6px;
|
padding: 12px 18px 9px;
|
||||||
|
border-bottom: 1px solid color-mix(in srgb, var(--theme-border) 78%, transparent);
|
||||||
|
background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-brand {
|
.home-brand {
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
font-family: Georgia, 'Times New Roman', serif;
|
font-size: 16px;
|
||||||
font-size: 15px;
|
font-weight: 800;
|
||||||
font-weight: 700;
|
letter-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero {
|
.hero {
|
||||||
@@ -1108,8 +1116,23 @@ onUnmounted(() => {
|
|||||||
line-height: 1.12;
|
line-height: 1.12;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero p:last-child {
|
.member-line {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
margin: 7px 0 0;
|
margin: 7px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-line span {
|
||||||
|
display: inline-block;
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--theme-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-line p {
|
||||||
|
margin: 0;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
@@ -1181,6 +1204,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.feature-banner {
|
.feature-banner {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
aspect-ratio: 4 / 3;
|
||||||
min-height: 132px;
|
min-height: 132px;
|
||||||
margin: 16px 18px 0;
|
margin: 16px 18px 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -1193,17 +1217,25 @@ onUnmounted(() => {
|
|||||||
.new-arrival-carousel,
|
.new-arrival-carousel,
|
||||||
.new-arrival-card,
|
.new-arrival-card,
|
||||||
.new-arrival-slide,
|
.new-arrival-slide,
|
||||||
|
.new-arrival-carousel :deep(.slick-slider),
|
||||||
.new-arrival-carousel :deep(.slick-list),
|
.new-arrival-carousel :deep(.slick-list),
|
||||||
.new-arrival-carousel :deep(.slick-track),
|
.new-arrival-carousel :deep(.slick-track),
|
||||||
.new-arrival-carousel :deep(.slick-slide),
|
.new-arrival-carousel :deep(.slick-slide),
|
||||||
.new-arrival-carousel :deep(.slick-slide > div) {
|
.new-arrival-carousel :deep(.slick-slide > div) {
|
||||||
min-height: 132px;
|
height: 100% !important;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-arrival-carousel,
|
||||||
|
.new-arrival-card {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-arrival-card {
|
.new-arrival-card {
|
||||||
position: relative;
|
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -1212,6 +1244,11 @@ onUnmounted(() => {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.new-arrival-slide {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.new-arrival-carousel :deep(.slick-dots) {
|
.new-arrival-carousel :deep(.slick-dots) {
|
||||||
right: 16px;
|
right: 16px;
|
||||||
bottom: 14px;
|
bottom: 14px;
|
||||||
@@ -1239,6 +1276,7 @@ onUnmounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
object-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-banner__shade {
|
.feature-banner__shade {
|
||||||
@@ -1253,7 +1291,8 @@ onUnmounted(() => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 132px;
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
max-width: 72%;
|
max-width: 72%;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="not-found-container">
|
<div class="not-found-container">
|
||||||
<div class="not-found-content">
|
<div class="not-found-content">
|
||||||
<span class="not-found-kicker">YumiNail</span>
|
<span class="not-found-kicker">指尖设计师</span>
|
||||||
<div class="error-code">404</div>
|
<div class="error-code">404</div>
|
||||||
<h1>这页去做护理了</h1>
|
<h1>这页去做护理了</h1>
|
||||||
<p>您访问的页面不存在或已被删除,我们带您回到首页继续浏览作品。</p>
|
<p>您访问的页面不存在或已被删除,我们带您回到首页继续浏览作品。</p>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<LeftOutlined :style="{ fontSize: '19px' }" />
|
<LeftOutlined :style="{ fontSize: '19px' }" />
|
||||||
</a-button>
|
</a-button>
|
||||||
<div class="order-header__copy">
|
<div class="order-header__copy">
|
||||||
<span>YumiNail</span>
|
<span>指尖设计师</span>
|
||||||
<h1 class="order-header__title">订单中心</h1>
|
<h1 class="order-header__title">订单中心</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-header__spacer" />
|
<div class="order-header__spacer" />
|
||||||
@@ -1048,6 +1048,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.order-page {
|
.order-page {
|
||||||
|
--order-shell-width: var(--frontend-page-max-width);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
min-height: 100svh;
|
min-height: 100svh;
|
||||||
padding-top: 64px;
|
padding-top: 64px;
|
||||||
@@ -1065,19 +1066,20 @@ onMounted(async () => {
|
|||||||
.order-header {
|
.order-header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
left: 50%;
|
||||||
left: 0;
|
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 42px minmax(0, 1fr) 42px;
|
grid-template-columns: 42px minmax(0, 1fr) 42px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
width: min(100%, var(--order-shell-width));
|
||||||
height: 64px;
|
height: 64px;
|
||||||
padding: 8px 18px;
|
padding: 8px 18px;
|
||||||
border-bottom: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
|
border-bottom: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
|
||||||
background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent);
|
background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent);
|
||||||
-webkit-backdrop-filter: blur(18px);
|
-webkit-backdrop-filter: blur(18px);
|
||||||
backdrop-filter: blur(18px);
|
backdrop-filter: blur(18px);
|
||||||
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-header__back,
|
.order-header__back,
|
||||||
@@ -1121,8 +1123,8 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.order-content {
|
.order-content {
|
||||||
width: 100%;
|
width: min(100%, var(--order-shell-width));
|
||||||
max-width: 480px;
|
max-width: var(--order-shell-width);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 14px 16px 30px;
|
padding: 14px 16px 30px;
|
||||||
}
|
}
|
||||||
@@ -1707,28 +1709,20 @@ onMounted(async () => {
|
|||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.order-content {
|
.order-content {
|
||||||
max-width: 720px;
|
padding: 14px 16px 30px;
|
||||||
padding: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-tabs {
|
|
||||||
margin-right: -24px;
|
|
||||||
margin-left: -24px;
|
|
||||||
padding-right: 24px;
|
|
||||||
padding-left: 24px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-card {
|
.order-card {
|
||||||
padding: 20px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-item {
|
.order-item {
|
||||||
grid-template-columns: 120px minmax(0, 1fr);
|
grid-template-columns: 94px minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumb {
|
.thumb {
|
||||||
width: 120px;
|
width: 94px;
|
||||||
height: 120px;
|
height: 94px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ const earliestBookableText = computed(() => shopInfo.value?.businessHours || '
|
|||||||
const heroMaxHeightRatio = computed(() => {
|
const heroMaxHeightRatio = computed(() => {
|
||||||
const ratios = productImages.value
|
const ratios = productImages.value
|
||||||
.map(url => productImageRatios.value[url])
|
.map(url => productImageRatios.value[url])
|
||||||
.filter((ratio): ratio is number => Number.isFinite(ratio) && ratio > 0)
|
.filter((ratio): ratio is number => typeof ratio === 'number' && Number.isFinite(ratio) && ratio > 0)
|
||||||
return ratios.length ? Math.max(...ratios) : 1.25
|
return ratios.length ? Math.max(...ratios) : 1.25
|
||||||
})
|
})
|
||||||
/** heroSectionStyle lets shorter images center inside the tallest-image frame. */
|
/** heroSectionStyle lets shorter images center inside the tallest-image frame. */
|
||||||
@@ -540,6 +540,7 @@ onMounted(() => {
|
|||||||
--detail-hero-scrim: color-mix(in srgb, var(--theme-neutral) 20%, transparent);
|
--detail-hero-scrim: color-mix(in srgb, var(--theme-neutral) 20%, transparent);
|
||||||
--detail-shadow: 0 20px 44px color-mix(in srgb, var(--theme-neutral) 14%, transparent);
|
--detail-shadow: 0 20px 44px color-mix(in srgb, var(--theme-neutral) 14%, transparent);
|
||||||
--detail-shadow-soft: 0 12px 30px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
|
--detail-shadow-soft: 0 12px 30px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
|
||||||
|
--detail-shell-width: var(--frontend-page-max-width);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
@@ -563,7 +564,7 @@ onMounted(() => {
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 44px minmax(0, 1fr) 44px;
|
grid-template-columns: 44px minmax(0, 1fr) 44px;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: min(100%, 460px);
|
width: min(100%, var(--detail-shell-width));
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
|
padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
|
||||||
@@ -632,7 +633,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.detail-content {
|
.detail-content {
|
||||||
width: min(100%, 460px);
|
width: min(100%, var(--detail-shell-width));
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 0 calc(112px + env(safe-area-inset-bottom));
|
padding: 0 0 calc(112px + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
@@ -1102,7 +1103,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
.footer-inner {
|
.footer-inner {
|
||||||
display: grid;
|
display: grid;
|
||||||
max-width: 430px;
|
max-width: var(--detail-shell-width);
|
||||||
grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1.18fr);
|
grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1.18fr);
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
<a-button class="icon-btn" type="text" aria-label="返回首页" @click="handleBackClick">
|
<a-button class="icon-btn" type="text" aria-label="返回首页" @click="handleBackClick">
|
||||||
<MenuOutlined />
|
<MenuOutlined />
|
||||||
</a-button>
|
</a-button>
|
||||||
<div class="brand-lockup" aria-label="YumiNail 作品列表">
|
<div class="brand-lockup" aria-label="指尖设计师">
|
||||||
<span class="brand-kicker">Nail Gallery</span>
|
<h1>指尖设计师</h1>
|
||||||
<h1>YumiNail</h1>
|
|
||||||
</div>
|
</div>
|
||||||
<a-button class="icon-btn icon-btn--bag" type="text" aria-label="前往购物车" @click="router.push('/cart')">
|
<a-button class="icon-btn icon-btn--bag" type="text" aria-label="前往购物车" @click="router.push('/cart')">
|
||||||
<ShoppingOutlined />
|
<ShoppingOutlined />
|
||||||
@@ -41,7 +40,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
@click="handleCategoryClick('全部')"
|
@click="handleCategoryClick('全部')"
|
||||||
>
|
>
|
||||||
全部风格
|
全部款式
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-for="tag in allTags"
|
v-for="tag in allTags"
|
||||||
@@ -465,7 +464,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.product-list-page {
|
.product-list-page {
|
||||||
--gallery-header-height: 64px;
|
--gallery-header-height: 52px;
|
||||||
--gallery-gutter: 20px;
|
--gallery-gutter: 20px;
|
||||||
--gallery-surface: color-mix(in srgb, var(--theme-card-bg) 76%, transparent);
|
--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-surface-strong: color-mix(in srgb, var(--theme-card-bg) 90%, transparent);
|
||||||
@@ -501,26 +500,17 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.brand-lockup {
|
.brand-lockup {
|
||||||
display: grid;
|
display: flex;
|
||||||
place-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-kicker {
|
|
||||||
color: var(--theme-primary-action);
|
|
||||||
font-size: 10px;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
|
||||||
letter-spacing: 0;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand-lockup h1 {
|
.brand-lockup h1 {
|
||||||
margin: 3px 0 0;
|
margin: 0;
|
||||||
color: var(--theme-primary-action);
|
color: var(--text-primary);
|
||||||
font-family: "Playfair Display", "Times New Roman", serif;
|
font-size: 16px;
|
||||||
font-size: 28px;
|
font-weight: 800;
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
letter-spacing: 0;
|
letter-spacing: 0;
|
||||||
}
|
}
|
||||||
@@ -530,8 +520,8 @@ onMounted(async () => {
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 40px;
|
width: 36px;
|
||||||
height: 40px;
|
height: 36px;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
color: var(--theme-primary-action);
|
color: var(--theme-primary-action);
|
||||||
background: color-mix(in srgb, var(--theme-card-bg) 72%, transparent);
|
background: color-mix(in srgb, var(--theme-card-bg) 72%, transparent);
|
||||||
@@ -545,7 +535,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-btn :deep(.anticon) {
|
.icon-btn :deep(.anticon) {
|
||||||
font-size: 20px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bag-dot {
|
.bag-dot {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<header class="profile-hero">
|
<header class="profile-hero">
|
||||||
<div class="profile-topbar">
|
<div class="profile-topbar">
|
||||||
<div class="profile-title-copy">
|
<div class="profile-title-copy">
|
||||||
<span class="profile-kicker">YumiNail</span>
|
<span class="profile-kicker">指尖设计师</span>
|
||||||
<h1>个人中心</h1>
|
<h1>个人中心</h1>
|
||||||
</div>
|
</div>
|
||||||
<button class="profile-icon-button" type="button" aria-label="打开设置" @click="handleSettingsClick">
|
<button class="profile-icon-button" type="button" aria-label="打开设置" @click="handleSettingsClick">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="welcome-copy">
|
<div class="welcome-copy">
|
||||||
<span class="welcome-label">Welcome back</span>
|
<span class="welcome-label">Welcome back</span>
|
||||||
<h2 class="username">{{ userInfo.nickname || 'Yumi 用户' }}</h2>
|
<h2 class="username">{{ userInfo.nickname || '指尖设计师用户' }}</h2>
|
||||||
<p class="account">{{ userInfo.account || '登录后解锁预约礼遇' }}</p>
|
<p class="account">{{ userInfo.account || '登录后解锁预约礼遇' }}</p>
|
||||||
<p v-if="userInfo.signature" class="signature">{{ userInfo.signature }}</p>
|
<p v-if="userInfo.signature" class="signature">{{ userInfo.signature }}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<button class="vip-card" type="button" @click="handleMenuClick('vip')">
|
<button class="vip-card" type="button" @click="handleMenuClick('vip')">
|
||||||
<span class="vip-card__glow"></span>
|
<span class="vip-card__glow"></span>
|
||||||
<span class="vip-card__copy">
|
<span class="vip-card__copy">
|
||||||
<span class="section-eyebrow">Luminous VIP</span>
|
<span class="section-eyebrow">指尖会员</span>
|
||||||
<strong>会员柔光礼遇</strong>
|
<strong>会员柔光礼遇</strong>
|
||||||
<small>查看会员等级、余额和专属优惠</small>
|
<small>查看会员等级、余额和专属优惠</small>
|
||||||
</span>
|
</span>
|
||||||
@@ -416,7 +416,7 @@ const shopOptions = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
/** currentShopName is a reactive state variable used by the template and event handlers. */
|
/** currentShopName is a reactive state variable used by the template and event handlers. */
|
||||||
const currentShopName = computed(() => userInfo.value.shopName || '当前暂无可用门店')
|
const currentShopName = computed(() => userInfo.value.shopName || '当前门店')
|
||||||
/** shopSwitchTip is a reactive state variable used by the template and event handlers. */
|
/** shopSwitchTip is a reactive state variable used by the template and event handlers. */
|
||||||
const shopSwitchTip = computed(() => {
|
const shopSwitchTip = computed(() => {
|
||||||
if (shopOptions.value.length > 1) {
|
if (shopOptions.value.length > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user