修复店务小程序主图标签与弹层布局
This commit is contained in:
@@ -62,5 +62,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"style": "v2",
|
"style": "v2",
|
||||||
|
"lazyCodeLoading": "requiredComponents",
|
||||||
"sitemapLocation": "sitemap.json"
|
"sitemapLocation": "sitemap.json"
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 150 KiB |
@@ -146,9 +146,9 @@
|
|||||||
<text class="manual-field-label">标签</text>
|
<text class="manual-field-label">标签</text>
|
||||||
<text wx:if="{{tagsLoading}}" class="manual-tag-loading">加载中</text>
|
<text wx:if="{{tagsLoading}}" class="manual-tag-loading">加载中</text>
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{tagOptions.length}}" class="manual-tag-list">
|
<scroll-view wx:if="{{tagOptions.length}}" class="manual-tag-list" scroll-x="true" enable-flex>
|
||||||
<view wx:for="{{tagOptions}}" wx:key="id" class="manual-tag-chip {{item.selected ? 'active' : ''}}" data-name="{{item.name}}" bindtap="toggleManualTag">{{item.name}}</view>
|
<view wx:for="{{tagOptions}}" wx:key="id" class="manual-tag-chip {{item.selected ? 'active' : ''}}" data-name="{{item.name}}" bindtap="toggleManualTag">{{item.name}}</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
<view wx:else class="manual-tag-empty">暂无标签,可手动新增</view>
|
<view wx:else class="manual-tag-empty">暂无标签,可手动新增</view>
|
||||||
<view class="manual-tag-input-row">
|
<view class="manual-tag-input-row">
|
||||||
<input class="manual-tag-input" value="{{manualTagInput}}" bindinput="onManualTagInput" placeholder="输入新标签" />
|
<input class="manual-tag-input" value="{{manualTagInput}}" bindinput="onManualTagInput" placeholder="输入新标签" />
|
||||||
|
|||||||
@@ -947,7 +947,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.manual-sheet {
|
.manual-sheet {
|
||||||
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
max-height: 86vh;
|
max-height: 86vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 26rpx 24rpx calc(26rpx + env(safe-area-inset-bottom));
|
padding: 26rpx 24rpx calc(26rpx + env(safe-area-inset-bottom));
|
||||||
@@ -1128,13 +1130,26 @@
|
|||||||
|
|
||||||
.manual-tag-list {
|
.manual-tag-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
height: 62rpx;
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
gap: 10rpx;
|
gap: 10rpx;
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.manual-tag-list::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manual-tag-chip {
|
.manual-tag-chip {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 56rpx;
|
min-height: 56rpx;
|
||||||
@@ -1160,6 +1175,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.manual-tag-input-row {
|
.manual-tag-input-row {
|
||||||
|
box-sizing: border-box;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1fr) 140rpx;
|
grid-template-columns: minmax(0, 1fr) 140rpx;
|
||||||
gap: 12rpx;
|
gap: 12rpx;
|
||||||
@@ -1178,6 +1194,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.manual-tag-add {
|
.manual-tag-add {
|
||||||
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
@@ -1298,17 +1315,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.manual-action-row {
|
.manual-action-row {
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-wrap: wrap;
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-width: 0;
|
||||||
gap: 14rpx;
|
gap: 14rpx;
|
||||||
margin-top: 18rpx;
|
margin-top: 18rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manual-action-row .secondary-btn,
|
.manual-action-row .secondary-btn,
|
||||||
.manual-action-row .primary-btn {
|
.manual-action-row .primary-btn {
|
||||||
flex: 1 1 128px;
|
flex: none;
|
||||||
width: auto;
|
width: auto;
|
||||||
min-width: 128px;
|
min-width: 0;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -636,12 +636,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cover-actions {
|
.cover-actions {
|
||||||
position: absolute;
|
position: static;
|
||||||
right: 24rpx;
|
|
||||||
bottom: 22rpx;
|
|
||||||
left: 24rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12rpx;
|
gap: 12rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
padding: 0 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover-card .cover-actions {
|
||||||
|
position: absolute;
|
||||||
|
right: 24rpx;
|
||||||
|
bottom: -92rpx;
|
||||||
|
left: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact-cover-card {
|
||||||
|
margin-bottom: 106rpx;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-btn,
|
.cover-btn,
|
||||||
@@ -658,11 +669,14 @@
|
|||||||
|
|
||||||
.cover-btn {
|
.cover-btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
background: #fff8ed;
|
background: #fff8ed;
|
||||||
color: #6d4d35;
|
color: #6d4d35;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-remove {
|
.cover-remove {
|
||||||
|
flex: 0 0 150rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
min-width: 150rpx;
|
min-width: 150rpx;
|
||||||
background: rgba(255, 253, 248, 0.18);
|
background: rgba(255, 253, 248, 0.18);
|
||||||
color: #fffdf8;
|
color: #fffdf8;
|
||||||
|
|||||||
@@ -16,20 +16,23 @@ const TAG_STYLES = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
function normalizeTagOption(tag) {
|
function normalizeTagOption(tag) {
|
||||||
const name = String((tag && (tag.displayName || tag.tagName || tag.name)) || '').trim()
|
const tagName = String((tag && (tag.tagName || tag.name)) || '').trim()
|
||||||
|
const displayName = String((tag && tag.displayName) || tagName).trim()
|
||||||
|
const name = displayName || tagName
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
id: (tag && tag.id) || name,
|
id: (tag && tag.id) || name,
|
||||||
name,
|
name,
|
||||||
tagName: (tag && tag.tagName) || name,
|
tagName: tagName || name,
|
||||||
displayName: (tag && tag.displayName) || name,
|
displayName: displayName || name,
|
||||||
|
sceneGroup: String((tag && tag.sceneGroup) || '').trim(),
|
||||||
textColor: (tag && tag.textColor) || DEFAULT_TAG_STYLE.textColor,
|
textColor: (tag && tag.textColor) || DEFAULT_TAG_STYLE.textColor,
|
||||||
bgColor: (tag && tag.bgColor) || DEFAULT_TAG_STYLE.bgColor,
|
bgColor: (tag && tag.bgColor) || DEFAULT_TAG_STYLE.bgColor,
|
||||||
borderColor: (tag && tag.borderColor) || DEFAULT_TAG_STYLE.borderColor,
|
borderColor: (tag && tag.borderColor) || DEFAULT_TAG_STYLE.borderColor,
|
||||||
sortOrder: (tag && tag.sortOrder) || DEFAULT_TAG_STYLE.sortOrder,
|
sortOrder: Number.isFinite(Number(tag && tag.sortOrder)) ? Number(tag.sortOrder) : DEFAULT_TAG_STYLE.sortOrder,
|
||||||
frontVisible: (tag && tag.frontVisible) === 0 ? 0 : DEFAULT_TAG_STYLE.frontVisible
|
frontVisible: Number(tag && tag.frontVisible) === 0 ? 0 : DEFAULT_TAG_STYLE.frontVisible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,11 +65,13 @@ function buildTagPayload(form) {
|
|||||||
const style = TAG_STYLES.find(item => item.key === form.styleKey) || TAG_STYLES[0]
|
const style = TAG_STYLES.find(item => item.key === form.styleKey) || TAG_STYLES[0]
|
||||||
const payload = {
|
const payload = {
|
||||||
tagName: String(form.name || '').trim(),
|
tagName: String(form.name || '').trim(),
|
||||||
textColor: style.textColor,
|
displayName: String(form.displayName || form.name || '').trim(),
|
||||||
bgColor: style.bgColor,
|
sceneGroup: String(form.sceneGroup || '').trim(),
|
||||||
borderColor: style.borderColor,
|
textColor: String(form.textColor || style.textColor).trim(),
|
||||||
sortOrder: form.sortOrder || DEFAULT_TAG_STYLE.sortOrder,
|
bgColor: String(form.bgColor || style.bgColor).trim(),
|
||||||
frontVisible: form.frontVisible === 0 ? 0 : DEFAULT_TAG_STYLE.frontVisible
|
borderColor: String(form.borderColor || style.borderColor).trim(),
|
||||||
|
sortOrder: Number.isFinite(Number(form.sortOrder)) ? Number(form.sortOrder) : DEFAULT_TAG_STYLE.sortOrder,
|
||||||
|
frontVisible: form.frontVisible ? 1 : 0
|
||||||
}
|
}
|
||||||
const shopId = resolveCurrentShopId()
|
const shopId = resolveCurrentShopId()
|
||||||
if (shopId) {
|
if (shopId) {
|
||||||
@@ -79,18 +84,27 @@ function buildEmptyForm() {
|
|||||||
return {
|
return {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
|
displayName: '',
|
||||||
|
sceneGroup: '',
|
||||||
|
textColor: TAG_STYLES[0].textColor,
|
||||||
|
bgColor: TAG_STYLES[0].bgColor,
|
||||||
|
borderColor: TAG_STYLES[0].borderColor,
|
||||||
styleKey: TAG_STYLES[0].key,
|
styleKey: TAG_STYLES[0].key,
|
||||||
sortOrder: DEFAULT_TAG_STYLE.sortOrder,
|
sortOrder: DEFAULT_TAG_STYLE.sortOrder,
|
||||||
frontVisible: DEFAULT_TAG_STYLE.frontVisible
|
frontVisible: DEFAULT_TAG_STYLE.frontVisible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildTagStyles(styleKey) {
|
||||||
|
return TAG_STYLES.map(item => ({ ...item, active: item.key === styleKey }))
|
||||||
|
}
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
loading: false,
|
loading: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
tagList: [],
|
tagList: [],
|
||||||
tagStyles: TAG_STYLES.map(item => ({ ...item, active: item.key === TAG_STYLES[0].key })),
|
tagStyles: buildTagStyles(TAG_STYLES[0].key),
|
||||||
tagForm: buildEmptyForm()
|
tagForm: buildEmptyForm()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -116,18 +130,30 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onTagInput(event) {
|
onTagFieldInput(event) {
|
||||||
this.setData({ 'tagForm.name': event.detail.value })
|
const field = event.currentTarget.dataset.field
|
||||||
|
this.setData({ [`tagForm.${field}`]: event.detail.value })
|
||||||
},
|
},
|
||||||
|
|
||||||
selectStyle(event) {
|
selectStyle(event) {
|
||||||
const styleKey = event.currentTarget.dataset.key
|
const styleKey = event.currentTarget.dataset.key
|
||||||
|
const style = TAG_STYLES.find(item => item.key === styleKey)
|
||||||
|
if (!style) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
'tagForm.styleKey': styleKey,
|
'tagForm.styleKey': styleKey,
|
||||||
tagStyles: TAG_STYLES.map(item => ({ ...item, active: item.key === styleKey }))
|
'tagForm.textColor': style.textColor,
|
||||||
|
'tagForm.bgColor': style.bgColor,
|
||||||
|
'tagForm.borderColor': style.borderColor,
|
||||||
|
tagStyles: buildTagStyles(styleKey)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onFrontVisibleChange(event) {
|
||||||
|
this.setData({ 'tagForm.frontVisible': event.detail.value ? 1 : 0 })
|
||||||
|
},
|
||||||
|
|
||||||
editTag(event) {
|
editTag(event) {
|
||||||
const tagId = String(event.currentTarget.dataset.id || '')
|
const tagId = String(event.currentTarget.dataset.id || '')
|
||||||
const tag = this.data.tagList.find(item => String(item.id) === tagId)
|
const tag = this.data.tagList.find(item => String(item.id) === tagId)
|
||||||
@@ -140,35 +166,44 @@ Page({
|
|||||||
tagForm: {
|
tagForm: {
|
||||||
id: tag.id,
|
id: tag.id,
|
||||||
name: tag.tagName || tag.name,
|
name: tag.tagName || tag.name,
|
||||||
|
displayName: tag.displayName || tag.name,
|
||||||
|
sceneGroup: tag.sceneGroup || '',
|
||||||
|
textColor: tag.textColor,
|
||||||
|
bgColor: tag.bgColor,
|
||||||
|
borderColor: tag.borderColor,
|
||||||
styleKey,
|
styleKey,
|
||||||
sortOrder: tag.sortOrder,
|
sortOrder: tag.sortOrder,
|
||||||
frontVisible: tag.frontVisible
|
frontVisible: tag.frontVisible
|
||||||
},
|
},
|
||||||
tagStyles: TAG_STYLES.map(item => ({ ...item, active: item.key === styleKey }))
|
tagStyles: buildTagStyles(styleKey)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
clearTagForm() {
|
clearTagForm() {
|
||||||
const tagForm = buildEmptyForm()
|
const tagForm = buildEmptyForm()
|
||||||
this.setData({
|
this.setData({ tagForm, tagStyles: buildTagStyles(tagForm.styleKey) })
|
||||||
tagForm,
|
|
||||||
tagStyles: TAG_STYLES.map(item => ({ ...item, active: item.key === tagForm.styleKey }))
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async saveTag() {
|
async saveTag() {
|
||||||
if (this.data.saving) {
|
if (this.data.saving) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const tagName = String(this.data.tagForm.name || '').trim()
|
const form = this.data.tagForm
|
||||||
|
const tagName = String(form.name || '').trim()
|
||||||
if (!tagName) {
|
if (!tagName) {
|
||||||
wx.showToast({ title: '请输入标签名称', icon: 'none' })
|
wx.showToast({ title: '请输入标签名称', icon: 'none' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const tagId = this.data.tagForm.id
|
const invalidColor = ['textColor', 'bgColor', 'borderColor']
|
||||||
|
.find(field => !/^#[0-9a-fA-F]{6}$/.test(String(form[field] || '').trim()))
|
||||||
|
if (invalidColor) {
|
||||||
|
wx.showToast({ title: '颜色需使用 6 位 HEX 格式', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const tagId = form.id
|
||||||
this.setData({ saving: true })
|
this.setData({ saving: true })
|
||||||
try {
|
try {
|
||||||
const payload = buildTagPayload({ ...this.data.tagForm, name: tagName })
|
const payload = buildTagPayload({ ...form, name: tagName })
|
||||||
if (tagId) {
|
if (tagId) {
|
||||||
await tagsApi.update(tagId, payload)
|
await tagsApi.update(tagId, payload)
|
||||||
wx.showToast({ title: '标签已更新', icon: 'success' })
|
wx.showToast({ title: '标签已更新', icon: 'success' })
|
||||||
|
|||||||
@@ -3,14 +3,31 @@
|
|||||||
<block wx:else>
|
<block wx:else>
|
||||||
<view class="page-heading">
|
<view class="page-heading">
|
||||||
<text class="page-title">店铺标签</text>
|
<text class="page-title">店铺标签</text>
|
||||||
<text class="page-subtitle">把门店特色整理成可以快速选择的标签。</text>
|
<text class="page-subtitle">统一管理店铺前台可见标签和展示样式</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card tag-form-card">
|
<view class="card tag-form-card">
|
||||||
<view class="form-kicker">{{tagForm.id ? '编辑标签' : '新增标签'}}</view>
|
<view class="form-kicker">{{tagForm.id ? '编辑标签' : '新增标签'}}</view>
|
||||||
<input class="tag-input" value="{{tagForm.name}}" bindinput="onTagInput" placeholder="输入标签名称,例如:日系清透" />
|
<view class="tag-field">
|
||||||
|
<text class="tag-field-label">标签名称</text>
|
||||||
|
<input class="tag-input" value="{{tagForm.name}}" data-field="name" bindinput="onTagFieldInput" placeholder="输入标签名称" />
|
||||||
|
</view>
|
||||||
|
<view class="tag-field">
|
||||||
|
<text class="tag-field-label">展示名</text>
|
||||||
|
<input class="tag-input" value="{{tagForm.displayName}}" data-field="displayName" bindinput="onTagFieldInput" placeholder="前台展示名称,可与标签名称不同" />
|
||||||
|
</view>
|
||||||
|
<view class="tag-form-grid">
|
||||||
|
<view class="tag-field">
|
||||||
|
<text class="tag-field-label">场景分组</text>
|
||||||
|
<input class="tag-input" value="{{tagForm.sceneGroup}}" data-field="sceneGroup" bindinput="onTagFieldInput" placeholder="例如:风格" />
|
||||||
|
</view>
|
||||||
|
<view class="tag-field">
|
||||||
|
<text class="tag-field-label">排序</text>
|
||||||
|
<input class="tag-input" value="{{tagForm.sortOrder}}" data-field="sortOrder" bindinput="onTagFieldInput" type="number" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="style-row">
|
<view class="style-row">
|
||||||
<text class="style-label">标签颜色</text>
|
<text class="style-label">快捷配色</text>
|
||||||
<view
|
<view
|
||||||
wx:for="{{tagStyles}}"
|
wx:for="{{tagStyles}}"
|
||||||
wx:key="key"
|
wx:key="key"
|
||||||
@@ -22,6 +39,28 @@
|
|||||||
<text style="color: {{item.textColor}};">●</text>
|
<text style="color: {{item.textColor}};">●</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="tag-color-grid">
|
||||||
|
<view class="tag-field">
|
||||||
|
<text class="tag-field-label">文字色 HEX</text>
|
||||||
|
<input class="tag-input" value="{{tagForm.textColor}}" data-field="textColor" bindinput="onTagFieldInput" placeholder="#A84F47" />
|
||||||
|
</view>
|
||||||
|
<view class="tag-field">
|
||||||
|
<text class="tag-field-label">背景色 HEX</text>
|
||||||
|
<input class="tag-input" value="{{tagForm.bgColor}}" data-field="bgColor" bindinput="onTagFieldInput" placeholder="#FFF0ED" />
|
||||||
|
</view>
|
||||||
|
<view class="tag-field">
|
||||||
|
<text class="tag-field-label">边框色 HEX</text>
|
||||||
|
<input class="tag-input" value="{{tagForm.borderColor}}" data-field="borderColor" bindinput="onTagFieldInput" placeholder="#F0CFC8" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tag-live-preview">
|
||||||
|
<text class="tag-field-label">效果预览</text>
|
||||||
|
<text class="tag-preview" style="background: {{tagForm.bgColor}}; color: {{tagForm.textColor}}; border-color: {{tagForm.borderColor}};">{{tagForm.displayName || tagForm.name || '标签预览'}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="tag-visible-row">
|
||||||
|
<text class="tag-field-label">前台可见</text>
|
||||||
|
<switch checked="{{tagForm.frontVisible}}" color="#6f8f83" bindchange="onFrontVisibleChange" />
|
||||||
|
</view>
|
||||||
<view class="tag-form-actions">
|
<view class="tag-form-actions">
|
||||||
<button wx:if="{{tagForm.id}}" class="secondary-btn cancel-edit-btn" bindtap="clearTagForm">取消编辑</button>
|
<button wx:if="{{tagForm.id}}" class="secondary-btn cancel-edit-btn" bindtap="clearTagForm">取消编辑</button>
|
||||||
<button class="primary-btn tag-save-btn" loading="{{saving}}" disabled="{{saving}}" bindtap="saveTag">{{tagForm.id ? '保存修改' : '添加标签'}}</button>
|
<button class="primary-btn tag-save-btn" loading="{{saving}}" disabled="{{saving}}" bindtap="saveTag">{{tagForm.id ? '保存修改' : '添加标签'}}</button>
|
||||||
@@ -36,14 +75,17 @@
|
|||||||
<view class="card tag-list-card">
|
<view class="card tag-list-card">
|
||||||
<view wx:if="{{tagList.length}}" class="tag-list">
|
<view wx:if="{{tagList.length}}" class="tag-list">
|
||||||
<view wx:for="{{tagList}}" wx:key="id" class="tag-item">
|
<view wx:for="{{tagList}}" wx:key="id" class="tag-item">
|
||||||
<text class="tag-preview" style="background: {{item.bgColor}}; color: {{item.textColor}}; border-color: {{item.borderColor}};">{{item.name}}</text>
|
<view class="tag-item-main">
|
||||||
|
<text class="tag-preview" style="background: {{item.bgColor}}; color: {{item.textColor}}; border-color: {{item.borderColor}};">{{item.name}}</text>
|
||||||
|
<text wx:if="{{item.sceneGroup}}" class="tag-group">{{item.sceneGroup}}</text>
|
||||||
|
</view>
|
||||||
<view class="tag-actions">
|
<view class="tag-actions">
|
||||||
<text data-id="{{item.id}}" bindtap="editTag">编辑</text>
|
<text data-id="{{item.id}}" bindtap="editTag">编辑</text>
|
||||||
<text class="danger" data-id="{{item.id}}" bindtap="deleteTag">删除</text>
|
<text class="danger" data-id="{{item.id}}" bindtap="deleteTag">删除</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view wx:else class="empty-state">暂无标签,先添加一个门店特色吧。</view>
|
<view wx:else class="empty-state">暂无标签,请先添加一个店铺标签。</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
.tag-form-card,
|
.tag-form-card,
|
||||||
.tag-list-card {
|
.tag-list-card {
|
||||||
|
box-sizing: border-box;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,10 +42,23 @@
|
|||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-field {
|
||||||
|
min-width: 0;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-field-label {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
color: #6f665c;
|
||||||
|
font-size: 23rpx;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
.tag-input {
|
.tag-input {
|
||||||
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 78rpx;
|
height: 78rpx;
|
||||||
margin-top: 16rpx;
|
|
||||||
padding: 0 22rpx;
|
padding: 0 22rpx;
|
||||||
border: 1rpx solid #eadfd2;
|
border: 1rpx solid #eadfd2;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
@@ -54,6 +68,22 @@
|
|||||||
line-height: 78rpx;
|
line-height: 78rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-form-grid,
|
||||||
|
.tag-color-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-color-grid {
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-form-grid .tag-field,
|
||||||
|
.tag-color-grid .tag-field {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.style-row {
|
.style-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -83,6 +113,26 @@
|
|||||||
box-shadow: 0 0 0 4rpx rgba(200, 106, 92, 0.18);
|
box-shadow: 0 0 0 4rpx rgba(200, 106, 92, 0.18);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-live-preview {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 18rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding-top: 18rpx;
|
||||||
|
border-top: 1rpx solid #eee8df;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-live-preview .tag-field-label {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-visible-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 18rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.tag-form-actions {
|
.tag-form-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12rpx;
|
gap: 12rpx;
|
||||||
@@ -132,6 +182,18 @@
|
|||||||
border-bottom: 1rpx solid #eee8df;
|
border-bottom: 1rpx solid #eee8df;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-item-main {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-width: 0;
|
||||||
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-group {
|
||||||
|
color: #a0968e;
|
||||||
|
font-size: 21rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.tag-item:last-child {
|
.tag-item:last-child {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"postcss": true,
|
"postcss": true,
|
||||||
"minified": true,
|
"minified": true,
|
||||||
"packNpmRelationList": [],
|
"packNpmRelationList": [],
|
||||||
"compileHotReLoad": true,
|
"compileHotReLoad": false,
|
||||||
"skylineRenderEnable": false,
|
"skylineRenderEnable": false,
|
||||||
"compileWorklet": false,
|
"compileWorklet": false,
|
||||||
"uglifyFileName": false,
|
"uglifyFileName": false,
|
||||||
|
|||||||
@@ -915,3 +915,8 @@ messagehub:
|
|||||||
- 变更前 Nginx 仍连接旧解析地址 `14.111.89.205:9000`,该地址已超时;当前解析地址 `14.107.44.229:9000` 可达。
|
- 变更前 Nginx 仍连接旧解析地址 `14.111.89.205:9000`,该地址已超时;当前解析地址 `14.107.44.229:9000` 可达。
|
||||||
- 变更后必须执行 `nginx -t`,通过后再 `systemctl reload nginx`;验证三台 Core 访问 `https://minio.yunail.art/minio/health/live` 返回 `200`,并验证 Nginx 本机 HTTP/HTTPS 虚拟主机返回 `200`。
|
- 变更后必须执行 `nginx -t`,通过后再 `systemctl reload nginx`;验证三台 Core 访问 `https://minio.yunail.art/minio/health/live` 返回 `200`,并验证 Nginx 本机 HTTP/HTTPS 虚拟主机返回 `200`。
|
||||||
- MinIO `9000` 为对象存储 API,`9001` 为管理控制台;业务上传和签名 URL 必须使用 9000 对应的 API 链路。
|
- MinIO `9000` 为对象存储 API,`9001` 为管理控制台;业务上传和签名 URL 必须使用 9000 对应的 API 链路。
|
||||||
|
### 2026-07-24 店务小程序标签与本地编译配置
|
||||||
|
|
||||||
|
- 店务小程序标签页已同步使用 `tagName`、`displayName`、`sceneGroup`、`textColor`、`bgColor`、`borderColor`、`sortOrder` 和 `frontVisible` 字段,颜色输入使用 6 位 HEX 校验。
|
||||||
|
- `JY-Salon-WeChat/app.json` 启用 `lazyCodeLoading: "requiredComponents"`;`project.config.json` 关闭 `compileHotReLoad`,本地修改后需手动编译或重新预览。
|
||||||
|
- `JY-Salon-WeChat/assets/images/app-icon.png` 已压缩到约 150KB,继续复用登录页和关于页引用路径。
|
||||||
|
|||||||
@@ -523,3 +523,9 @@
|
|||||||
- 数据库说明:本次不新增 SQL,不修改初始化 SQL,不需要执行数据库迁移。
|
- 数据库说明:本次不新增 SQL,不修改初始化 SQL,不需要执行数据库迁移。
|
||||||
- 影响范围:仅影响 `JY-Core` 的 `/admin/dashboard/stats` 热销作品统计分支;不改变订单、预约、作品、店铺和小程序页面字段契约。
|
- 影响范围:仅影响 `JY-Core` 的 `/admin/dashboard/stats` 热销作品统计分支;不改变订单、预约、作品、店铺和小程序页面字段契约。
|
||||||
- 验证方式:GitNexus `getHotProducts` upstream impact 为 LOW,直接调用方为 `buildDashboardStats`,上游接口为 `getDashboardStats`;`rtk mvn -f JY-Core/pom.xml -DskipTests compile` 通过。
|
- 验证方式:GitNexus `getHotProducts` upstream impact 为 LOW,直接调用方为 `buildDashboardStats`,上游接口为 `getDashboardStats`;`rtk mvn -f JY-Core/pom.xml -DskipTests compile` 通过。
|
||||||
|
## 2026-07-24 店务小程序主图、标签和预约弹层修复
|
||||||
|
|
||||||
|
- 店铺主图操作按钮移到预览区域下方,避免遮挡图片。
|
||||||
|
- 店铺标签管理补齐展示名、场景分组、排序、前台可见和三种自定义 HEX 颜色,并保留快捷色卡。
|
||||||
|
- 预约手工作品标签改为横向滑动并隐藏滚动条,输入区和底部操作区补齐宽度约束。
|
||||||
|
- 小程序启用组件按需注入,关闭本地自动热重载,并压缩主包图标资源。
|
||||||
|
|||||||
Reference in New Issue
Block a user