优化店务小程序店铺设置UI

This commit is contained in:
2026-07-24 16:58:34 +08:00
parent 97821cf371
commit 32ba6b6d64
8 changed files with 1174 additions and 954 deletions
@@ -1,6 +1,6 @@
const shopApi = require('../../api/shop')
const { BRAND_CONFIG } = require('../../utils/config')
const { chooseImageFilePath, uploadObjectFile, resolveUploadedImagePreviewUrl } = require('../../utils/upload')
const { chooseImageFilePaths, chooseImageFilePath, uploadObjectFile, resolveUploadedImagePreviewUrl } = require('../../utils/upload')
const DEFAULT_SHOP_INTRO = '专注法式、晕染与手绘设计,适合想要温柔质感的客人。'
@@ -12,11 +12,31 @@ function introLength(value) {
return String(value || '').length
}
function parseFileIds(value) {
return String(value || '')
.split(',')
.map(item => String(item || '').trim())
.filter(Boolean)
}
function joinFileIds(fileIds) {
return (Array.isArray(fileIds) ? fileIds : []).map(item => String(item || '').trim()).filter(Boolean).join(',')
}
function normalizeGalleryItems(fileIds, urls) {
const normalizedFileIds = parseFileIds(fileIds)
const normalizedUrls = Array.isArray(urls) ? urls.map(url => String(url || '').trim()) : []
return normalizedFileIds.map((fileId, index) => ({
fileId,
url: normalizedUrls[index] || ''
}))
}
function buildShopPayload(settings, form) {
return {
shopName: String(form.shopName || '').trim(),
description: String(form.rule || '').trim(),
address: settings.address || '',
address: String(form.address || '').trim(),
mapProvider: settings.mapProvider || '',
longitude: settings.longitude,
latitude: settings.latitude,
@@ -25,7 +45,7 @@ function buildShopPayload(settings, form) {
scheduleWorkDays: settings.scheduleWorkDays || '',
scheduleRemark: settings.scheduleRemark || '',
coverImageFileId: String(form.coverImageFileId || '').trim(),
imageFileIds: String(settings.imageFileIds || '').trim(),
imageFileIds: joinFileIds(form.galleryFileIds),
themePrimaryColor: settings.themePrimaryColor || '',
themeSecondaryColor: settings.themeSecondaryColor || '',
themeAccentColor: settings.themeAccentColor || '',
@@ -44,12 +64,16 @@ Page({
loading: false,
saving: false,
coverUploading: false,
galleryUploading: false,
galleryItems: [],
coverImagePreviewUrl: '',
introLength: introLength(DEFAULT_SHOP_INTRO),
settingsSnapshot: {},
form: {
shopName: BRAND_CONFIG.defaultShopName,
rule: DEFAULT_SHOP_INTRO,
address: '',
galleryFileIds: [],
coverImageFileId: ''
}
},
@@ -62,15 +86,19 @@ Page({
this.setData({ loading: true })
try {
const settings = await shopApi.settings()
const galleryItems = normalizeGalleryItems(settings.imageFileIds, settings.imageUrls)
const form = {
shopName: settings.shopName || settings.name || this.data.form.shopName,
rule: settings.description || DEFAULT_SHOP_INTRO,
address: settings.address || '',
galleryFileIds: galleryItems.map(item => item.fileId),
coverImageFileId: settings.coverImageFileId || ''
}
this.setData({
settingsSnapshot: settings || {},
form,
introLength: introLength(form.rule),
galleryItems,
coverImagePreviewUrl: resolveFirstImageUrl(settings.coverImageUrls)
})
} catch (error) {
@@ -91,7 +119,7 @@ Page({
},
async chooseCoverImage() {
if (this.data.coverUploading || this.data.saving) {
if (this.data.coverUploading || this.data.galleryUploading || this.data.saving) {
return
}
try {
@@ -117,7 +145,7 @@ Page({
},
removeCoverImage() {
if (this.data.coverUploading || this.data.saving) {
if (this.data.coverUploading || this.data.galleryUploading || this.data.saving) {
return
}
this.setData({
@@ -126,6 +154,61 @@ Page({
})
},
async chooseGalleryImages() {
if (this.data.galleryUploading || this.data.saving || this.data.coverUploading) {
return
}
const remainingCount = 9 - this.data.galleryItems.length
if (remainingCount <= 0) {
wx.showToast({ title: '最多上传 9 张环境照片', icon: 'none' })
return
}
try {
const filePaths = await chooseImageFilePaths(remainingCount)
if (!filePaths.length) {
return
}
this.setData({ galleryUploading: true })
const uploadedItems = []
for (const filePath of filePaths) {
const uploadResult = await uploadObjectFile(filePath)
const fileId = String(uploadResult && uploadResult.id ? uploadResult.id : '').trim()
if (!fileId) {
throw new Error('环境照片上传失败:上传接口未返回文件ID')
}
uploadedItems.push({
fileId,
url: resolveUploadedImagePreviewUrl(uploadResult, filePath)
})
}
const galleryItems = this.data.galleryItems.concat(uploadedItems)
this.setData({
galleryItems,
'form.galleryFileIds': galleryItems.map(item => item.fileId)
})
} catch (error) {
wx.showToast({ title: error.message || '环境照片上传失败', icon: 'none' })
} finally {
this.setData({ galleryUploading: false })
}
},
removeGalleryImage(event) {
if (this.data.galleryUploading || this.data.saving) {
return
}
const index = Number(event.currentTarget.dataset.index)
if (!Number.isInteger(index) || index < 0 || index >= this.data.galleryItems.length) {
wx.showToast({ title: '环境照片不存在', icon: 'none' })
return
}
const galleryItems = this.data.galleryItems.filter((item, itemIndex) => itemIndex !== index)
this.setData({
galleryItems,
'form.galleryFileIds': galleryItems.map(item => item.fileId)
})
},
async save() {
const shopName = String(this.data.form.shopName || '').trim()
if (!shopName) {
@@ -8,7 +8,7 @@
<view class="edit-tip-card">
<text class="edit-tip-title">门店第一眼</text>
<text class="edit-tip-text">店铺名称、介绍和封面会展示在用户端门店详情页。</text>
<text class="edit-tip-text">店铺名称、介绍、地址和封面会展示在用户端门店详情页。</text>
</view>
<view class="cover-card">
@@ -21,8 +21,8 @@
</view>
<view class="cover-badge">门店封面</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>
<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>
</view>
</view>
@@ -35,6 +35,10 @@
<text class="field-label">店铺名称</text>
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="请输入店铺名称" />
</view>
<view class="field">
<text class="field-label">店铺地址</text>
<input value="{{form.address}}" data-field="address" bindinput="onInput" placeholder="请输入店铺地址" />
</view>
<view class="field field-column">
<text class="field-label">门店介绍</text>
<view class="intro-editor">
@@ -51,9 +55,30 @@
</view>
</view>
</view>
<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>
</block>
<view class="fixed-bottom">
<button class="primary-btn bottom-half-btn" loading="{{saving}}" disabled="{{saving || coverUploading}}" bindtap="save">保存档案</button>
<button class="primary-btn bottom-half-btn" loading="{{saving}}" disabled="{{saving || coverUploading || galleryUploading}}" bindtap="save">保存档案</button>
</view>
</view>
@@ -19,7 +19,8 @@
}
.page-subtitle,
.form-title {
.form-title,
.gallery-subtitle {
color: #8a796a;
font-size: 23rpx;
line-height: 1.4;
@@ -38,17 +39,17 @@
margin-bottom: 20rpx;
padding: 22rpx 24rpx;
border-radius: 22rpx;
background: #fff0ed;
background: #edf6ea;
}
.edit-tip-title {
color: #3e312d;
color: #2d392f;
font-size: 29rpx;
font-weight: 900;
}
.edit-tip-text {
color: #9f6c64;
color: #668268;
font-size: 23rpx;
line-height: 1.55;
}
@@ -136,12 +137,20 @@
color: #fffdf8;
}
.form-card {
.form-card,
.gallery-card {
margin-top: 24rpx;
padding: 12rpx 0;
overflow: hidden;
}
.form-card {
padding: 12rpx 0;
}
.gallery-card {
padding: 24rpx;
}
.form-header {
display: flex;
flex-direction: column;
@@ -229,6 +238,90 @@
line-height: 1;
}
.gallery-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16rpx;
margin-bottom: 18rpx;
}
.gallery-head view {
display: flex;
flex-direction: column;
gap: 8rpx;
min-width: 0;
}
.gallery-count {
flex: 0 0 auto;
color: #7c9a82;
font-size: 24rpx;
font-weight: 900;
}
.gallery-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14rpx;
}
.gallery-item,
.gallery-add {
position: relative;
display: flex;
align-items: center;
justify-content: center;
aspect-ratio: 1 / 1;
min-width: 0;
overflow: hidden;
border-radius: 18rpx;
background: #f5efe8;
}
.gallery-item image {
width: 100%;
height: 100%;
}
.gallery-placeholder {
color: #9d968e;
font-size: 24rpx;
}
.gallery-remove {
position: absolute;
top: 8rpx;
right: 8rpx;
display: flex;
align-items: center;
justify-content: center;
width: 38rpx;
height: 38rpx;
border-radius: 50%;
background: rgba(39, 35, 31, 0.58);
color: #fffdf8;
font-size: 30rpx;
font-weight: 300;
line-height: 1;
}
.gallery-add {
flex-direction: column;
gap: 8rpx;
border: 2rpx dashed #cfdccf;
background: #f8fbf6;
color: #6f8f83;
font-size: 23rpx;
font-weight: 800;
}
.gallery-add-icon {
font-size: 42rpx;
font-weight: 300;
line-height: 1;
}
.fixed-bottom {
display: flex;
gap: 14rpx;
+264 -2
View File
@@ -3,6 +3,7 @@ const tagsApi = require('../../api/tags')
const dateUtil = require('../../utils/date')
const { BRAND_CONFIG } = require('../../utils/config')
const { markPlanningRefresh } = require('../../utils/planning-refresh')
const { chooseImageFilePaths, chooseImageFilePath, uploadObjectFile, resolveUploadedImagePreviewUrl } = require('../../utils/upload')
const PRESETS = [
{ value: 'EVERYDAY', label: '全周营业', workDays: [1, 2, 3, 4, 5, 6, 7], startTime: '10:00', endTime: '22:00' },
@@ -73,6 +74,34 @@ function resolveFirstImageUrl(urls) {
return Array.isArray(urls) ? String(urls[0] || '').trim() : ''
}
function normalizeImageUrls(urls) {
return Array.isArray(urls) ? urls.map(url => String(url || '').trim()).filter(Boolean) : []
}
function introLength(value) {
return String(value || '').length
}
function parseFileIds(value) {
return String(value || '')
.split(',')
.map(item => String(item || '').trim())
.filter(Boolean)
}
function joinFileIds(fileIds) {
return (Array.isArray(fileIds) ? fileIds : []).map(item => String(item || '').trim()).filter(Boolean).join(',')
}
function normalizeGalleryItems(fileIds, urls) {
const normalizedFileIds = parseFileIds(fileIds)
const normalizedUrls = normalizeImageUrls(urls)
return normalizedFileIds.map((fileId, index) => ({
fileId,
url: normalizedUrls[index] || ''
}))
}
function normalizeTagOption(tag) {
const name = String((tag && (tag.displayName || tag.tagName || tag.name)) || '').trim()
if (!name) {
@@ -111,6 +140,25 @@ function buildWorkDaysText(days) {
return selected.map(day => WEEKDAYS.find(item => item.value === day)).filter(Boolean).map(item => item.label).join('、') || '未设置营业日'
}
function resolveBusinessStatus(settings) {
if (Number(settings.status) === 0) {
return {
text: '已停用',
className: 'closed'
}
}
if (settings.authorizationExpired) {
return {
text: '授权到期',
className: 'warning'
}
}
return {
text: '营业中',
className: 'open'
}
}
function buildShopPayload(settings, form) {
const workDays = copyWorkDays(form.scheduleWorkDays)
return {
@@ -139,6 +187,33 @@ function buildShopPayload(settings, form) {
}
}
function buildProfilePayload(settings, profileForm) {
return {
shopName: String(profileForm.shopName || '').trim(),
description: String(profileForm.rule || '').trim(),
address: String(profileForm.address || '').trim(),
mapProvider: settings.mapProvider || '',
longitude: settings.longitude,
latitude: settings.latitude,
businessHours: settings.businessHours || '',
schedulePresetType: settings.schedulePresetType || '',
scheduleWorkDays: settings.scheduleWorkDays || '',
scheduleRemark: settings.scheduleRemark || '',
coverImageFileId: String(profileForm.coverImageFileId || '').trim(),
imageFileIds: joinFileIds(profileForm.galleryFileIds),
themePrimaryColor: settings.themePrimaryColor || '',
themeSecondaryColor: settings.themeSecondaryColor || '',
themeAccentColor: settings.themeAccentColor || '',
themePageBgColor: settings.themePageBgColor || '',
themeCardBgColor: settings.themeCardBgColor || '',
themeBackgroundImageFileId: settings.themeBackgroundImageFileId || '',
status: settings.status,
authorizationStartDate: settings.authorizationStartDate,
authorizationDays: settings.authorizationDays,
authorizationExpireTime: settings.authorizationExpireTime
}
}
function resolveForm(settings) {
const hours = String(settings.businessHours || '').split('-')
const preset = buildPreset(settings.schedulePresetType || 'EVERYDAY')
@@ -156,11 +231,23 @@ Page({
loading: false,
loaded: false,
saving: false,
coverUploading: false,
galleryUploading: false,
profileSheetVisible: false,
activeProfileField: 'shopName',
profileSheetTitle: '修改店铺名称',
profileSheetSaveText: '保存名称',
scheduleSheetVisible: false,
activeScheduleTab: 'RULE',
shopName: BRAND_CONFIG.defaultShopName,
shopDescription: DEFAULT_SHOP_INTRO,
shopAddress: '暂未填写地址',
businessStatusText: '营业中',
businessStatusClass: 'open',
coverImagePreviewUrl: '',
imageCountText: '暂无图片',
galleryItems: [],
introLength: introLength(DEFAULT_SHOP_INTRO),
tagList: [],
tagCountText: '暂无标签',
scheduleSummary: '营业时间未设置',
@@ -181,6 +268,13 @@ Page({
scheduleWorkDays: [1, 2, 3, 4, 5, 6, 7],
scheduleRemark: ''
},
profileForm: {
shopName: BRAND_CONFIG.defaultShopName,
rule: DEFAULT_SHOP_INTRO,
address: '',
galleryFileIds: [],
coverImageFileId: ''
},
exceptionForm: {
workDate: dateUtil.formatDate(new Date()),
exceptionType: 'REST',
@@ -209,6 +303,16 @@ Page({
tagsApi.listAll()
])
const form = resolveForm(settings || {})
const status = resolveBusinessStatus(settings || {})
const imageUrls = normalizeImageUrls(settings.imageUrls)
const galleryItems = normalizeGalleryItems(settings.imageFileIds, settings.imageUrls)
const profileForm = {
shopName: settings.shopName || settings.name || this.data.profileForm.shopName,
rule: settings.description || DEFAULT_SHOP_INTRO,
address: settings.address || '',
galleryFileIds: galleryItems.map(item => item.fileId),
coverImageFileId: settings.coverImageFileId || ''
}
const exceptionList = (exceptions || []).map(item => ({
...item,
startTime: item.startTime ? String(item.startTime).slice(0, 5) : '',
@@ -221,7 +325,14 @@ Page({
settingsSnapshot: settings || {},
shopName: settings.shopName || settings.name || this.data.shopName,
shopDescription: settings.description || DEFAULT_SHOP_INTRO,
shopAddress: settings.address || '暂未填写地址',
businessStatusText: status.text,
businessStatusClass: status.className,
coverImagePreviewUrl: resolveFirstImageUrl(settings.coverImageUrls),
imageCountText: imageUrls.length ? `已上传 ${imageUrls.length} 张图片` : '暂无图片',
galleryItems,
profileForm,
introLength: introLength(profileForm.rule),
tagList,
tagCountText: tagList.length ? `${tagList.length} 个标签` : '暂无标签',
scheduleSummary: `${buildWorkDaysText(form.scheduleWorkDays)} · ${form.startTime} - ${form.endTime}`,
@@ -240,8 +351,159 @@ Page({
}
},
editProfile() {
wx.navigateTo({ url: '/pages/shop-profile-edit/index' })
openProfileSheet(event) {
this.openProfileSheetByField(event.currentTarget.dataset.field || 'shopName')
},
openProfileSheetByField(field) {
const titleMap = {
shopName: '修改店铺名称',
rule: '修改店铺简介',
address: '修改店铺地址',
cover: '修改店铺主图',
gallery: '修改环境照片'
}
const saveTextMap = {
shopName: '保存名称',
rule: '保存简介',
address: '保存地址',
cover: '保存主图',
gallery: '保存照片'
}
this.setData({
profileSheetVisible: true,
activeProfileField: titleMap[field] ? field : 'shopName',
profileSheetTitle: titleMap[field] || titleMap.shopName,
profileSheetSaveText: saveTextMap[field] || saveTextMap.shopName
})
},
closeProfileSheet() {
if (this.data.saving || this.data.coverUploading || this.data.galleryUploading) {
return
}
this.setData({ profileSheetVisible: false })
},
onProfileInput(event) {
const field = event.currentTarget.dataset.field
const value = event.detail.value
const nextData = { [`profileForm.${field}`]: value }
if (field === 'rule') {
nextData.introLength = introLength(value)
}
this.setData(nextData)
},
async chooseCoverImage() {
if (this.data.coverUploading || this.data.galleryUploading || this.data.saving) {
return
}
try {
const filePath = await chooseImageFilePath()
if (!filePath) {
return
}
this.setData({ coverUploading: true })
const uploadResult = await uploadObjectFile(filePath)
const fileId = String(uploadResult && uploadResult.id ? uploadResult.id : '').trim()
if (!fileId) {
throw new Error('店铺主图上传失败:上传接口未返回文件ID')
}
this.setData({
'profileForm.coverImageFileId': fileId,
coverImagePreviewUrl: resolveUploadedImagePreviewUrl(uploadResult, filePath)
})
} catch (error) {
wx.showToast({ title: error.message || '店铺主图上传失败', icon: 'none' })
} finally {
this.setData({ coverUploading: false })
}
},
removeCoverImage() {
if (this.data.coverUploading || this.data.galleryUploading || this.data.saving) {
return
}
this.setData({
'profileForm.coverImageFileId': '',
coverImagePreviewUrl: ''
})
},
async chooseGalleryImages() {
if (this.data.galleryUploading || this.data.saving || this.data.coverUploading) {
return
}
const remainingCount = 9 - this.data.galleryItems.length
if (remainingCount <= 0) {
wx.showToast({ title: '最多上传 9 张环境照片', icon: 'none' })
return
}
try {
const filePaths = await chooseImageFilePaths(remainingCount)
if (!filePaths.length) {
return
}
this.setData({ galleryUploading: true })
const uploadedItems = []
for (let index = 0; index < filePaths.length; index += 1) {
const filePath = filePaths[index]
const uploadResult = await uploadObjectFile(filePath)
const fileId = String(uploadResult && uploadResult.id ? uploadResult.id : '').trim()
if (!fileId) {
throw new Error('环境照片上传失败:上传接口未返回文件ID')
}
uploadedItems.push({
fileId,
url: resolveUploadedImagePreviewUrl(uploadResult, filePath)
})
}
const galleryItems = this.data.galleryItems.concat(uploadedItems)
this.setData({
galleryItems,
'profileForm.galleryFileIds': galleryItems.map(item => item.fileId)
})
} catch (error) {
wx.showToast({ title: error.message || '环境照片上传失败', icon: 'none' })
} finally {
this.setData({ galleryUploading: false })
}
},
removeGalleryImage(event) {
if (this.data.galleryUploading || this.data.saving) {
return
}
const index = Number(event.currentTarget.dataset.index)
if (!Number.isInteger(index) || index < 0 || index >= this.data.galleryItems.length) {
wx.showToast({ title: '环境照片不存在', icon: 'none' })
return
}
const galleryItems = this.data.galleryItems.filter((item, itemIndex) => itemIndex !== index)
this.setData({
galleryItems,
'profileForm.galleryFileIds': galleryItems.map(item => item.fileId)
})
},
async saveProfileField() {
const shopName = String(this.data.profileForm.shopName || '').trim()
if (!shopName) {
wx.showToast({ title: '请填写店铺名称', icon: 'none' })
return
}
this.setData({ saving: true })
try {
await shopApi.saveSettings(buildProfilePayload(this.data.settingsSnapshot, this.data.profileForm))
wx.showToast({ title: '店铺信息已保存', icon: 'success' })
this.setData({ profileSheetVisible: false })
await this.loadSettings()
} catch (error) {
wx.showToast({ title: error.message || '店铺信息保存失败', icon: 'none' })
} finally {
this.setData({ saving: false })
}
},
editTags() {
+189 -67
View File
@@ -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>
+493 -251
View File
@@ -1,28 +1,11 @@
.page {
.shop-settings-page {
background:
linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(247, 240, 232, 0.96)),
linear-gradient(135deg, rgba(89, 121, 102, 0.14), rgba(181, 134, 86, 0.12));
linear-gradient(180deg, rgba(250, 250, 244, 0.98), rgba(248, 244, 237, 0.98)),
linear-gradient(135deg, rgba(111, 143, 131, 0.12), rgba(228, 200, 150, 0.1));
}
.page-heading {
display: flex;
flex-direction: column;
gap: 8rpx;
margin: 4rpx 0 22rpx;
}
.page-title {
color: #2f2a25;
font-size: 36rpx;
font-weight: 900;
line-height: 1.25;
}
.page-subtitle,
.section-subtitle {
color: #8a796a;
font-size: 23rpx;
line-height: 1.4;
.nav-spacer {
height: 6rpx;
}
.loading-state {
@@ -31,120 +14,211 @@
text-align: center;
}
.cover-card {
.shop-hero {
position: relative;
height: 340rpx;
overflow: hidden;
border: 1rpx solid rgba(91, 132, 102, 0.16);
border-radius: 28rpx;
background:
linear-gradient(135deg, rgba(73, 101, 85, 0.95), rgba(179, 131, 90, 0.95)),
radial-gradient(circle at 24% 22%, rgba(255, 245, 223, 0.28), transparent 36%);
box-shadow: 0 22rpx 46rpx rgba(83, 64, 44, 0.18);
background: #edf6ea;
box-shadow: 0 18rpx 38rpx rgba(73, 101, 85, 0.12);
}
.cover-preview,
.cover-preview image {
.hero-bg {
position: absolute;
top: -72rpx;
right: -54rpx;
width: 250rpx;
height: 250rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.48);
}
.hero-content {
position: relative;
display: flex;
align-items: center;
gap: 22rpx;
min-height: 214rpx;
padding: 34rpx 30rpx 26rpx;
}
.hero-avatar {
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 126rpx;
height: 126rpx;
overflow: hidden;
border: 4rpx solid rgba(255, 255, 255, 0.76);
border-radius: 50%;
background: #d7e6d8;
color: #4d8262;
font-size: 42rpx;
font-weight: 900;
box-shadow: 0 12rpx 26rpx rgba(68, 87, 72, 0.13);
}
.hero-avatar image {
width: 100%;
height: 100%;
}
.cover-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10rpx;
color: rgba(255, 255, 255, 0.82);
}
.cover-empty-title {
font-size: 36rpx;
font-weight: 900;
}
.cover-empty-desc {
font-size: 23rpx;
font-weight: 600;
opacity: 0.86;
}
.cover-badge {
position: absolute;
top: 26rpx;
left: 28rpx;
z-index: 2;
padding: 8rpx 20rpx;
border-radius: 999rpx;
background: rgba(255, 244, 222, 0.88);
color: #5b4635;
font-size: 22rpx;
font-weight: 900;
}
.cover-shade {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 20rpx;
padding: 30rpx;
background:
linear-gradient(180deg, rgba(30, 24, 19, 0.02), rgba(30, 24, 19, 0.6)),
linear-gradient(110deg, rgba(48, 70, 56, 0.36), transparent 58%);
}
.cover-copy {
.hero-main {
flex: 1;
min-width: 0;
color: #fffdf8;
}
.cover-title,
.cover-desc {
.hero-title-row,
.hero-badges,
.hero-meta-row {
display: flex;
align-items: center;
min-width: 0;
}
.hero-title-row {
gap: 8rpx;
}
.hero-title {
display: block;
}
.cover-title {
min-width: 0;
overflow: hidden;
font-size: 40rpx;
color: #27231f;
font-size: 32rpx;
font-weight: 900;
line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
.cover-desc {
margin-top: 8rpx;
display: -webkit-box;
overflow: hidden;
max-width: 430rpx;
font-size: 24rpx;
line-height: 1.45;
opacity: 0.9;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.cover-btn {
display: flex;
.edit-mark {
flex: 0 0 auto;
align-items: center;
justify-content: center;
min-width: 164rpx;
min-height: 62rpx;
padding: 0 20rpx;
border-radius: 20rpx;
background: #fff8ed;
color: #6d4d35;
color: #9ba78f;
font-size: 24rpx;
font-weight: 900;
}
.hero-badges {
flex-wrap: wrap;
gap: 10rpx;
margin-top: 14rpx;
}
.status-badge,
.soft-badge {
display: inline-flex;
align-items: center;
max-width: 100%;
min-height: 42rpx;
padding: 0 16rpx;
overflow: hidden;
border-radius: 999rpx;
font-size: 22rpx;
font-weight: 800;
text-overflow: ellipsis;
white-space: nowrap;
}
.status-badge.open {
background: #dff0e3;
color: #2f7a51;
}
.status-badge.closed {
background: #f5e5e2;
color: #a35249;
}
.status-badge.warning {
background: #fff4d8;
color: #a56c21;
}
.soft-badge {
background: rgba(255, 255, 255, 0.72);
color: #7c806d;
}
.hero-meta-row {
gap: 8rpx;
margin-top: 14rpx;
color: #7f8979;
font-size: 24rpx;
line-height: 1.35;
}
.meta-dot {
flex: 0 0 auto;
color: #9ab495;
}
.hero-address {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hero-arrow {
flex: 0 0 auto;
color: #a8b1a4;
font-size: 52rpx;
font-weight: 300;
line-height: 1;
}
.hero-stats {
position: relative;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
min-height: 122rpx;
border-radius: 24rpx 24rpx 0 0;
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 -8rpx 22rpx rgba(70, 65, 56, 0.05);
}
.stat-item {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
min-width: 0;
gap: 10rpx;
padding: 18rpx 10rpx;
border-right: 1rpx solid #eee8df;
}
.stat-item:last-child {
border-right: 0;
}
.stat-item text,
.stat-item view {
display: block;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.stat-item text {
color: #8d8379;
font-size: 22rpx;
line-height: 1.2;
}
.stat-item view {
color: #211f1c;
font-size: 25rpx;
font-weight: 900;
line-height: 1.2;
}
.section {
margin-top: 26rpx;
margin-top: 30rpx;
}
.section-head {
@@ -155,201 +229,154 @@
margin: 0 4rpx 16rpx;
}
.section-head view {
.section-title-wrap {
display: flex;
flex-direction: column;
gap: 6rpx;
align-items: center;
min-width: 0;
gap: 12rpx;
}
.leaf-icon {
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #dbeadf;
color: #5f9572;
font-size: 20rpx;
line-height: 1;
}
.section-title {
color: #3f382f;
color: #2d2924;
font-size: 30rpx;
font-weight: 800;
}
.section-subtitle {
font-size: 22rpx;
font-weight: 900;
line-height: 1.2;
}
.section-link {
flex: 0 0 auto;
color: #c86a5c;
color: #4f9b6d;
font-size: 24rpx;
font-weight: 900;
}
.profile-summary-card,
.tag-summary-card,
.schedule-summary-card {
.settings-card {
overflow: hidden;
border-radius: 24rpx;
background: rgba(255, 255, 255, 0.94);
box-shadow: 0 14rpx 30rpx rgba(66, 58, 47, 0.06);
}
.profile-summary-card {
padding: 8rpx 24rpx;
}
.summary-row {
.settings-row {
display: flex;
align-items: flex-start;
gap: 20rpx;
min-height: 92rpx;
padding: 22rpx 0;
align-items: center;
gap: 18rpx;
min-height: 96rpx;
padding: 18rpx 24rpx;
border-bottom: 1rpx solid #eee8df;
}
.summary-row-last {
.settings-row.row-last {
border-bottom: 0;
}
.summary-label {
flex: 0 0 140rpx;
color: #8d8175;
font-size: 24rpx;
font-weight: 700;
.tall-row {
align-items: flex-start;
min-height: 108rpx;
}
.summary-value {
min-width: 0;
flex: 1;
color: #332c27;
.row-label {
flex: 0 0 154rpx;
color: #302c27;
font-size: 26rpx;
font-weight: 900;
line-height: 1.45;
text-align: right;
font-weight: 800;
line-height: 1.35;
}
.summary-description {
color: #6f655d;
font-size: 24rpx;
.row-value {
display: block;
flex: 1;
min-width: 0;
overflow: hidden;
color: #8f877e;
font-size: 25rpx;
font-weight: 600;
line-height: 1.4;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}
.tag-summary-card {
padding: 24rpx;
.muted-value {
color: #aaa097;
}
.tag-cloud {
.accent-value {
color: #ba823a;
}
.row-arrow,
.row-eye {
flex: 0 0 auto;
color: #b4aea6;
font-size: 40rpx;
font-weight: 300;
line-height: 1;
}
.row-eye {
color: #73a083;
font-size: 28rpx;
}
.row-thumb {
flex: 0 0 auto;
width: 62rpx;
height: 62rpx;
overflow: hidden;
border-radius: 50%;
background: #edf1eb;
}
.row-thumb image {
width: 100%;
height: 100%;
}
.row-tags {
display: flex;
flex: 1;
flex-wrap: wrap;
align-items: center;
gap: 12rpx;
justify-content: flex-end;
gap: 10rpx;
min-width: 0;
}
.tag-preview {
display: inline-flex;
align-items: center;
min-height: 52rpx;
max-width: 100%;
padding: 0 18rpx;
max-width: 188rpx;
min-height: 44rpx;
padding: 0 14rpx;
overflow: hidden;
border: 1rpx solid;
border-radius: 999rpx;
font-size: 24rpx;
font-size: 22rpx;
font-weight: 800;
text-overflow: ellipsis;
white-space: nowrap;
}
.tag-add {
display: inline-flex;
align-items: center;
justify-content: center;
width: 52rpx;
height: 52rpx;
border: 1rpx dashed #e2b9af;
border-radius: 50%;
color: #c86a5c;
font-size: 36rpx;
font-weight: 300;
}
.empty-inline {
padding: 12rpx 0;
color: #a0968e;
font-size: 24rpx;
}
.summary-action-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
margin-top: 20rpx;
padding-top: 16rpx;
border-top: 1rpx solid #eee8df;
color: #9a8f86;
font-size: 22rpx;
}
.summary-arrow {
flex: 0 0 auto;
color: #b7aca3;
font-size: 34rpx;
font-weight: 300;
line-height: 1;
}
.schedule-summary-card {
padding: 0 24rpx;
}
.schedule-summary-row {
display: flex;
align-items: center;
gap: 18rpx;
min-height: 120rpx;
padding: 20rpx 0;
border-bottom: 1rpx solid #eee8df;
}
.special-summary-row {
border-bottom: 0;
}
.summary-icon {
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 64rpx;
height: 64rpx;
border-radius: 22rpx;
font-size: 28rpx;
font-weight: 900;
}
.schedule-icon {
background: #e5eee9;
color: #55786d;
}
.exception-icon {
background: #fff0ed;
color: #c86a5c;
}
.summary-main {
display: flex;
flex: 1;
flex-direction: column;
gap: 8rpx;
min-width: 0;
}
.summary-main .summary-value {
text-align: left;
}
.summary-meta {
overflow: hidden;
color: #9b9188;
font-size: 22rpx;
line-height: 1.4;
text-overflow: ellipsis;
white-space: nowrap;
}
.sheet-mask {
position: fixed;
top: 0;
@@ -426,7 +453,7 @@
.sheet-tab.active {
background: #fffdf8;
color: #c86a5c;
color: #2f7a51;
box-shadow: 0 6rpx 14rpx rgba(67, 52, 41, 0.07);
}
@@ -516,6 +543,221 @@
margin-top: 22rpx;
}
.profile-sheet {
padding-bottom: calc(28rpx + env(safe-area-inset-bottom));
}
.profile-field-column {
display: flex;
flex-direction: column;
gap: 14rpx;
padding: 10rpx 0 4rpx;
}
.profile-input,
.intro-editor {
min-height: 76rpx;
padding: 0 22rpx;
border: 1rpx solid #eadfd2;
border-radius: 18rpx;
background: #fff8f2;
color: #3d3128;
font-size: 28rpx;
line-height: 76rpx;
}
.intro-editor {
position: relative;
min-height: 184rpx;
padding: 18rpx 22rpx 42rpx;
line-height: 1.5;
}
.intro-editor textarea {
width: 100%;
height: 124rpx;
color: #3d3128;
font-size: 26rpx;
line-height: 1.5;
}
.intro-placeholder {
color: #b4a79b;
}
.intro-count {
position: absolute;
right: 22rpx;
bottom: 12rpx;
color: #b2a396;
font-size: 20rpx;
line-height: 1;
}
.cover-card {
position: relative;
height: 320rpx;
overflow: hidden;
border-radius: 24rpx;
background:
linear-gradient(135deg, rgba(73, 101, 85, 0.95), rgba(179, 131, 90, 0.95)),
radial-gradient(circle at 24% 22%, rgba(255, 245, 223, 0.28), transparent 36%);
box-shadow: 0 18rpx 34rpx rgba(83, 64, 44, 0.14);
}
.compact-cover-card {
margin-top: 8rpx;
}
.cover-preview,
.cover-preview image {
width: 100%;
height: 100%;
}
.cover-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10rpx;
color: rgba(255, 255, 255, 0.82);
}
.cover-empty-title {
font-size: 34rpx;
font-weight: 900;
}
.cover-empty-desc {
font-size: 23rpx;
font-weight: 600;
opacity: 0.86;
}
.cover-actions {
position: absolute;
right: 24rpx;
bottom: 22rpx;
left: 24rpx;
display: flex;
gap: 12rpx;
}
.cover-btn,
.cover-remove {
display: flex;
align-items: center;
justify-content: center;
min-height: 64rpx;
padding: 0 20rpx;
border-radius: 20rpx;
font-size: 24rpx;
font-weight: 900;
}
.cover-btn {
flex: 1;
background: #fff8ed;
color: #6d4d35;
}
.cover-remove {
min-width: 150rpx;
background: rgba(255, 253, 248, 0.18);
color: #fffdf8;
}
.gallery-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16rpx;
margin-bottom: 18rpx;
}
.gallery-head view {
display: flex;
flex-direction: column;
gap: 8rpx;
min-width: 0;
}
.gallery-subtitle {
color: #8a796a;
font-size: 23rpx;
line-height: 1.35;
}
.gallery-count {
flex: 0 0 auto;
color: #7c9a82;
font-size: 24rpx;
font-weight: 900;
}
.gallery-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14rpx;
}
.gallery-item,
.gallery-add {
position: relative;
display: flex;
align-items: center;
justify-content: center;
aspect-ratio: 1 / 1;
min-width: 0;
overflow: hidden;
border-radius: 18rpx;
background: #f5efe8;
}
.gallery-item image {
width: 100%;
height: 100%;
}
.gallery-placeholder {
color: #9d968e;
font-size: 24rpx;
}
.gallery-remove {
position: absolute;
top: 8rpx;
right: 8rpx;
display: flex;
align-items: center;
justify-content: center;
width: 38rpx;
height: 38rpx;
border-radius: 50%;
background: rgba(39, 35, 31, 0.58);
color: #fffdf8;
font-size: 30rpx;
font-weight: 300;
line-height: 1;
}
.gallery-add {
flex-direction: column;
gap: 8rpx;
border: 2rpx dashed #cfdccf;
background: #f8fbf6;
color: #6f8f83;
font-size: 23rpx;
font-weight: 800;
}
.gallery-add-icon {
font-size: 42rpx;
font-weight: 300;
line-height: 1;
}
.exception-history {
margin-top: 24rpx;
padding: 18rpx;
File diff suppressed because one or more lines are too long
+6 -128
View File
File diff suppressed because one or more lines are too long