优化店务小程序店铺设置UI
This commit is contained in:
@@ -1,104 +1,226 @@
|
||||
<view class="page no-tab">
|
||||
<view class="page no-tab shop-settings-page">
|
||||
<view wx:if="{{loading}}" class="loading-state">店铺设置加载中</view>
|
||||
<block wx:else>
|
||||
<view class="page-heading">
|
||||
<text class="page-title">店铺设置</text>
|
||||
<text class="page-subtitle">先看见门店状态,再按需调整细节。</text>
|
||||
</view>
|
||||
<view class="nav-spacer"></view>
|
||||
|
||||
<view class="cover-card">
|
||||
<view wx:if="{{coverImagePreviewUrl}}" class="cover-preview">
|
||||
<image src="{{coverImagePreviewUrl}}" mode="aspectFill"></image>
|
||||
<view class="shop-hero" data-field="cover" bindtap="openProfileSheet">
|
||||
<view class="hero-bg"></view>
|
||||
<view class="hero-content">
|
||||
<view wx:if="{{coverImagePreviewUrl}}" class="hero-avatar">
|
||||
<image src="{{coverImagePreviewUrl}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view wx:else class="hero-avatar hero-avatar-empty">店</view>
|
||||
<view class="hero-main">
|
||||
<view class="hero-title-row">
|
||||
<text class="hero-title">{{shopName || '店铺名称'}}</text>
|
||||
<text class="edit-mark">✎</text>
|
||||
</view>
|
||||
<view class="hero-badges">
|
||||
<text class="status-badge {{businessStatusClass}}">{{businessStatusText}}</text>
|
||||
<text class="soft-badge">{{scheduleSummary}}</text>
|
||||
</view>
|
||||
<view class="hero-meta-row">
|
||||
<text class="meta-dot">⌖</text>
|
||||
<text class="hero-address">{{shopAddress}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="hero-arrow">›</text>
|
||||
</view>
|
||||
<view wx:else class="cover-preview cover-empty">
|
||||
<text class="cover-empty-title">店铺封面</text>
|
||||
<text class="cover-empty-desc">上传一张能代表风格的作品图</text>
|
||||
</view>
|
||||
<view class="cover-badge">门店档案</view>
|
||||
<view class="cover-shade">
|
||||
<view class="cover-copy">
|
||||
<text class="cover-title">{{shopName || '店铺主图'}}</text>
|
||||
<text class="cover-desc">{{shopDescription || '色彩、手作与细节管理的预约空间'}}</text>
|
||||
<view class="hero-stats">
|
||||
<view class="stat-item">
|
||||
<text>特殊日期</text>
|
||||
<view>{{exceptionCountText}}</view>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text>店铺图片</text>
|
||||
<view>{{imageCountText}}</view>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text>标签</text>
|
||||
<view>{{tagCountText}}</view>
|
||||
</view>
|
||||
<button class="cover-btn" bindtap="editProfile">修改档案</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view id="shop-profile-card" class="section">
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view>
|
||||
<text class="section-title">店铺档案</text>
|
||||
<text class="section-subtitle">展示给客户看的第一段介绍</text>
|
||||
<view class="section-title-wrap">
|
||||
<text class="leaf-icon">◒</text>
|
||||
<text class="section-title">店铺资料</text>
|
||||
</view>
|
||||
<text class="section-link" bindtap="editProfile">修改</text>
|
||||
<text class="section-link" data-field="shopName" bindtap="openProfileSheet">编辑</text>
|
||||
</view>
|
||||
<view class="card profile-summary-card" bindtap="editProfile">
|
||||
<view class="summary-row">
|
||||
<text class="summary-label">店铺名称</text>
|
||||
<text class="summary-value">{{shopName || '未设置'}}</text>
|
||||
<view class="settings-card">
|
||||
<view class="settings-row" data-field="shopName" bindtap="openProfileSheet">
|
||||
<text class="row-label">店铺名称</text>
|
||||
<text class="row-value">{{shopName || '未设置'}}</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
<view class="summary-row summary-row-last">
|
||||
<text class="summary-label">门店介绍</text>
|
||||
<text class="summary-value summary-description">{{shopDescription || '暂未填写门店介绍'}}</text>
|
||||
<view class="settings-row" data-field="rule" bindtap="openProfileSheet">
|
||||
<text class="row-label">店铺简介</text>
|
||||
<text class="row-value">{{shopDescription || '暂未填写门店介绍'}}</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
<view class="settings-row" data-field="address" bindtap="openProfileSheet">
|
||||
<text class="row-label">店铺地址</text>
|
||||
<text class="row-value">{{shopAddress}}</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
<view class="settings-row row-last" data-field="cover" bindtap="openProfileSheet">
|
||||
<text class="row-label">店铺主图</text>
|
||||
<view wx:if="{{coverImagePreviewUrl}}" class="row-thumb">
|
||||
<image src="{{coverImagePreviewUrl}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<text wx:else class="row-value">未设置</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view id="shop-tag-card" class="section">
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view>
|
||||
<text class="section-title">店铺标签</text>
|
||||
<text class="section-subtitle">{{tagCountText}}</text>
|
||||
<view class="section-title-wrap">
|
||||
<text class="leaf-icon">◒</text>
|
||||
<text class="section-title">店铺展示</text>
|
||||
</view>
|
||||
<text class="section-link" bindtap="editTags">管理</text>
|
||||
</view>
|
||||
<view class="card tag-summary-card" bindtap="editTags">
|
||||
<view wx:if="{{tagList.length}}" class="tag-cloud">
|
||||
<text
|
||||
wx:for="{{tagList}}"
|
||||
wx:key="id"
|
||||
class="tag-preview"
|
||||
style="background: {{item.bgColor}}; color: {{item.textColor}}; border-color: {{item.borderColor}};"
|
||||
>{{item.name}}</text>
|
||||
<text class="tag-add">+</text>
|
||||
<view class="settings-card">
|
||||
<view class="settings-row tall-row" bindtap="editTags">
|
||||
<text class="row-label">店铺标签</text>
|
||||
<view wx:if="{{tagList.length}}" class="row-tags">
|
||||
<text
|
||||
wx:for="{{tagList}}"
|
||||
wx:key="id"
|
||||
class="tag-preview"
|
||||
style="background: {{item.bgColor}}; color: {{item.textColor}}; border-color: {{item.borderColor}};"
|
||||
>{{item.name}}</text>
|
||||
</view>
|
||||
<text wx:else class="row-value">暂无标签</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
<view wx:else class="empty-inline">还没有标签,点击添加门店特色</view>
|
||||
<view class="summary-action-row">
|
||||
<text>用于预约时快速选择和展示</text>
|
||||
<text class="summary-arrow">›</text>
|
||||
<view class="settings-row" data-field="gallery" bindtap="openProfileSheet">
|
||||
<text class="row-label">环境照片</text>
|
||||
<text class="row-value">{{imageCountText}}</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
<view class="settings-row row-last">
|
||||
<text class="row-label">主页预览</text>
|
||||
<text class="row-value muted-value">跟随用户端展示</text>
|
||||
<text class="row-eye">◉</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view id="shop-schedule-card" class="section">
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view>
|
||||
<text class="section-title">营业安排</text>
|
||||
<text class="section-subtitle">排班与特殊日期合并管理</text>
|
||||
<view class="section-title-wrap">
|
||||
<text class="leaf-icon">◒</text>
|
||||
<text class="section-title">营业管理</text>
|
||||
</view>
|
||||
<text class="section-link" data-tab="RULE" bindtap="openScheduleSheet">修改</text>
|
||||
<text class="section-link" data-tab="RULE" bindtap="openScheduleSheet">设置</text>
|
||||
</view>
|
||||
<view class="card schedule-summary-card" data-tab="RULE" bindtap="openScheduleSheet">
|
||||
<view class="schedule-summary-row">
|
||||
<view class="summary-icon schedule-icon">◷</view>
|
||||
<view class="summary-main">
|
||||
<text class="summary-value">{{scheduleSummary}}</text>
|
||||
<text class="summary-meta">{{scheduleRemarkText}}</text>
|
||||
</view>
|
||||
<text class="summary-arrow">›</text>
|
||||
<view class="settings-card">
|
||||
<view class="settings-row" data-tab="RULE" bindtap="openScheduleSheet">
|
||||
<text class="row-label">营业时间</text>
|
||||
<text class="row-value">{{scheduleSummary}}</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
<view id="shop-exception-card" class="schedule-summary-row special-summary-row" data-tab="EXCEPTION" bindtap="openScheduleSheet">
|
||||
<view class="summary-icon exception-icon">●</view>
|
||||
<view class="summary-main">
|
||||
<text class="summary-value">{{exceptionCountText}}</text>
|
||||
<text class="summary-meta">{{exceptionSummary}}</text>
|
||||
</view>
|
||||
<text class="summary-arrow">›</text>
|
||||
<view class="settings-row" data-tab="RULE" bindtap="openScheduleSheet">
|
||||
<text class="row-label">预约规则</text>
|
||||
<text class="row-value">{{scheduleRemarkText}}</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
<view class="settings-row row-last" data-tab="EXCEPTION" bindtap="openScheduleSheet">
|
||||
<text class="row-label">特殊日期</text>
|
||||
<text class="row-value accent-value">{{exceptionSummary}}</text>
|
||||
<text class="row-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view wx:if="{{profileSheetVisible}}" class="sheet-mask" catchtap="closeProfileSheet">
|
||||
<view id="profile-sheet" class="schedule-sheet profile-sheet" catchtap="stopPropagation">
|
||||
<view class="sheet-handle"></view>
|
||||
<view class="sheet-head">
|
||||
<text class="sheet-title">{{profileSheetTitle}}</text>
|
||||
<text class="sheet-close" bindtap="closeProfileSheet">×</text>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{activeProfileField === 'shopName'}}">
|
||||
<view class="profile-field-column">
|
||||
<text class="sheet-field-title">店铺名称</text>
|
||||
<input class="profile-input" value="{{profileForm.shopName}}" data-field="shopName" bindinput="onProfileInput" placeholder="请输入店铺名称" />
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{activeProfileField === 'rule'}}">
|
||||
<view class="profile-field-column">
|
||||
<text class="sheet-field-title">门店介绍</text>
|
||||
<view class="intro-editor">
|
||||
<textarea
|
||||
value="{{profileForm.rule}}"
|
||||
data-field="rule"
|
||||
bindinput="onProfileInput"
|
||||
maxlength="120"
|
||||
auto-height="{{false}}"
|
||||
placeholder="写下门店风格、擅长方向、服务氛围"
|
||||
placeholder-class="intro-placeholder"
|
||||
></textarea>
|
||||
<text class="intro-count">{{introLength}}/120</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{activeProfileField === 'address'}}">
|
||||
<view class="profile-field-column">
|
||||
<text class="sheet-field-title">店铺地址</text>
|
||||
<input class="profile-input" value="{{profileForm.address}}" data-field="address" bindinput="onProfileInput" placeholder="请输入店铺地址" />
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{activeProfileField === 'cover'}}">
|
||||
<view class="cover-card compact-cover-card">
|
||||
<view wx:if="{{coverImagePreviewUrl}}" class="cover-preview">
|
||||
<image src="{{coverImagePreviewUrl}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view wx:else class="cover-preview cover-empty">
|
||||
<text class="cover-empty-title">店铺封面</text>
|
||||
<text class="cover-empty-desc">上传一张能代表风格的作品图</text>
|
||||
</view>
|
||||
<view class="cover-actions">
|
||||
<button class="cover-btn" loading="{{coverUploading}}" disabled="{{coverUploading || saving}}" bindtap="chooseCoverImage">{{coverUploading ? '上传中' : '更换主图'}}</button>
|
||||
<button wx:if="{{coverImagePreviewUrl}}" class="cover-remove" disabled="{{coverUploading || saving}}" bindtap="removeCoverImage">移除</button>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:else>
|
||||
<view class="gallery-head">
|
||||
<view>
|
||||
<text class="sheet-field-title">环境照片</text>
|
||||
<text class="gallery-subtitle">用于店铺展示区,最多 9 张</text>
|
||||
</view>
|
||||
<text class="gallery-count">{{galleryItems.length}}/9</text>
|
||||
</view>
|
||||
<view class="gallery-grid">
|
||||
<view wx:for="{{galleryItems}}" wx:key="fileId" class="gallery-item">
|
||||
<image wx:if="{{item.url}}" src="{{item.url}}" mode="aspectFill"></image>
|
||||
<view wx:else class="gallery-placeholder">图片</view>
|
||||
<text class="gallery-remove" data-index="{{index}}" bindtap="removeGalleryImage">×</text>
|
||||
</view>
|
||||
<view wx:if="{{galleryItems.length < 9}}" class="gallery-add" bindtap="chooseGalleryImages">
|
||||
<text class="gallery-add-icon">+</text>
|
||||
<text>{{galleryUploading ? '上传中' : '添加'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<button class="primary-btn sheet-save" loading="{{saving}}" disabled="{{saving || coverUploading || galleryUploading}}" bindtap="saveProfileField">{{profileSheetSaveText}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{scheduleSheetVisible}}" class="sheet-mask" catchtap="closeScheduleSheet">
|
||||
<view id="schedule-sheet" class="schedule-sheet" catchtap="stopPropagation">
|
||||
<view class="sheet-handle"></view>
|
||||
|
||||
Reference in New Issue
Block a user