138 lines
6.4 KiB
Plaintext
138 lines
6.4 KiB
Plaintext
<view class="home-page-root">
|
|
<navigation-bar title="Yumi Nail" back="{{false}}" color="#2d2430" background="#fff7f8"></navigation-bar>
|
|
|
|
<scroll-view class="home-scroll" scroll-y enable-flex enhanced show-scrollbar="false">
|
|
<view class="page-shell home-page">
|
|
<view class="page-content">
|
|
<view class="page-hero home-hero">
|
|
<text class="hero-kicker">{{isLoggedIn ? greeting : 'YUMI NAIL 小程序'}}</text>
|
|
<text class="hero-title">{{displayName}}</text>
|
|
<text class="hero-desc">先看门店氛围,再挑喜欢的作品,最后一站式完成收藏、加购和预约。</text>
|
|
|
|
<view class="hero-action-row">
|
|
<view class="hero-action primary" bindtap="handleProfileTap">{{isLoggedIn ? '进入个人中心' : '立即登录'}}</view>
|
|
<view class="hero-action secondary" bindtap="handleSeeAllPopular">看看热门作品</view>
|
|
</view>
|
|
|
|
<view class="search-box">
|
|
<input
|
|
class="search-input"
|
|
placeholder="搜索作品、风格或门店"
|
|
placeholder-class="field-placeholder"
|
|
value="{{searchKeyword}}"
|
|
bindinput="handleSearchInput"
|
|
bindconfirm="handleSearchConfirm"
|
|
confirm-type="search"
|
|
/>
|
|
<view class="search-btn" bindtap="handleSearchConfirm">搜索</view>
|
|
</view>
|
|
|
|
<view class="summary-strip">
|
|
<view class="summary-metric">
|
|
<text class="summary-label">门店橱窗</text>
|
|
<text class="summary-value">{{bannerImages.length ? bannerImages.length : 0}} 家</text>
|
|
<text class="summary-note">先看环境,再决定去哪家</text>
|
|
</view>
|
|
<view class="summary-metric">
|
|
<text class="summary-label">精选作品</text>
|
|
<text class="summary-value">{{featuredItems.length ? featuredItems.length : 0}} 款</text>
|
|
<text class="summary-note">适合快速找到灵感</text>
|
|
</view>
|
|
<view class="summary-metric">
|
|
<text class="summary-label">热门推荐</text>
|
|
<text class="summary-value">{{popularItems.length ? popularItems.length : 0}} 条</text>
|
|
<text class="summary-note">当前最受欢迎的预约款式</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{!isLoggedIn}}" class="guest-tip">
|
|
登录后可同步收藏、购物车和预约记录,切换设备也不会丢。
|
|
</view>
|
|
</view>
|
|
|
|
<view class="section-block">
|
|
<view class="section-head">
|
|
<view class="section-copy">
|
|
<text class="section-kicker">门店氛围</text>
|
|
<text class="section-title">先看看线下环境</text>
|
|
<text class="section-subtitle">轮播展示门店图片和营业时间,帮助你快速判断想去的店。</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{bannerImages.length}}" class="banner-box page-card">
|
|
<swiper class="banner-swiper" indicator-dots autoplay circular interval="3200">
|
|
<swiper-item wx:for="{{bannerImages}}" wx:key="id">
|
|
<view class="banner-item" data-shop-id="{{item.shopId}}" bindtap="handleBannerTap">
|
|
<image class="banner-image" src="{{item.imageUrl}}" mode="aspectFill"></image>
|
|
<view class="banner-mask">
|
|
<view class="banner-badge">门店实拍</view>
|
|
<view class="banner-title">{{item.shopName}}</view>
|
|
<view class="banner-desc">{{item.businessHours}}</view>
|
|
</view>
|
|
</view>
|
|
</swiper-item>
|
|
</swiper>
|
|
</view>
|
|
|
|
<view wx:else class="page-card empty-card">
|
|
<text class="empty-title">门店内容正在补充中</text>
|
|
<text class="empty-desc">可以先浏览精选作品,稍后再回来查看门店环境展示。</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="section-block">
|
|
<view class="section-head">
|
|
<view class="section-copy">
|
|
<text class="section-kicker">快速入门</text>
|
|
<text class="section-title">精选作品</text>
|
|
<text class="section-subtitle">适合先快速逛一圈的热门款式,向右滑动查看更多。</text>
|
|
</view>
|
|
<view class="section-link" bindtap="handleSeeAllFeatured">查看全部</view>
|
|
</view>
|
|
|
|
<view wx:if="{{featuredItems.length}}" class="featured-panel">
|
|
<scroll-view class="featured-scroll" scroll-x enable-flex>
|
|
<view class="featured-list">
|
|
<view wx:for="{{featuredItems}}" wx:key="id" class="featured-card">
|
|
<product-card item="{{item}}" bindselect="handleProductSelect"></product-card>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
|
|
<view wx:else class="page-card empty-card">
|
|
<text class="empty-title">精选作品正在整理中</text>
|
|
<text class="empty-desc">等门店补齐款式后,这里会优先展示最值得先看的内容。</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="section-block">
|
|
<view class="section-head">
|
|
<view class="section-copy">
|
|
<text class="section-kicker">热门预约</text>
|
|
<text class="section-title">最近大家都在看</text>
|
|
<text class="section-subtitle">结合点赞和收藏热度展示当前最受欢迎的款式。</text>
|
|
</view>
|
|
<view class="section-link" bindtap="handleSeeAllPopular">查看全部</view>
|
|
</view>
|
|
|
|
<view wx:if="{{popularItems.length}}" class="popular-grid">
|
|
<view wx:for="{{popularItems}}" wx:key="id" class="popular-card">
|
|
<product-card item="{{item}}" show-stats="{{true}}" bindselect="handleProductSelect"></product-card>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:elif="{{loading}}" class="page-card empty-card">
|
|
<text class="empty-title">正在加载首页内容</text>
|
|
</view>
|
|
|
|
<view wx:else class="page-card empty-card">
|
|
<text class="empty-title">还没有热门作品</text>
|
|
<text class="empty-desc">当前门店还在补充作品数据,稍后再回来看看。</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|