Files
JayuCloud/JY-Salon-WeChat/pages/shop-profile-edit/index.wxml
T

85 lines
3.8 KiB
Plaintext
Raw Normal View History

2026-07-23 20:22:01 +08:00
<view class="page no-tab shop-profile-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="edit-tip-card">
<text class="edit-tip-title">门店第一眼</text>
2026-07-24 16:58:34 +08:00
<text class="edit-tip-text">店铺名称、介绍、地址和封面会展示在用户端门店详情页。</text>
2026-07-23 20:22:01 +08:00
</view>
<view class="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-badge">门店封面</view>
<view class="cover-actions">
2026-07-24 16:58:34 +08:00
<button class="cover-btn" loading="{{coverUploading}}" disabled="{{coverUploading || galleryUploading || saving}}" bindtap="chooseCoverImage">{{coverUploading ? '上传中' : '更换主图'}}</button>
<button wx:if="{{coverImagePreviewUrl}}" class="cover-remove" disabled="{{coverUploading || galleryUploading || saving}}" bindtap="removeCoverImage">移除</button>
2026-07-23 20:22:01 +08:00
</view>
</view>
<view class="card form-card">
<view class="form-header">
<text class="form-kicker">门店档案</text>
<text class="form-title">保存后返回主页面查看展示效果</text>
</view>
<view class="field">
<text class="field-label">店铺名称</text>
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="请输入店铺名称" />
</view>
2026-07-24 16:58:34 +08:00
<view class="field">
<text class="field-label">店铺地址</text>
<input value="{{form.address}}" data-field="address" bindinput="onInput" placeholder="请输入店铺地址" />
</view>
2026-07-23 20:22:01 +08:00
<view class="field field-column">
<text class="field-label">门店介绍</text>
<view class="intro-editor">
<textarea
value="{{form.rule}}"
data-field="rule"
bindinput="onInput"
maxlength="120"
auto-height="{{false}}"
placeholder="写下门店风格、擅长方向、服务氛围"
placeholder-class="intro-placeholder"
></textarea>
<text class="intro-count">{{introLength}}/120</text>
</view>
</view>
</view>
2026-07-24 16:58:34 +08:00
<view class="card gallery-card">
<view class="gallery-head">
<view>
<text class="form-kicker">环境照片</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>
</view>
2026-07-23 20:22:01 +08:00
</block>
<view class="fixed-bottom">
2026-07-24 16:58:34 +08:00
<button class="primary-btn bottom-half-btn" loading="{{saving}}" disabled="{{saving || coverUploading || galleryUploading}}" bindtap="save">保存档案</button>
2026-07-23 20:22:01 +08:00
</view>
</view>