杂务:更新 YumiNail 工作区

This commit is contained in:
xiaowang
2026-05-29 13:30:56 +08:00
parent 1d077d4089
commit 31cd06b5c9
16498 changed files with 10330586 additions and 2340 deletions
+62 -49
View File
@@ -40,7 +40,7 @@
:data-source="shopList"
:loading="loading"
:pagination="pagination"
:scroll="{ x: 1380 }"
:scroll="{ x: 'max-content' }"
@change="handleTableChange"
row-key="id"
>
@@ -283,7 +283,7 @@
</div>
</a-upload>
<div v-if="isUploadPending" class="upload-pending-tip">图片正在上传中,上传完成前不可提交。</div>
<a-modal v-model:open="bannerPreviewVisible" :footer="null" @cancel="bannerPreviewVisible = false">
<a-modal v-model:open="bannerPreviewVisible" :footer="null" :mask-closable="false" @cancel="bannerPreviewVisible = false">
<img alt="预览" style="width: 100%" :src="bannerPreviewImage" />
</a-modal>
</a-form-item>
@@ -304,7 +304,7 @@
</div>
</a-upload>
<div v-if="isUploadPending" class="upload-pending-tip">图片正在上传中,上传完成前不可提交。</div>
<a-modal v-model:open="previewVisible" :footer="null" @cancel="previewVisible = false">
<a-modal v-model:open="previewVisible" :footer="null" :mask-closable="false" @cancel="previewVisible = false">
<img alt="预览" style="width: 100%" :src="previewImage" />
</a-modal>
</a-form-item>
@@ -366,25 +366,25 @@
<a-form-item label="主色" name="themePrimaryColor">
<div class="theme-color-field">
<input v-model="formState.themePrimaryColor" class="theme-color-picker" type="color" />
<a-input v-model:value="formState.themePrimaryColor" placeholder="#C6597D" />
<a-input v-model:value="formState.themePrimaryColor" placeholder="#E8B4B8" />
</div>
</a-form-item>
<a-form-item label="辅色" name="themeSecondaryColor">
<div class="theme-color-field">
<input v-model="formState.themeSecondaryColor" class="theme-color-picker" type="color" />
<a-input v-model:value="formState.themeSecondaryColor" placeholder="#E9B7C7" />
<a-input v-model:value="formState.themeSecondaryColor" placeholder="#C5A059" />
</div>
</a-form-item>
<a-form-item label="强调色" name="themeAccentColor">
<a-form-item label="中性/强调色" name="themeAccentColor">
<div class="theme-color-field">
<input v-model="formState.themeAccentColor" class="theme-color-picker" type="color" />
<a-input v-model:value="formState.themeAccentColor" placeholder="#9F4967" />
<a-input v-model:value="formState.themeAccentColor" placeholder="#4A443F" />
</div>
</a-form-item>
<a-form-item label="页面背景" name="themePageBgColor">
<div class="theme-color-field">
<input v-model="formState.themePageBgColor" class="theme-color-picker" type="color" />
<a-input v-model:value="formState.themePageBgColor" placeholder="#FFF7F9" />
<a-input v-model:value="formState.themePageBgColor" placeholder="#FDFBF9" />
</div>
</a-form-item>
<a-form-item label="卡片背景" name="themeCardBgColor">
@@ -424,6 +424,7 @@
title="保存配色模板"
ok-text="保存"
cancel-text="取消"
:mask-closable="false"
@ok="handleConfirmSaveThemeTemplate"
@cancel="handleCancelSaveThemeTemplate"
>
@@ -544,6 +545,7 @@
:title="mapPickerTitle"
:width="920"
:footer="null"
:mask-closable="false"
destroy-on-close
class="tencent-map-picker-modal"
@cancel="closeMapLocationPicker"
@@ -600,7 +602,7 @@ import { createChunkUploadTask, type ChunkUploadTask } from '@/utils/chunk-uploa
import { buildDraftStorageKey, clearDraftRecord, loadDraftRecord, saveDraftRecord } from '@/utils/form-draft'
import { usePermission } from '@/utils/permission'
import { runWithGlobalLoading } from '@/utils/action-loading'
import { resolveShopTheme } from '@/utils/shop-theme'
import { notifyShopThemeChanged, resolveShopTheme } from '@/utils/shop-theme'
import { useAdminViewport } from '@/composables/useAdminViewport'
import AdminMobileCardList from '@/components/admin/AdminMobileCardList.vue'
import AdminMobileFab from '@/components/admin/AdminMobileFab.vue'
@@ -644,6 +646,16 @@ const CUSTOM_THEME_TEMPLATE_STORAGE_KEY = 'yuminail:admin:shop-theme-templates'
const CUSTOM_THEME_TEMPLATE_LIMIT = 20
const PRESET_THEME_TEMPLATES: ShopThemeTemplate[] = [
{
id: 'preset-luminous-elegance',
name: 'Luminous Elegance',
source: 'preset',
themePrimaryColor: '#E8B4B8',
themeSecondaryColor: '#C5A059',
themeAccentColor: '#4A443F',
themePageBgColor: '#FDFBF9',
themeCardBgColor: '#FFFFFF'
},
{
id: 'preset-soft-nude',
name: '柔雾裸粉',
@@ -2347,6 +2359,7 @@ const handleModalOk = async () => {
...formState,
authorizationExpireTime: computedAuthorizationExpireTime.value
})
notifyShopThemeChanged()
message.success('更新成功')
} else {
await adminShopApi.createShop({
@@ -2420,9 +2433,9 @@ onMounted(async () => {
justify-content: space-between;
gap: 12px;
padding: 10px 12px;
border: 1px solid #d9d9d9;
border: 1px solid var(--theme-border);
border-radius: 8px;
background: #fafafa;
background: var(--theme-card-bg);
}
.map-picker-main {
@@ -2431,7 +2444,7 @@ onMounted(async () => {
}
.map-picker-title {
color: #1f2937;
color: var(--text-primary);
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
@@ -2440,7 +2453,7 @@ onMounted(async () => {
.map-picker-subtitle {
margin-top: 4px;
color: #8c8c8c;
color: var(--text-secondary);
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
@@ -2449,7 +2462,7 @@ onMounted(async () => {
.map-picker-tip {
margin-top: 8px;
color: #8c8c8c;
color: var(--text-secondary);
font-size: 12px;
line-height: 1.6;
}
@@ -2468,7 +2481,7 @@ onMounted(async () => {
.tencent-map-picker__toolbar p {
margin: 4px 0 0;
color: #8c8c8c;
color: var(--text-secondary);
font-size: 13px;
}
@@ -2477,7 +2490,7 @@ onMounted(async () => {
height: 520px;
border: 0;
border-radius: 8px;
background: #f5f5f5;
background: var(--theme-primary-soft);
}
.shop-banner {
@@ -2488,12 +2501,12 @@ onMounted(async () => {
}
.no-banner {
color: #999;
color: var(--text-secondary);
font-size: 12px;
}
.upload-tip {
color: #999;
color: var(--text-secondary);
font-size: 12px;
margin-bottom: 8px;
}
@@ -2512,16 +2525,16 @@ onMounted(async () => {
}
.business-hours-separator {
color: #666;
color: var(--text-secondary);
flex: 0 0 auto;
}
.theme-section {
margin: 8px 0 18px;
padding: 16px 18px;
border: 1px solid #f0dce4;
border: 1px solid var(--theme-border);
border-radius: 8px;
background: #fffafb;
background: var(--theme-primary-soft);
}
.theme-section__header {
@@ -2533,13 +2546,13 @@ onMounted(async () => {
}
.theme-section__title {
color: #2d2430;
color: var(--text-primary);
font-weight: 700;
}
.theme-section__desc {
margin-top: 4px;
color: #7a6871;
color: var(--text-secondary);
font-size: 12px;
line-height: 1.6;
}
@@ -2551,9 +2564,9 @@ onMounted(async () => {
.theme-template-panel {
margin-bottom: 16px;
padding: 12px;
border: 1px solid #f0dce4;
border: 1px solid var(--theme-border);
border-radius: 8px;
background: #ffffff;
background: var(--theme-card-bg);
}
.theme-template-panel__header {
@@ -2565,12 +2578,12 @@ onMounted(async () => {
}
.theme-template-panel__header span {
color: #2d2430;
color: var(--text-primary);
font-weight: 700;
}
.theme-template-panel__header small {
color: #8a737d;
color: var(--text-secondary);
line-height: 1.5;
}
@@ -2584,25 +2597,25 @@ onMounted(async () => {
position: relative;
min-height: 92px;
padding: 12px;
border: 1px solid #efdee5;
border: 1px solid var(--theme-border);
border-radius: 8px;
background: #fffdfd;
background: var(--theme-card-bg);
cursor: pointer;
transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.theme-template-card:hover,
.theme-template-card:focus {
border-color: #c6597d;
box-shadow: 0 10px 24px rgba(198, 89, 125, .12);
border-color: var(--theme-primary);
box-shadow: var(--theme-button-shadow);
outline: none;
transform: translateY(-1px);
}
.theme-template-card--active {
border-color: #c6597d;
background: #fff7f9;
box-shadow: 0 0 0 2px rgba(198, 89, 125, .14);
border-color: var(--theme-primary);
background: var(--theme-primary-soft);
box-shadow: var(--theme-focus-shadow);
}
.theme-template-card--custom {
@@ -2615,7 +2628,7 @@ onMounted(async () => {
}
.theme-template-card__top strong {
color: #2d2430;
color: var(--text-primary);
font-size: 13px;
overflow: hidden;
text-overflow: ellipsis;
@@ -2623,7 +2636,7 @@ onMounted(async () => {
}
.theme-template-card__top span {
color: #9a7b87;
color: var(--text-secondary);
font-size: 12px;
}
@@ -2638,9 +2651,9 @@ onMounted(async () => {
.theme-template-save-preview span {
width: 18px;
height: 18px;
border: 2px solid #ffffff;
border: 2px solid var(--theme-card-bg);
border-radius: 999px;
box-shadow: 0 0 0 1px #ead6de;
box-shadow: 0 0 0 1px var(--theme-border);
}
.theme-template-card__delete {
@@ -2649,18 +2662,18 @@ onMounted(async () => {
right: 9px;
height: 24px;
padding: 0 8px;
border: 1px solid #efdee5;
border: 1px solid var(--theme-border);
border-radius: 8px;
color: #9f4967;
color: var(--theme-accent);
font-size: 12px;
background: #fff8fa;
background: var(--theme-primary-soft);
cursor: pointer;
}
.theme-template-card__delete:hover,
.theme-template-card__delete:focus {
border-color: #c6597d;
color: #c6597d;
border-color: var(--theme-primary);
color: var(--theme-primary);
outline: none;
}
@@ -2670,7 +2683,7 @@ onMounted(async () => {
}
.theme-template-save-form label {
color: #2d2430;
color: var(--text-primary);
font-weight: 600;
}
@@ -2679,9 +2692,9 @@ onMounted(async () => {
gap: 8px;
margin-top: 16px;
padding: 12px;
border: 1px solid #f0dce4;
border: 1px solid var(--theme-border);
border-radius: 8px;
background: #fffafb;
background: var(--theme-primary-soft);
}
.theme-grid {
@@ -2700,9 +2713,9 @@ onMounted(async () => {
width: 42px;
height: 34px;
padding: 0;
border: 1px solid #efd8e0;
border: 1px solid var(--theme-border);
border-radius: 8px;
background: #fff;
background: var(--theme-card-bg);
}
.theme-preview {
@@ -2748,7 +2761,7 @@ onMounted(async () => {
.theme-view-swatches span {
width: 28px;
height: 28px;
border: 1px solid #efdee5;
border: 1px solid var(--theme-border);
border-radius: 999px;
}