优化店务小程序店铺设置UI
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const shopApi = require('../../api/shop')
|
const shopApi = require('../../api/shop')
|
||||||
const { BRAND_CONFIG } = require('../../utils/config')
|
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 = '专注法式、晕染与手绘设计,适合想要温柔质感的客人。'
|
const DEFAULT_SHOP_INTRO = '专注法式、晕染与手绘设计,适合想要温柔质感的客人。'
|
||||||
|
|
||||||
@@ -12,11 +12,31 @@ function introLength(value) {
|
|||||||
return String(value || '').length
|
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) {
|
function buildShopPayload(settings, form) {
|
||||||
return {
|
return {
|
||||||
shopName: String(form.shopName || '').trim(),
|
shopName: String(form.shopName || '').trim(),
|
||||||
description: String(form.rule || '').trim(),
|
description: String(form.rule || '').trim(),
|
||||||
address: settings.address || '',
|
address: String(form.address || '').trim(),
|
||||||
mapProvider: settings.mapProvider || '',
|
mapProvider: settings.mapProvider || '',
|
||||||
longitude: settings.longitude,
|
longitude: settings.longitude,
|
||||||
latitude: settings.latitude,
|
latitude: settings.latitude,
|
||||||
@@ -25,7 +45,7 @@ function buildShopPayload(settings, form) {
|
|||||||
scheduleWorkDays: settings.scheduleWorkDays || '',
|
scheduleWorkDays: settings.scheduleWorkDays || '',
|
||||||
scheduleRemark: settings.scheduleRemark || '',
|
scheduleRemark: settings.scheduleRemark || '',
|
||||||
coverImageFileId: String(form.coverImageFileId || '').trim(),
|
coverImageFileId: String(form.coverImageFileId || '').trim(),
|
||||||
imageFileIds: String(settings.imageFileIds || '').trim(),
|
imageFileIds: joinFileIds(form.galleryFileIds),
|
||||||
themePrimaryColor: settings.themePrimaryColor || '',
|
themePrimaryColor: settings.themePrimaryColor || '',
|
||||||
themeSecondaryColor: settings.themeSecondaryColor || '',
|
themeSecondaryColor: settings.themeSecondaryColor || '',
|
||||||
themeAccentColor: settings.themeAccentColor || '',
|
themeAccentColor: settings.themeAccentColor || '',
|
||||||
@@ -44,12 +64,16 @@ Page({
|
|||||||
loading: false,
|
loading: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
coverUploading: false,
|
coverUploading: false,
|
||||||
|
galleryUploading: false,
|
||||||
|
galleryItems: [],
|
||||||
coverImagePreviewUrl: '',
|
coverImagePreviewUrl: '',
|
||||||
introLength: introLength(DEFAULT_SHOP_INTRO),
|
introLength: introLength(DEFAULT_SHOP_INTRO),
|
||||||
settingsSnapshot: {},
|
settingsSnapshot: {},
|
||||||
form: {
|
form: {
|
||||||
shopName: BRAND_CONFIG.defaultShopName,
|
shopName: BRAND_CONFIG.defaultShopName,
|
||||||
rule: DEFAULT_SHOP_INTRO,
|
rule: DEFAULT_SHOP_INTRO,
|
||||||
|
address: '',
|
||||||
|
galleryFileIds: [],
|
||||||
coverImageFileId: ''
|
coverImageFileId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -62,15 +86,19 @@ Page({
|
|||||||
this.setData({ loading: true })
|
this.setData({ loading: true })
|
||||||
try {
|
try {
|
||||||
const settings = await shopApi.settings()
|
const settings = await shopApi.settings()
|
||||||
|
const galleryItems = normalizeGalleryItems(settings.imageFileIds, settings.imageUrls)
|
||||||
const form = {
|
const form = {
|
||||||
shopName: settings.shopName || settings.name || this.data.form.shopName,
|
shopName: settings.shopName || settings.name || this.data.form.shopName,
|
||||||
rule: settings.description || DEFAULT_SHOP_INTRO,
|
rule: settings.description || DEFAULT_SHOP_INTRO,
|
||||||
|
address: settings.address || '',
|
||||||
|
galleryFileIds: galleryItems.map(item => item.fileId),
|
||||||
coverImageFileId: settings.coverImageFileId || ''
|
coverImageFileId: settings.coverImageFileId || ''
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
settingsSnapshot: settings || {},
|
settingsSnapshot: settings || {},
|
||||||
form,
|
form,
|
||||||
introLength: introLength(form.rule),
|
introLength: introLength(form.rule),
|
||||||
|
galleryItems,
|
||||||
coverImagePreviewUrl: resolveFirstImageUrl(settings.coverImageUrls)
|
coverImagePreviewUrl: resolveFirstImageUrl(settings.coverImageUrls)
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -91,7 +119,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
async chooseCoverImage() {
|
async chooseCoverImage() {
|
||||||
if (this.data.coverUploading || this.data.saving) {
|
if (this.data.coverUploading || this.data.galleryUploading || this.data.saving) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -117,7 +145,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
removeCoverImage() {
|
removeCoverImage() {
|
||||||
if (this.data.coverUploading || this.data.saving) {
|
if (this.data.coverUploading || this.data.galleryUploading || this.data.saving) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setData({
|
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() {
|
async save() {
|
||||||
const shopName = String(this.data.form.shopName || '').trim()
|
const shopName = String(this.data.form.shopName || '').trim()
|
||||||
if (!shopName) {
|
if (!shopName) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<view class="edit-tip-card">
|
<view class="edit-tip-card">
|
||||||
<text class="edit-tip-title">门店第一眼</text>
|
<text class="edit-tip-title">门店第一眼</text>
|
||||||
<text class="edit-tip-text">店铺名称、介绍和封面会展示在用户端门店详情页。</text>
|
<text class="edit-tip-text">店铺名称、介绍、地址和封面会展示在用户端门店详情页。</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cover-card">
|
<view class="cover-card">
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="cover-badge">门店封面</view>
|
<view class="cover-badge">门店封面</view>
|
||||||
<view class="cover-actions">
|
<view class="cover-actions">
|
||||||
<button class="cover-btn" loading="{{coverUploading}}" disabled="{{coverUploading || saving}}" bindtap="chooseCoverImage">{{coverUploading ? '上传中' : '更换主图'}}</button>
|
<button class="cover-btn" loading="{{coverUploading}}" disabled="{{coverUploading || galleryUploading || saving}}" bindtap="chooseCoverImage">{{coverUploading ? '上传中' : '更换主图'}}</button>
|
||||||
<button wx:if="{{coverImagePreviewUrl}}" class="cover-remove" disabled="{{coverUploading || saving}}" bindtap="removeCoverImage">移除</button>
|
<button wx:if="{{coverImagePreviewUrl}}" class="cover-remove" disabled="{{coverUploading || galleryUploading || saving}}" bindtap="removeCoverImage">移除</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -35,6 +35,10 @@
|
|||||||
<text class="field-label">店铺名称</text>
|
<text class="field-label">店铺名称</text>
|
||||||
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="请输入店铺名称" />
|
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="请输入店铺名称" />
|
||||||
</view>
|
</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">
|
<view class="field field-column">
|
||||||
<text class="field-label">门店介绍</text>
|
<text class="field-label">门店介绍</text>
|
||||||
<view class="intro-editor">
|
<view class="intro-editor">
|
||||||
@@ -51,9 +55,30 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</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>
|
</block>
|
||||||
|
|
||||||
<view class="fixed-bottom">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page-subtitle,
|
.page-subtitle,
|
||||||
.form-title {
|
.form-title,
|
||||||
|
.gallery-subtitle {
|
||||||
color: #8a796a;
|
color: #8a796a;
|
||||||
font-size: 23rpx;
|
font-size: 23rpx;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
@@ -38,17 +39,17 @@
|
|||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
padding: 22rpx 24rpx;
|
padding: 22rpx 24rpx;
|
||||||
border-radius: 22rpx;
|
border-radius: 22rpx;
|
||||||
background: #fff0ed;
|
background: #edf6ea;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-tip-title {
|
.edit-tip-title {
|
||||||
color: #3e312d;
|
color: #2d392f;
|
||||||
font-size: 29rpx;
|
font-size: 29rpx;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-tip-text {
|
.edit-tip-text {
|
||||||
color: #9f6c64;
|
color: #668268;
|
||||||
font-size: 23rpx;
|
font-size: 23rpx;
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
@@ -136,12 +137,20 @@
|
|||||||
color: #fffdf8;
|
color: #fffdf8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-card {
|
.form-card,
|
||||||
|
.gallery-card {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
padding: 12rpx 0;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-card {
|
||||||
|
padding: 12rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-card {
|
||||||
|
padding: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.form-header {
|
.form-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -229,6 +238,90 @@
|
|||||||
line-height: 1;
|
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 {
|
.fixed-bottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 14rpx;
|
gap: 14rpx;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ const tagsApi = require('../../api/tags')
|
|||||||
const dateUtil = require('../../utils/date')
|
const dateUtil = require('../../utils/date')
|
||||||
const { BRAND_CONFIG } = require('../../utils/config')
|
const { BRAND_CONFIG } = require('../../utils/config')
|
||||||
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
||||||
|
const { chooseImageFilePaths, chooseImageFilePath, uploadObjectFile, resolveUploadedImagePreviewUrl } = require('../../utils/upload')
|
||||||
|
|
||||||
const PRESETS = [
|
const PRESETS = [
|
||||||
{ value: 'EVERYDAY', label: '全周营业', workDays: [1, 2, 3, 4, 5, 6, 7], startTime: '10:00', endTime: '22:00' },
|
{ 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() : ''
|
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) {
|
function normalizeTagOption(tag) {
|
||||||
const name = String((tag && (tag.displayName || tag.tagName || tag.name)) || '').trim()
|
const name = String((tag && (tag.displayName || tag.tagName || tag.name)) || '').trim()
|
||||||
if (!name) {
|
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('、') || '未设置营业日'
|
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) {
|
function buildShopPayload(settings, form) {
|
||||||
const workDays = copyWorkDays(form.scheduleWorkDays)
|
const workDays = copyWorkDays(form.scheduleWorkDays)
|
||||||
return {
|
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) {
|
function resolveForm(settings) {
|
||||||
const hours = String(settings.businessHours || '').split('-')
|
const hours = String(settings.businessHours || '').split('-')
|
||||||
const preset = buildPreset(settings.schedulePresetType || 'EVERYDAY')
|
const preset = buildPreset(settings.schedulePresetType || 'EVERYDAY')
|
||||||
@@ -156,11 +231,23 @@ Page({
|
|||||||
loading: false,
|
loading: false,
|
||||||
loaded: false,
|
loaded: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
|
coverUploading: false,
|
||||||
|
galleryUploading: false,
|
||||||
|
profileSheetVisible: false,
|
||||||
|
activeProfileField: 'shopName',
|
||||||
|
profileSheetTitle: '修改店铺名称',
|
||||||
|
profileSheetSaveText: '保存名称',
|
||||||
scheduleSheetVisible: false,
|
scheduleSheetVisible: false,
|
||||||
activeScheduleTab: 'RULE',
|
activeScheduleTab: 'RULE',
|
||||||
shopName: BRAND_CONFIG.defaultShopName,
|
shopName: BRAND_CONFIG.defaultShopName,
|
||||||
shopDescription: DEFAULT_SHOP_INTRO,
|
shopDescription: DEFAULT_SHOP_INTRO,
|
||||||
|
shopAddress: '暂未填写地址',
|
||||||
|
businessStatusText: '营业中',
|
||||||
|
businessStatusClass: 'open',
|
||||||
coverImagePreviewUrl: '',
|
coverImagePreviewUrl: '',
|
||||||
|
imageCountText: '暂无图片',
|
||||||
|
galleryItems: [],
|
||||||
|
introLength: introLength(DEFAULT_SHOP_INTRO),
|
||||||
tagList: [],
|
tagList: [],
|
||||||
tagCountText: '暂无标签',
|
tagCountText: '暂无标签',
|
||||||
scheduleSummary: '营业时间未设置',
|
scheduleSummary: '营业时间未设置',
|
||||||
@@ -181,6 +268,13 @@ Page({
|
|||||||
scheduleWorkDays: [1, 2, 3, 4, 5, 6, 7],
|
scheduleWorkDays: [1, 2, 3, 4, 5, 6, 7],
|
||||||
scheduleRemark: ''
|
scheduleRemark: ''
|
||||||
},
|
},
|
||||||
|
profileForm: {
|
||||||
|
shopName: BRAND_CONFIG.defaultShopName,
|
||||||
|
rule: DEFAULT_SHOP_INTRO,
|
||||||
|
address: '',
|
||||||
|
galleryFileIds: [],
|
||||||
|
coverImageFileId: ''
|
||||||
|
},
|
||||||
exceptionForm: {
|
exceptionForm: {
|
||||||
workDate: dateUtil.formatDate(new Date()),
|
workDate: dateUtil.formatDate(new Date()),
|
||||||
exceptionType: 'REST',
|
exceptionType: 'REST',
|
||||||
@@ -209,6 +303,16 @@ Page({
|
|||||||
tagsApi.listAll()
|
tagsApi.listAll()
|
||||||
])
|
])
|
||||||
const form = resolveForm(settings || {})
|
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 => ({
|
const exceptionList = (exceptions || []).map(item => ({
|
||||||
...item,
|
...item,
|
||||||
startTime: item.startTime ? String(item.startTime).slice(0, 5) : '',
|
startTime: item.startTime ? String(item.startTime).slice(0, 5) : '',
|
||||||
@@ -221,7 +325,14 @@ Page({
|
|||||||
settingsSnapshot: settings || {},
|
settingsSnapshot: settings || {},
|
||||||
shopName: settings.shopName || settings.name || this.data.shopName,
|
shopName: settings.shopName || settings.name || this.data.shopName,
|
||||||
shopDescription: settings.description || DEFAULT_SHOP_INTRO,
|
shopDescription: settings.description || DEFAULT_SHOP_INTRO,
|
||||||
|
shopAddress: settings.address || '暂未填写地址',
|
||||||
|
businessStatusText: status.text,
|
||||||
|
businessStatusClass: status.className,
|
||||||
coverImagePreviewUrl: resolveFirstImageUrl(settings.coverImageUrls),
|
coverImagePreviewUrl: resolveFirstImageUrl(settings.coverImageUrls),
|
||||||
|
imageCountText: imageUrls.length ? `已上传 ${imageUrls.length} 张图片` : '暂无图片',
|
||||||
|
galleryItems,
|
||||||
|
profileForm,
|
||||||
|
introLength: introLength(profileForm.rule),
|
||||||
tagList,
|
tagList,
|
||||||
tagCountText: tagList.length ? `${tagList.length} 个标签` : '暂无标签',
|
tagCountText: tagList.length ? `${tagList.length} 个标签` : '暂无标签',
|
||||||
scheduleSummary: `${buildWorkDaysText(form.scheduleWorkDays)} · ${form.startTime} - ${form.endTime}`,
|
scheduleSummary: `${buildWorkDaysText(form.scheduleWorkDays)} · ${form.startTime} - ${form.endTime}`,
|
||||||
@@ -240,8 +351,159 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
editProfile() {
|
openProfileSheet(event) {
|
||||||
wx.navigateTo({ url: '/pages/shop-profile-edit/index' })
|
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() {
|
editTags() {
|
||||||
|
|||||||
@@ -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>
|
<view wx:if="{{loading}}" class="loading-state">店铺设置加载中</view>
|
||||||
<block wx:else>
|
<block wx:else>
|
||||||
<view class="page-heading">
|
<view class="nav-spacer"></view>
|
||||||
<text class="page-title">店铺设置</text>
|
|
||||||
<text class="page-subtitle">先看见门店状态,再按需调整细节。</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="cover-card">
|
<view class="shop-hero" data-field="cover" bindtap="openProfileSheet">
|
||||||
<view wx:if="{{coverImagePreviewUrl}}" class="cover-preview">
|
<view class="hero-bg"></view>
|
||||||
<image src="{{coverImagePreviewUrl}}" mode="aspectFill"></image>
|
<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>
|
||||||
<view wx:else class="cover-preview cover-empty">
|
<view class="hero-stats">
|
||||||
<text class="cover-empty-title">店铺封面</text>
|
<view class="stat-item">
|
||||||
<text class="cover-empty-desc">上传一张能代表风格的作品图</text>
|
<text>特殊日期</text>
|
||||||
</view>
|
<view>{{exceptionCountText}}</view>
|
||||||
<view class="cover-badge">门店档案</view>
|
</view>
|
||||||
<view class="cover-shade">
|
<view class="stat-item">
|
||||||
<view class="cover-copy">
|
<text>店铺图片</text>
|
||||||
<text class="cover-title">{{shopName || '店铺主图'}}</text>
|
<view>{{imageCountText}}</view>
|
||||||
<text class="cover-desc">{{shopDescription || '色彩、手作与细节管理的预约空间'}}</text>
|
</view>
|
||||||
|
<view class="stat-item">
|
||||||
|
<text>标签</text>
|
||||||
|
<view>{{tagCountText}}</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="cover-btn" bindtap="editProfile">修改档案</button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view id="shop-profile-card" class="section">
|
<view class="section">
|
||||||
<view class="section-head">
|
<view class="section-head">
|
||||||
<view>
|
<view class="section-title-wrap">
|
||||||
<text class="section-title">店铺档案</text>
|
<text class="leaf-icon">◒</text>
|
||||||
<text class="section-subtitle">展示给客户看的第一段介绍</text>
|
<text class="section-title">店铺资料</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="section-link" bindtap="editProfile">修改</text>
|
<text class="section-link" data-field="shopName" bindtap="openProfileSheet">编辑</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="card profile-summary-card" bindtap="editProfile">
|
<view class="settings-card">
|
||||||
<view class="summary-row">
|
<view class="settings-row" data-field="shopName" bindtap="openProfileSheet">
|
||||||
<text class="summary-label">店铺名称</text>
|
<text class="row-label">店铺名称</text>
|
||||||
<text class="summary-value">{{shopName || '未设置'}}</text>
|
<text class="row-value">{{shopName || '未设置'}}</text>
|
||||||
|
<text class="row-arrow">›</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="summary-row summary-row-last">
|
<view class="settings-row" data-field="rule" bindtap="openProfileSheet">
|
||||||
<text class="summary-label">门店介绍</text>
|
<text class="row-label">店铺简介</text>
|
||||||
<text class="summary-value summary-description">{{shopDescription || '暂未填写门店介绍'}}</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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view id="shop-tag-card" class="section">
|
<view class="section">
|
||||||
<view class="section-head">
|
<view class="section-head">
|
||||||
<view>
|
<view class="section-title-wrap">
|
||||||
<text class="section-title">店铺标签</text>
|
<text class="leaf-icon">◒</text>
|
||||||
<text class="section-subtitle">{{tagCountText}}</text>
|
<text class="section-title">店铺展示</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="section-link" bindtap="editTags">管理</text>
|
<text class="section-link" bindtap="editTags">管理</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="card tag-summary-card" bindtap="editTags">
|
<view class="settings-card">
|
||||||
<view wx:if="{{tagList.length}}" class="tag-cloud">
|
<view class="settings-row tall-row" bindtap="editTags">
|
||||||
<text
|
<text class="row-label">店铺标签</text>
|
||||||
wx:for="{{tagList}}"
|
<view wx:if="{{tagList.length}}" class="row-tags">
|
||||||
wx:key="id"
|
<text
|
||||||
class="tag-preview"
|
wx:for="{{tagList}}"
|
||||||
style="background: {{item.bgColor}}; color: {{item.textColor}}; border-color: {{item.borderColor}};"
|
wx:key="id"
|
||||||
>{{item.name}}</text>
|
class="tag-preview"
|
||||||
<text class="tag-add">+</text>
|
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>
|
||||||
<view wx:else class="empty-inline">还没有标签,点击添加门店特色</view>
|
<view class="settings-row" data-field="gallery" bindtap="openProfileSheet">
|
||||||
<view class="summary-action-row">
|
<text class="row-label">环境照片</text>
|
||||||
<text>用于预约时快速选择和展示</text>
|
<text class="row-value">{{imageCountText}}</text>
|
||||||
<text class="summary-arrow">›</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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view id="shop-schedule-card" class="section">
|
<view class="section">
|
||||||
<view class="section-head">
|
<view class="section-head">
|
||||||
<view>
|
<view class="section-title-wrap">
|
||||||
<text class="section-title">营业安排</text>
|
<text class="leaf-icon">◒</text>
|
||||||
<text class="section-subtitle">排班与特殊日期合并管理</text>
|
<text class="section-title">营业管理</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="section-link" data-tab="RULE" bindtap="openScheduleSheet">修改</text>
|
<text class="section-link" data-tab="RULE" bindtap="openScheduleSheet">设置</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="card schedule-summary-card" data-tab="RULE" bindtap="openScheduleSheet">
|
<view class="settings-card">
|
||||||
<view class="schedule-summary-row">
|
<view class="settings-row" data-tab="RULE" bindtap="openScheduleSheet">
|
||||||
<view class="summary-icon schedule-icon">◷</view>
|
<text class="row-label">营业时间</text>
|
||||||
<view class="summary-main">
|
<text class="row-value">{{scheduleSummary}}</text>
|
||||||
<text class="summary-value">{{scheduleSummary}}</text>
|
<text class="row-arrow">›</text>
|
||||||
<text class="summary-meta">{{scheduleRemarkText}}</text>
|
|
||||||
</view>
|
|
||||||
<text class="summary-arrow">›</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view id="shop-exception-card" class="schedule-summary-row special-summary-row" data-tab="EXCEPTION" bindtap="openScheduleSheet">
|
<view class="settings-row" data-tab="RULE" bindtap="openScheduleSheet">
|
||||||
<view class="summary-icon exception-icon">●</view>
|
<text class="row-label">预约规则</text>
|
||||||
<view class="summary-main">
|
<text class="row-value">{{scheduleRemarkText}}</text>
|
||||||
<text class="summary-value">{{exceptionCountText}}</text>
|
<text class="row-arrow">›</text>
|
||||||
<text class="summary-meta">{{exceptionSummary}}</text>
|
</view>
|
||||||
</view>
|
<view class="settings-row row-last" data-tab="EXCEPTION" bindtap="openScheduleSheet">
|
||||||
<text class="summary-arrow">›</text>
|
<text class="row-label">特殊日期</text>
|
||||||
|
<text class="row-value accent-value">{{exceptionSummary}}</text>
|
||||||
|
<text class="row-arrow">›</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</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 wx:if="{{scheduleSheetVisible}}" class="sheet-mask" catchtap="closeScheduleSheet">
|
||||||
<view id="schedule-sheet" class="schedule-sheet" catchtap="stopPropagation">
|
<view id="schedule-sheet" class="schedule-sheet" catchtap="stopPropagation">
|
||||||
<view class="sheet-handle"></view>
|
<view class="sheet-handle"></view>
|
||||||
|
|||||||
@@ -1,28 +1,11 @@
|
|||||||
.page {
|
.shop-settings-page {
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(247, 240, 232, 0.96)),
|
linear-gradient(180deg, rgba(250, 250, 244, 0.98), rgba(248, 244, 237, 0.98)),
|
||||||
linear-gradient(135deg, rgba(89, 121, 102, 0.14), rgba(181, 134, 86, 0.12));
|
linear-gradient(135deg, rgba(111, 143, 131, 0.12), rgba(228, 200, 150, 0.1));
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-heading {
|
.nav-spacer {
|
||||||
display: flex;
|
height: 6rpx;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-state {
|
.loading-state {
|
||||||
@@ -31,120 +14,211 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-card {
|
.shop-hero {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 340rpx;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border: 1rpx solid rgba(91, 132, 102, 0.16);
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
background:
|
background: #edf6ea;
|
||||||
linear-gradient(135deg, rgba(73, 101, 85, 0.95), rgba(179, 131, 90, 0.95)),
|
box-shadow: 0 18rpx 38rpx rgba(73, 101, 85, 0.12);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-preview,
|
.hero-bg {
|
||||||
.cover-preview image {
|
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%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-empty {
|
.hero-main {
|
||||||
display: flex;
|
flex: 1;
|
||||||
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 {
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
color: #fffdf8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-title,
|
.hero-title-row,
|
||||||
.cover-desc {
|
.hero-badges,
|
||||||
|
.hero-meta-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-title-row {
|
||||||
|
gap: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-title {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
min-width: 0;
|
||||||
|
|
||||||
.cover-title {
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 40rpx;
|
color: #27231f;
|
||||||
|
font-size: 32rpx;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-desc {
|
.edit-mark {
|
||||||
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;
|
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
align-items: center;
|
color: #9ba78f;
|
||||||
justify-content: center;
|
|
||||||
min-width: 164rpx;
|
|
||||||
min-height: 62rpx;
|
|
||||||
padding: 0 20rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
background: #fff8ed;
|
|
||||||
color: #6d4d35;
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 900;
|
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 {
|
.section {
|
||||||
margin-top: 26rpx;
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-head {
|
.section-head {
|
||||||
@@ -155,201 +229,154 @@
|
|||||||
margin: 0 4rpx 16rpx;
|
margin: 0 4rpx 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-head view {
|
.section-title-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
gap: 6rpx;
|
|
||||||
min-width: 0;
|
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 {
|
.section-title {
|
||||||
color: #3f382f;
|
color: #2d2924;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 800;
|
font-weight: 900;
|
||||||
}
|
line-height: 1.2;
|
||||||
|
|
||||||
.section-subtitle {
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-link {
|
.section-link {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
color: #c86a5c;
|
color: #4f9b6d;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-summary-card,
|
.settings-card {
|
||||||
.tag-summary-card,
|
|
||||||
.schedule-summary-card {
|
|
||||||
overflow: hidden;
|
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 {
|
.settings-row {
|
||||||
padding: 8rpx 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary-row {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
gap: 20rpx;
|
gap: 18rpx;
|
||||||
min-height: 92rpx;
|
min-height: 96rpx;
|
||||||
padding: 22rpx 0;
|
padding: 18rpx 24rpx;
|
||||||
border-bottom: 1rpx solid #eee8df;
|
border-bottom: 1rpx solid #eee8df;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-row-last {
|
.settings-row.row-last {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-label {
|
.tall-row {
|
||||||
flex: 0 0 140rpx;
|
align-items: flex-start;
|
||||||
color: #8d8175;
|
min-height: 108rpx;
|
||||||
font-size: 24rpx;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-value {
|
.row-label {
|
||||||
min-width: 0;
|
flex: 0 0 154rpx;
|
||||||
flex: 1;
|
color: #302c27;
|
||||||
color: #332c27;
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 900;
|
font-weight: 800;
|
||||||
line-height: 1.45;
|
line-height: 1.35;
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-description {
|
.row-value {
|
||||||
color: #6f655d;
|
display: block;
|
||||||
font-size: 24rpx;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #8f877e;
|
||||||
|
font-size: 25rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: right;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-summary-card {
|
.muted-value {
|
||||||
padding: 24rpx;
|
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;
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
justify-content: flex-end;
|
||||||
gap: 12rpx;
|
gap: 10rpx;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-preview {
|
.tag-preview {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-height: 52rpx;
|
max-width: 188rpx;
|
||||||
max-width: 100%;
|
min-height: 44rpx;
|
||||||
padding: 0 18rpx;
|
padding: 0 14rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1rpx solid;
|
border: 1rpx solid;
|
||||||
border-radius: 999rpx;
|
border-radius: 999rpx;
|
||||||
font-size: 24rpx;
|
font-size: 22rpx;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
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 {
|
.empty-inline {
|
||||||
padding: 12rpx 0;
|
padding: 12rpx 0;
|
||||||
color: #a0968e;
|
color: #a0968e;
|
||||||
font-size: 24rpx;
|
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 {
|
.sheet-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -426,7 +453,7 @@
|
|||||||
|
|
||||||
.sheet-tab.active {
|
.sheet-tab.active {
|
||||||
background: #fffdf8;
|
background: #fffdf8;
|
||||||
color: #c86a5c;
|
color: #2f7a51;
|
||||||
box-shadow: 0 6rpx 14rpx rgba(67, 52, 41, 0.07);
|
box-shadow: 0 6rpx 14rpx rgba(67, 52, 41, 0.07);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,6 +543,221 @@
|
|||||||
margin-top: 22rpx;
|
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 {
|
.exception-history {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
padding: 18rpx;
|
padding: 18rpx;
|
||||||
|
|||||||
+6
-491
File diff suppressed because one or more lines are too long
+6
-128
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user