feat: 品牌/收款码图可清除,未配置显示 LOGO 文字
All checks were successful
Build and Deploy Front / deploy (push) Successful in 4m18s

去掉本地默认品牌图回退;配置弹窗原生拖拽预览并支持清除;登录/顶栏/官网/侧栏统一走配置图。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zzh 2026-11-19 19:30:02 +08:00
parent 9dedb6818e
commit a7993c12b6
30 changed files with 966 additions and 290 deletions

View File

@ -108,8 +108,6 @@
}
})();
</script>
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="preload" href="/app-mascot.png" as="image" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"
@ -196,8 +194,11 @@
flex-shrink: 0;
}
#app-boot .boot-logo-wrap {
width: 96px;
height: 96px;
min-width: 96px;
min-height: 72px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0;
background: transparent;
box-shadow: none;
@ -212,6 +213,22 @@
object-fit: contain;
animation: app-boot-bounce 1.4s ease-in-out infinite;
}
#app-boot .boot-logo[hidden] {
display: none !important;
}
#app-boot .boot-text-logo {
display: block;
font-size: 36px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
color: #86909c;
animation: app-boot-bounce 1.4s ease-in-out infinite;
user-select: none;
}
#app-boot .boot-text-logo[hidden] {
display: none !important;
}
#app-boot .boot-status {
margin-top: 12px;
width: 100%;
@ -252,7 +269,8 @@
border-color: var(--app-primary-color, #054f74);
color: var(--app-primary-color, #054f74);
}
#app-boot.is-timeout .boot-logo {
#app-boot.is-timeout .boot-logo,
#app-boot.is-timeout .boot-text-logo {
animation: none;
}
#app-boot.is-timeout .boot-retry {
@ -321,7 +339,8 @@
}
}
@media (prefers-reduced-motion: reduce) {
#app-boot .boot-logo {
#app-boot .boot-logo,
#app-boot .boot-text-logo {
animation: none;
}
}
@ -334,13 +353,14 @@
<div class="boot-logo-wrap">
<img
class="boot-logo"
src="/app-mascot.png"
width="96"
height="96"
alt=""
decoding="sync"
fetchpriority="high"
hidden
/>
<span class="boot-text-logo" aria-hidden="true">LOGO</span>
</div>
</div>
<div class="boot-status">
@ -412,14 +432,35 @@
try {
var cachedMascot = (localStorage.getItem('oms_brand_mascot_url') || '').trim();
var logoImg = boot.querySelector('.boot-logo');
if (
var logoText = boot.querySelector('.boot-text-logo');
var isLegacyDefault =
!cachedMascot ||
cachedMascot === '/app-mascot.png' ||
cachedMascot.indexOf('/app-mascot.png?') === 0 ||
cachedMascot.indexOf('app-mascot.png') >= 0 ||
cachedMascot === '/empty-placeholder.svg' ||
cachedMascot.indexOf('/empty-placeholder.svg') === 0;
if (isLegacyDefault) {
try {
localStorage.removeItem('oms_brand_mascot_url');
} catch (eClear) {}
root.classList.remove('has-app-mascot');
root.style.removeProperty('--app-mascot-bg');
if (logoImg) {
logoImg.hidden = true;
logoImg.removeAttribute('src');
}
if (logoText) logoText.removeAttribute('hidden');
} else if (
logoImg &&
cachedMascot &&
(/^https?:\/\//i.test(cachedMascot) ||
cachedMascot.charAt(0) === '/' ||
cachedMascot.indexOf('data:') === 0)
) {
logoImg.hidden = false;
logoImg.src = cachedMascot;
if (logoText) logoText.setAttribute('hidden', '');
root.classList.add('has-app-mascot');
root.style.setProperty(
'--app-mascot-bg',
'url("' + cachedMascot.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '")',

View File

@ -36,7 +36,7 @@ server {
}
location = /favicon.ico {
try_files /favicon.png /favicon.ico =404;
try_files /favicon.ico =404;
expires 7d;
add_header Cache-Control "public";
access_log off;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 952 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -10,9 +10,3 @@ if (fs.existsSync(legacyLoginDir)) {
fs.rmSync(legacyLoginDir, { recursive: true, force: true });
console.log('[postbuild] removed dist/login (conflicts with SPA route /login)');
}
const faviconSrc = path.join(dist, 'site', 'img', 'logo1.png');
if (fs.existsSync(faviconSrc)) {
fs.copyFileSync(faviconSrc, path.join(dist, 'favicon.png'));
console.log('[postbuild] copied favicon.png from site logo');
}

View File

@ -76,6 +76,14 @@ export async function uploadPaymentReceiveQr(channel: PaymentReceiveQrChannel, f
return unwrapData<PaymentReceiveQrDto>(res.data)
}
/** 清除指定渠道充值收款码 */
export async function clearPaymentReceiveQr(channel: PaymentReceiveQrChannel) {
const res = await axiosInstance.post(
omsUrl(`/system/other-config/payment-qr/clear?channel=${encodeURIComponent(channel)}`),
)
return unwrapData<PaymentReceiveQrDto>(res.data)
}
export type BrandLogoChannel = 'portal' | 'site' | 'favicon' | 'mascot'
export interface BrandLogoDto {
@ -102,6 +110,14 @@ export async function uploadBrandLogo(channel: BrandLogoChannel, file: File) {
return unwrapData<BrandLogoDto>(res.data)
}
/** 清除指定渠道品牌 Logo(前端回退文字 LOGO) */
export async function clearBrandLogo(channel: BrandLogoChannel) {
const res = await axiosInstance.post(
omsUrl(`/system/other-config/brand-logo/clear?channel=${encodeURIComponent(channel)}`),
)
return unwrapData<BrandLogoDto>(res.data)
}
/** 轨迹服务默认配置编码 */
export const TRACK_SERVICE_CONFIG_CODE = 'track_service'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 952 KiB

View File

@ -39,24 +39,34 @@ body {
-moz-osx-font-smoothing: grayscale;
}
/* 全局空态:用吉祥物替换 Arco Empty 默认图标 */
/* 全局空态:未配置吉祥物显示文字 LOGO;有配置用图片 */
.arco-empty-image {
.arco-icon {
display: none !important;
}
&::after {
content: '';
content: 'LOGO';
display: block;
width: 36px;
height: 36px;
margin: 0 auto;
background: var(--app-mascot-bg, url('/app-mascot.png')) center / contain no-repeat;
filter: grayscale(1) brightness(1.08) contrast(0.92);
opacity: 0.78;
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
color: var(--color-text-3, #86909c);
opacity: 0.55;
}
}
html.has-app-mascot .arco-empty-image::after {
content: '';
width: 36px;
height: 36px;
background: var(--app-mascot-bg) center / contain no-repeat;
filter: grayscale(1) brightness(1.08) contrast(0.92);
opacity: 0.78;
}
.arco-empty-image img {
max-height: 44px;
width: auto;

View File

@ -1,6 +1,7 @@
<template>
<div class="app-mascot-state" :class="[`is-${mode}`, { 'is-compact': compact }]">
<img
v-if="appMascotUrl"
class="app-mascot-state__img"
:class="{ 'is-bounce': mode === 'loading' }"
:src="appMascotUrl"
@ -8,6 +9,14 @@
decoding="async"
draggable="false"
/>
<span
v-else
class="app-mascot-state__text"
:class="{ 'is-bounce': mode === 'loading' }"
aria-hidden="true"
>
{{ BRAND_TEXT_LOGO }}
</span>
<p v-if="description" class="app-mascot-state__desc">{{ description }}</p>
<div v-if="$slots.default" class="app-mascot-state__extra">
<slot />
@ -16,7 +25,7 @@
</template>
<script lang="ts" setup>
import { appMascotUrl } from '@/utils/brandLogo'
import { appMascotUrl, BRAND_TEXT_LOGO } from '@/utils/brandLogo'
withDefaults(
defineProps<{
@ -52,6 +61,10 @@ withDefaults(
width: 56px;
height: auto;
}
.app-mascot-state__text {
font-size: 18px;
}
}
&.is-empty .app-mascot-state__img {
@ -60,9 +73,17 @@ withDefaults(
opacity: 0.78;
}
&.is-empty .app-mascot-state__text {
opacity: 0.55;
}
&.is-empty.is-compact .app-mascot-state__img {
width: 28px;
}
&.is-empty.is-compact .app-mascot-state__text {
font-size: 14px;
}
}
.app-mascot-state__img {
@ -77,6 +98,20 @@ withDefaults(
}
}
.app-mascot-state__text {
display: block;
font-size: 28px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
color: var(--color-text-3, #86909c);
pointer-events: none;
&.is-bounce {
animation: app-mascot-bounce 1.4s ease-in-out infinite;
}
}
.app-mascot-state__desc {
margin: 0;
max-width: 320px;
@ -105,7 +140,8 @@ withDefaults(
}
@media (prefers-reduced-motion: reduce) {
.app-mascot-state__img.is-bounce {
.app-mascot-state__img.is-bounce,
.app-mascot-state__text.is-bounce {
animation: none;
}
}

View File

@ -14,7 +14,7 @@
collectPaginateEntries,
getPaginationMeta,
} from './pagination';
import { appMascotUrl } from '@/utils/brandLogo';
import { appMascotUrl, BRAND_TEXT_LOGO } from '@/utils/brandLogo';
const props = withDefaults(
defineProps<{
@ -368,11 +368,25 @@
:class="{ 'interface-tree--hierarchical': hierarchical }"
>
<div v-if="loading" class="loading-state">
<img class="state-mascot is-bounce" :src="appMascotUrl" alt="" draggable="false" />
<img
v-if="appMascotUrl"
class="state-mascot is-bounce"
:src="appMascotUrl"
alt=""
draggable="false"
/>
<span v-else class="state-text-logo is-bounce" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
<p>{{ loadingText }}</p>
</div>
<div v-else-if="isTreeEmpty" class="empty-state">
<img class="state-mascot" :src="appMascotUrl" alt="" draggable="false" />
<img
v-if="appMascotUrl"
class="state-mascot"
:src="appMascotUrl"
alt=""
draggable="false"
/>
<span v-else class="state-text-logo" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
<p>{{ emptyText }}</p>
</div>
<a-tree
@ -1117,12 +1131,30 @@
}
}
.state-text-logo {
font-size: 22px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
color: var(--color-text-3, #86909c);
opacity: 0.55;
user-select: none;
&.is-bounce {
animation: clm-mascot-bounce 1.4s ease-in-out infinite;
}
}
.empty-state .state-mascot {
width: 24px;
filter: grayscale(1) brightness(1.08) contrast(0.92);
opacity: 0.78;
}
.empty-state .state-text-logo {
font-size: 14px;
}
@keyframes clm-mascot-bounce {
0%,
100% {

View File

@ -16,7 +16,8 @@
} from './filterValue';
import { enrichHybridColumn } from './hybridHeader';
import { useAppStore } from '@/store';
import emptyMascotSrc from '@/assets/images/app-mascot.png';
import { appMascotUrl as emptyMascotSrc, BRAND_TEXT_LOGO } from '@/utils/brandLogo';
const emptyTextLogo = BRAND_TEXT_LOGO;
const appStore = useAppStore();
/** Handsontable classic 浅/深主题:随页面日夜模式切换,否则列表区会被主题 CSS 锁成白底 */
@ -2881,7 +2882,18 @@
/>
<div ref="hotContainer" class="handsontable-wrapper" :class="hotThemeClass"></div>
<div v-if="showEmptyOverlay" class="handsontable-empty-overlay" aria-hidden="false">
<img class="handsontable-empty-overlay__img" :src="emptyMascotSrc" alt="" draggable="false" />
<img
v-if="emptyMascotSrc"
class="handsontable-empty-overlay__img"
:src="emptyMascotSrc"
alt=""
draggable="false"
/>
<span
v-else
class="handsontable-empty-overlay__text-logo"
aria-hidden="true"
>{{ emptyTextLogo }}</span>
<p v-if="emptyOverlayText" class="handsontable-empty-overlay__text">{{ emptyOverlayText }}</p>
<div v-if="$slots.emptyExtra" class="handsontable-empty-overlay__extra">
<slot name="emptyExtra" />
@ -2962,6 +2974,16 @@
opacity: 0.78;
}
.handsontable-empty-overlay__text-logo {
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
color: var(--color-text-3, #86909c);
opacity: 0.55;
user-select: none;
}
.handsontable-empty-overlay__text {
margin: 0;
font-size: 13px;

View File

@ -19,7 +19,9 @@
import { isFunction } from 'lodash';
import FormPro from '@/components/FormPro/index.vue';
import { $baseMessage } from '@/utils';
import emptyImage from '@/assets/images/app-mascot.png';
import { appMascotUrl, BRAND_TEXT_LOGO } from '@/utils/brandLogo';
const emptyImage = appMascotUrl;
const emptyTextLogo = BRAND_TEXT_LOGO;
import type { TableProMethods } from './types';
const { t } = useI18n();
@ -877,7 +879,14 @@
</template>
<template #empty>
<div class="flex justify-center empty-image">
<img :src="emptyImage" alt="" class="empty-mascot" />
<img
v-if="emptyImage"
:src="emptyImage"
alt=""
class="empty-mascot"
draggable="false"
/>
<span v-else class="empty-text-logo" aria-hidden="true">{{ emptyTextLogo }}</span>
<div class="empty-text">暂无数据</div>
</div>
</template>
@ -983,6 +992,16 @@
filter: grayscale(1) brightness(1.08) contrast(0.92);
opacity: 0.78;
}
.empty-text-logo {
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
color: var(--color-text-3, #86909c);
opacity: 0.55;
user-select: none;
}
}
.empty-text {

View File

@ -20,8 +20,15 @@
:title="t('brand.fullName')"
@click.prevent="goOfficialSite"
>
<img :src="navLogo" :alt="t('brand.name')" class="agent-side-rail__brand-logo" />
<span class="agent-side-rail__brand-name agent-side-rail__fade">{{ t('brand.name') }}</span>
<template v-if="navLogoSrc">
<img :src="navLogoSrc" :alt="t('brand.name')" class="agent-side-rail__brand-logo" />
<span class="agent-side-rail__brand-name agent-side-rail__fade">{{
t('brand.name')
}}</span>
</template>
<span v-else class="agent-side-rail__brand-mark" aria-hidden="true">{{
BRAND_TEXT_LOGO
}}</span>
</a>
<div class="agent-side-rail__scroll">
@ -110,7 +117,7 @@ import {
CUSTOMER_SIDE_RAIL_COLLAPSED_WIDTH,
CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH,
} from '@/utils/customer-portal-nav'
import navLogo from '@/assets/logo2.png'
import { BRAND_TEXT_LOGO, loadBrandLogoUrls } from '@/utils/brandLogo'
const AGENT_SIDE_RAIL_COLLAPSED_WIDTH = CUSTOMER_SIDE_RAIL_COLLAPSED_WIDTH
const AGENT_SIDE_RAIL_EXPANDED_WIDTH = CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH
@ -126,6 +133,10 @@ type AgentNavItem = {
const { t } = useI18n()
const route = useRoute()
const router = useRouter()
const navLogoSrc = ref('')
void loadBrandLogoUrls().then((urls) => {
navLogoSrc.value = urls.portal || ''
})
const collapsed = ref(readCollapsed())
const compactLayout = ref(collapsed.value)
@ -342,6 +353,15 @@ onUnmounted(() => {
white-space: nowrap;
}
&__brand-mark {
font-size: 15px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
color: var(--color-text-3, #86909c);
user-select: none;
}
&__scroll {
flex: 1;
min-height: 0;

View File

@ -21,8 +21,15 @@
:title="t('brand.fullName')"
@click.prevent="goOfficialSite"
>
<img :src="navLogo" :alt="t('brand.name')" class="customer-side-rail__brand-logo" />
<span class="customer-side-rail__brand-name customer-side-rail__fade">{{ t('brand.name') }}</span>
<template v-if="navLogoSrc">
<img :src="navLogoSrc" :alt="t('brand.name')" class="customer-side-rail__brand-logo" />
<span class="customer-side-rail__brand-name customer-side-rail__fade">{{
t('brand.name')
}}</span>
</template>
<span v-else class="customer-side-rail__brand-mark" aria-hidden="true">{{
BRAND_TEXT_LOGO
}}</span>
</a>
<div class="customer-side-rail__scroll">
@ -199,7 +206,7 @@ import {
useHiprintClientState,
} from '@/utils/hiprint/hiprintClientState'
import { PRINT_CONTROL_DOWNLOAD_URL } from '@/constants/printControl'
import navLogo from '@/assets/logo2.png'
import { BRAND_TEXT_LOGO, loadBrandLogoUrls } from '@/utils/brandLogo'
import { resolveCurrentCustomer } from '@/api/customer/resolve'
import { CUSTOMER_BALANCE_CHANGED_EVENT } from '@/api/customer/accountFlow'
import { getMapIdFromAccessToken } from '@/utils/jwt'
@ -235,6 +242,11 @@ const printConnectionState = useHiprintClientState()
/** 与 CSS transition 时长一致(Linear 风格约 300ms) */
const RAIL_ANIM_MS = 300
const navLogoSrc = ref('')
void loadBrandLogoUrls().then((urls) => {
navLogoSrc.value = urls.portal || ''
})
const collapsed = ref(readCustomerSideRailCollapsed(false))
/** 布局紧凑态:动画结束后再切,避免收起中途图标跳动 */
const compactLayout = ref(collapsed.value)
@ -684,6 +696,15 @@ onUnmounted(() => {
white-space: nowrap;
}
&__brand-mark {
font-size: 15px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
color: var(--color-text-3, #86909c);
user-select: none;
}
&__scroll {
flex: 1;
min-height: 0;

View File

@ -3,11 +3,14 @@
<div class="top-nav-header">
<!-- Logo 区域:点击跳转官网首页 -->
<a class="top-nav-logo" href="/" :title="t('brand.fullName')" @click="goOfficialSite">
<img :src="navLogoSrc" :alt="t('brand.name')" />
<div class="top-nav-logo__brand">
<span class="top-nav-logo__name">{{ t('brand.name') }}</span>
<span class="top-nav-logo__full">{{ t('brand.fullName') }}</span>
</div>
<template v-if="navLogoSrc">
<img :src="navLogoSrc" :alt="t('brand.name')" />
<div class="top-nav-logo__brand">
<span class="top-nav-logo__name">{{ t('brand.name') }}</span>
<span class="top-nav-logo__full">{{ t('brand.fullName') }}</span>
</div>
</template>
<span v-else class="top-nav-logo__mark" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
</a>
<!-- 顶部水平菜单:磁吸滑块 + 极速 hover 下拉 -->
@ -282,8 +285,11 @@ import { Message } from '@arco-design/web-vue';
import { openWindow, regexUrl } from '@/utils';
import { MenuService, AuthService } from '@/api/rbac';
import type { MenuTreeDto } from '@/api/rbac';
import navLogoFallback from '@/assets/500x500.png';
import { applyDocumentFavicon, loadBrandLogoUrls } from '@/utils/brandLogo';
import {
applyDocumentFavicon,
BRAND_TEXT_LOGO,
loadBrandLogoUrls,
} from '@/utils/brandLogo';
import {
initHiprintClientState,
setHiprintClientEnabled,
@ -314,9 +320,9 @@ const appStore = useAppStore();
const tabBarStore = useTabBarStore();
const rbacUserStore = useRbacUserStore();
const navLogoSrc = ref(navLogoFallback);
const navLogoSrc = ref('');
void loadBrandLogoUrls().then((urls) => {
navLogoSrc.value = urls.portal;
navLogoSrc.value = urls.portal || '';
applyDocumentFavicon(urls.favicon);
});
@ -1399,6 +1405,18 @@ onUnmounted(() => {
}
}
.top-nav-logo__mark {
display: inline-flex;
align-items: center;
justify-content: center;
height: 36px;
font-size: 18px;
font-weight: 700;
letter-spacing: 0.12em;
color: rgba(255, 255, 255, 0.78);
user-select: none;
}
.top-nav-logo__brand {
display: flex;
flex-direction: column;

View File

@ -4254,7 +4254,7 @@ export default {
'system.otherConfig.actions.brandLogo': 'Brand logo',
'system.otherConfig.brandLogo.title': 'Brand logo',
'system.otherConfig.brandLogo.tip':
'Used for system top nav, official site header, browser tab icon, and boot mascot. Takes effect immediately; defaults when empty. Prefer square PNG.',
'Used for system top nav, official site header, browser tab icon, and boot mascot. Takes effect immediately; shows text LOGO when empty. Prefer square PNG.',
'system.otherConfig.brandLogo.portal': 'System top nav',
'system.otherConfig.brandLogo.site': 'Official site',
'system.otherConfig.brandLogo.favicon': 'Browser tab',
@ -4265,8 +4265,14 @@ export default {
'system.otherConfig.brandLogo.size.mascot': '256 / 512 PNG · boot ~96px',
'system.otherConfig.brandLogo.replace': 'Replace',
'system.otherConfig.brandLogo.empty': 'Not uploaded',
'system.otherConfig.brandLogo.clickUpload': 'Click or drag to upload',
'system.otherConfig.brandLogo.clickUpload': 'Upload',
'system.otherConfig.brandLogo.clickReplace': 'Click to replace',
'system.otherConfig.brandLogo.dropUpload': 'Click or drag a file here to upload',
'system.otherConfig.brandLogo.dropReplace': 'Click or drag to replace',
'system.otherConfig.brandLogo.invalidFile': 'Please upload an image (PNG / JPG / WEBP, etc.)',
'system.otherConfig.brandLogo.clear': 'Clear',
'system.otherConfig.brandLogo.clearSuccess': 'Cleared; text LOGO will show',
'system.otherConfig.brandLogo.clearFailed': 'Failed to clear',
'system.otherConfig.brandLogo.uploading': 'Uploading…',
'system.otherConfig.brandLogo.uploadSuccess': 'Brand logo updated',
'system.otherConfig.brandLogo.uploadFailed': 'Upload failed',
@ -4305,8 +4311,14 @@ export default {
'system.otherConfig.paymentQr.wechat': 'WeChat',
'system.otherConfig.paymentQr.replace': 'Replace',
'system.otherConfig.paymentQr.empty': 'Not uploaded',
'system.otherConfig.paymentQr.clickUpload': 'Click or drag to upload',
'system.otherConfig.paymentQr.clickUpload': 'Upload',
'system.otherConfig.paymentQr.clickReplace': 'Click to replace',
'system.otherConfig.paymentQr.dropUpload': 'Click or drag a file here to upload',
'system.otherConfig.paymentQr.dropReplace': 'Click or drag to replace',
'system.otherConfig.paymentQr.invalidFile': 'Please upload an image (PNG / JPG / WEBP, etc.)',
'system.otherConfig.paymentQr.clear': 'Clear',
'system.otherConfig.paymentQr.clearSuccess': 'Payment QR cleared',
'system.otherConfig.paymentQr.clearFailed': 'Failed to clear',
'system.otherConfig.paymentQr.uploading': 'Uploading…',
'system.otherConfig.paymentQr.uploadSuccess': 'Payment QR updated',
'system.otherConfig.paymentQr.uploadFailed': 'Upload failed',

View File

@ -4266,7 +4266,7 @@ export default {
'system.otherConfig.actions.brandLogo': '品牌 Logo',
'system.otherConfig.brandLogo.title': '品牌 Logo',
'system.otherConfig.brandLogo.tip':
'用于系统顶栏、官网头部、浏览器标签与启动页吉祥物。更换后立即生效;未上传时前端使用默认图。建议上传正方形 PNG。',
'用于系统顶栏、官网头部、浏览器标签与启动页吉祥物。更换后立即生效;未上传时显示文字 LOGO。建议上传正方形 PNG。',
'system.otherConfig.brandLogo.portal': '系统顶栏',
'system.otherConfig.brandLogo.site': '官网',
'system.otherConfig.brandLogo.favicon': '网站标签',
@ -4277,8 +4277,14 @@ export default {
'system.otherConfig.brandLogo.size.mascot': '建议 256 / 512 PNG,启动页约 96px',
'system.otherConfig.brandLogo.replace': '更换图片',
'system.otherConfig.brandLogo.empty': '尚未上传',
'system.otherConfig.brandLogo.clickUpload': '点击或拖拽上传',
'system.otherConfig.brandLogo.clickUpload': '上传图片',
'system.otherConfig.brandLogo.clickReplace': '点击更换',
'system.otherConfig.brandLogo.dropUpload': '点击或拖拽文件到此处上传',
'system.otherConfig.brandLogo.dropReplace': '点击或拖拽更换',
'system.otherConfig.brandLogo.invalidFile': '请上传图片文件(PNG / JPG / WEBP 等)',
'system.otherConfig.brandLogo.clear': '清除',
'system.otherConfig.brandLogo.clearSuccess': '已清除,将显示文字 LOGO',
'system.otherConfig.brandLogo.clearFailed': '清除失败',
'system.otherConfig.brandLogo.uploading': '上传中…',
'system.otherConfig.brandLogo.uploadSuccess': '品牌 Logo 已更新',
'system.otherConfig.brandLogo.uploadFailed': '上传失败',
@ -4311,13 +4317,20 @@ export default {
'system.otherConfig.wechatOrderNotify.trialSuccess': '已提交试发(请查看发送日志/微信)',
'system.otherConfig.wechatOrderNotify.trialFailed': '试发失败',
'system.otherConfig.paymentQr.title': '充值收款码',
'system.otherConfig.paymentQr.tip': '用于客户 PC / H5 充值页展示。更换后立即生效;未上传时前端使用默认图。',
'system.otherConfig.paymentQr.tip':
'用于客户 PC / H5 充值页展示。更换后立即生效;未上传时前端使用默认图。',
'system.otherConfig.paymentQr.alipay': '支付宝',
'system.otherConfig.paymentQr.wechat': '微信',
'system.otherConfig.paymentQr.replace': '更换图片',
'system.otherConfig.paymentQr.empty': '尚未上传',
'system.otherConfig.paymentQr.clickUpload': '点击或拖拽上传',
'system.otherConfig.paymentQr.clickUpload': '上传图片',
'system.otherConfig.paymentQr.clickReplace': '点击更换',
'system.otherConfig.paymentQr.dropUpload': '点击或拖拽文件到此处上传',
'system.otherConfig.paymentQr.dropReplace': '点击或拖拽更换',
'system.otherConfig.paymentQr.invalidFile': '请上传图片文件(PNG / JPG / WEBP 等)',
'system.otherConfig.paymentQr.clear': '清除',
'system.otherConfig.paymentQr.clearSuccess': '已清除收款码',
'system.otherConfig.paymentQr.clearFailed': '清除失败',
'system.otherConfig.paymentQr.uploading': '上传中…',
'system.otherConfig.paymentQr.uploadSuccess': '收款码已更新',
'system.otherConfig.paymentQr.uploadFailed': '上传失败',

View File

@ -138,7 +138,7 @@ async function bootstrap() {
initAuthKeepAlive();
// GA4:有 VITE_GA_MEASUREMENT_ID 才加载;地域/设备等自动采集
initGa();
// 浏览器标签 favicon(匿名可读;未配置仍用 /favicon.png)
// 浏览器标签 favicon / 启动页吉祥物(匿名可读;未配置显示文字 LOGO)
void bootstrapBrandAssets();
// 登录页勿预热 VXE/Element:体积大且会注入全局 CSS,和首屏抢带宽

View File

@ -2,7 +2,6 @@ import { ref } from 'vue'
import { getBrandLogo, type BrandLogoDto } from '@/api/system/otherConfig'
import { resolveOmsAssetUrl, unwrapData } from '@/api/oms/common'
import { resolveAdminApiPath } from '@/utils/adminApi'
import portalLogoFallback from '@/assets/500x500.png'
export type BrandLogoUrls = {
portal: string
@ -11,18 +10,35 @@ export type BrandLogoUrls = {
mascot: string
}
const SITE_LOGO_FALLBACK = '/site/img/logo1.png'
const FAVICON_FALLBACK = '/favicon.png'
export const MASCOT_FALLBACK = '/app-mascot.png'
/** 未配置图片时的文字占位(启动页 / 空态) */
export const BRAND_TEXT_LOGO = 'LOGO'
/** @deprecated 已改为文字 LOGO */
export const EMPTY_PLACEHOLDER = ''
/** @deprecated 已改为文字 LOGO */
export const MASCOT_FALLBACK = ''
/** 启动页在 Vue 挂载前读取,须与 index.html 一致 */
export const MASCOT_CACHE_KEY = 'oms_brand_mascot_url'
function isLegacyDefaultMascot(raw: string): boolean {
return (
raw === '/app-mascot.png' ||
raw.startsWith('/app-mascot.png?') ||
raw.includes('app-mascot.png') ||
raw === '/empty-placeholder.svg' ||
raw.startsWith('/empty-placeholder.svg')
)
}
function readCachedMascotUrl(): string {
if (typeof localStorage === 'undefined') return ''
try {
const raw = (localStorage.getItem(MASCOT_CACHE_KEY) || '').trim()
if (!raw) return ''
if (/^https?:\/\//i.test(raw) || raw.startsWith('/') || raw.startsWith('data:')) {
if (isLegacyDefaultMascot(raw)) {
localStorage.removeItem(MASCOT_CACHE_KEY)
return ''
}
return raw
}
} catch {
@ -33,88 +49,117 @@ function readCachedMascotUrl(): string {
function mapBrandLogoDto(data?: BrandLogoDto | null): BrandLogoUrls {
return {
portal: resolveOmsAssetUrl(data?.portalUrl) || portalLogoFallback,
site: resolveOmsAssetUrl(data?.siteUrl) || SITE_LOGO_FALLBACK,
favicon: resolveOmsAssetUrl(data?.faviconUrl) || FAVICON_FALLBACK,
mascot: resolveOmsAssetUrl(data?.mascotUrl) || MASCOT_FALLBACK,
portal: resolveOmsAssetUrl(data?.portalUrl) || '',
site: resolveOmsAssetUrl(data?.siteUrl) || '',
favicon: resolveOmsAssetUrl(data?.faviconUrl) || '',
mascot: resolveOmsAssetUrl(data?.mascotUrl) || '',
}
}
/** 空态 / 启动页吉祥物(可被配置覆盖) */
export const appMascotUrl = ref(readCachedMascotUrl() || MASCOT_FALLBACK)
/** 空态 / 启动页吉祥物 URL;未配置为空串,UI 显示文字 LOGO */
export const appMascotUrl = ref(readCachedMascotUrl())
function setMascotCssVar(resolved: string) {
if (typeof document === 'undefined') return
try {
if (!resolved) {
document.documentElement.style.removeProperty('--app-mascot-bg')
document.documentElement.classList.remove('has-app-mascot')
return
}
const safe = resolved.replace(/\\/g, '\\\\').replace(/"/g, '\\"')
document.documentElement.style.setProperty('--app-mascot-bg', `url("${safe}")`)
document.documentElement.classList.add('has-app-mascot')
} catch {
/* ignore */
}
}
function syncBootBrand(displayUrl: string) {
if (typeof document === 'undefined') return
const bootImg = document.querySelector<HTMLImageElement>('#app-boot .boot-logo')
const bootText = document.querySelector<HTMLElement>('#app-boot .boot-text-logo')
if (displayUrl) {
if (bootImg) {
bootImg.hidden = false
bootImg.src = displayUrl
}
bootText?.setAttribute('hidden', '')
} else {
if (bootImg) {
bootImg.hidden = true
bootImg.removeAttribute('src')
}
bootText?.removeAttribute('hidden')
}
}
if (typeof document !== 'undefined') {
const initial = appMascotUrl.value
if (initial && initial !== MASCOT_FALLBACK) {
if (initial) {
setMascotCssVar(initial.split('?')[0] || initial)
syncBootBrand(initial)
} else {
setMascotCssVar('')
syncBootBrand('')
}
}
/** 更新浏览器标签 favicon(带缓存戳) */
/** 更新浏览器标签 favicon;未配置时移除自定义 icon */
export function applyDocumentFavicon(url?: string | null) {
if (typeof document === 'undefined') return
const raw = String(url || '').trim() || FAVICON_FALLBACK
const href = raw.includes('?') ? raw : `${raw}?_t=${Date.now()}`
const raw = String(url || '').trim()
let link = document.querySelector<HTMLLinkElement>('link[rel="icon"]')
if (!raw) {
if (link) link.remove()
return
}
const href = raw.includes('?') ? raw : `${raw}?_t=${Date.now()}`
if (!link) {
link = document.createElement('link')
link.rel = 'icon'
document.head.appendChild(link)
}
link.type = 'image/png'
link.type = raw.toLowerCase().endsWith('.svg') ? 'image/svg+xml' : 'image/png'
link.href = href
}
/** 应用启动页 / 空态吉祥物,并写入 localStorage 供下次冷启动 */
/** 应用启动页 / 空态吉祥物;未配置则清缓存并用文字 LOGO */
export function applyAppMascot(url?: string | null) {
if (typeof document === 'undefined') return
const resolved = resolveOmsAssetUrl(url) || MASCOT_FALLBACK
const configured = resolveOmsAssetUrl(url) || ''
const display =
resolved === MASCOT_FALLBACK || resolved.includes('?')
? resolved
: `${resolved}?_t=${Date.now()}`
!configured || configured.includes('?')
? configured
: `${configured}?_t=${Date.now()}`
appMascotUrl.value = display
try {
if (resolved === MASCOT_FALLBACK) {
if (!configured) {
localStorage.removeItem(MASCOT_CACHE_KEY)
} else {
localStorage.setItem(MASCOT_CACHE_KEY, resolved)
localStorage.setItem(MASCOT_CACHE_KEY, configured)
}
} catch {
/* ignore */
}
setMascotCssVar(resolved)
const bootImg = document.querySelector<HTMLImageElement>('#app-boot .boot-logo')
if (bootImg) {
bootImg.src = display
}
setMascotCssVar(configured)
syncBootBrand(display)
}
/** 拉取配置的品牌 Logo;未配置或失败时回退本地默认图(需登录态) */
/** 拉取配置的品牌 Logo;未配置返回空串(需登录态) */
export async function loadBrandLogoUrls(): Promise<BrandLogoUrls> {
try {
const data = await getBrandLogo()
return mapBrandLogoDto(data)
} catch {
return {
portal: portalLogoFallback,
site: SITE_LOGO_FALLBACK,
favicon: FAVICON_FALLBACK,
mascot: readCachedMascotUrl() || MASCOT_FALLBACK,
portal: '',
site: '',
favicon: '',
mascot: readCachedMascotUrl(),
}
}
}
@ -133,10 +178,10 @@ export async function fetchBrandLogoUrlsPublic(): Promise<BrandLogoUrls> {
return mapBrandLogoDto(data)
} catch {
return {
portal: portalLogoFallback,
site: SITE_LOGO_FALLBACK,
favicon: FAVICON_FALLBACK,
mascot: readCachedMascotUrl() || MASCOT_FALLBACK,
portal: '',
site: '',
favicon: '',
mascot: readCachedMascotUrl(),
}
}
}
@ -144,9 +189,7 @@ export async function fetchBrandLogoUrlsPublic(): Promise<BrandLogoUrls> {
/** 启动时应用配置的 favicon + 吉祥物(匿名可读) */
export async function bootstrapBrandAssets() {
const cached = readCachedMascotUrl()
if (cached) {
applyAppMascot(cached)
}
applyAppMascot(cached || '')
const urls = await fetchBrandLogoUrlsPublic()
applyDocumentFavicon(urls.favicon)
applyAppMascot(urls.mascot)

View File

@ -15,8 +15,16 @@
:aria-label="t('h5Admin.login.backToSite')"
@click="goOfficialSite"
>
<img :src="logoImg" alt="" class="h5-login-card__logo" />
<h2 class="h5-login-card__title">{{ t('h5Admin.login.brandName') }}</h2>
<img
v-if="logoSrc"
:src="logoSrc"
alt=""
class="h5-login-card__logo"
/>
<span v-else class="h5-login-card__logo-mark" aria-hidden="true">{{
BRAND_TEXT_LOGO
}}</span>
<h2 v-if="logoSrc" class="h5-login-card__title">{{ t('h5Admin.login.brandName') }}</h2>
</button>
<p class="h5-login-card__hint">{{ t('h5Admin.login.brandHint') }}</p>
</header>
@ -109,7 +117,7 @@ import { loginErrorForUser, useRbacUserStore } from '@/store/modules/rbac-user';
import { useLoginCaptchaGate } from '@/composables/useLoginCaptchaGate';
import LoginCaptchaField from '@/components/LoginCaptchaField/index.vue';
import { ADMIN_H5_HOME_PATH, isAdminH5Path } from '@/utils/login-portal';
import logoImg from '@/assets/logo2.png';
import { BRAND_TEXT_LOGO, fetchBrandLogoUrlsPublic } from '@/utils/brandLogo';
import LoginLangToggle from '@/views/login/components/LoginLangToggle.vue';
import H5LoginPortalSwitch from '@/views/h5/components/H5LoginPortalSwitch.vue';
@ -119,6 +127,10 @@ const { t } = useI18n();
const route = useRoute();
const router = useRouter();
const rbacUserStore = useRbacUserStore();
const logoSrc = ref('');
void fetchBrandLogoUrlsPublic().then((urls) => {
logoSrc.value = urls.site || '';
});
const {
requireCaptcha,
captchaId,
@ -325,6 +337,16 @@ onMounted(() => {
user-select: none;
}
.h5-login-card__logo-mark {
display: block;
font-size: 22px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
color: #86909c;
user-select: none;
}
.h5-login-card__title {
margin: 0;
font-size: 22px;

View File

@ -130,17 +130,27 @@
color: var(--h5-text-3, #86909c);
&::before {
content: '';
content: 'LOGO';
display: block;
width: 36px;
height: 36px;
margin: 0 auto 10px;
background: var(--app-mascot-bg, url('/app-mascot.png')) center / contain no-repeat;
filter: grayscale(1) brightness(1.08) contrast(0.92);
opacity: 0.78;
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
color: var(--h5-text-3, #86909c);
opacity: 0.55;
}
}
html.has-app-mascot .h5-ops__empty::before {
content: '';
width: 36px;
height: 36px;
background: var(--app-mascot-bg) center / contain no-repeat;
filter: grayscale(1) brightness(1.08) contrast(0.92);
opacity: 0.78;
}
.h5-ops__card {
display: grid;
gap: 4px;

View File

@ -4,8 +4,16 @@
<main v-if="oauthBusy" class="h5-login-oauth-screen">
<div class="h5-login-oauth-screen__card">
<div class="h5-login-oauth-screen__brand">
<img :src="logoImg" alt="" class="h5-login-card__logo" />
<span>{{ t('h5.login.brandName') }}</span>
<img
v-if="logoSrc"
:src="logoSrc"
alt=""
class="h5-login-card__logo"
/>
<span v-else class="h5-login-card__logo-mark" aria-hidden="true">{{
BRAND_TEXT_LOGO
}}</span>
<span v-if="logoSrc">{{ t('h5.login.brandName') }}</span>
</div>
<a-spin :size="28" />
<p class="h5-login-oauth-screen__text">{{ t('h5.login.oauthLoggingIn') }}</p>
@ -30,8 +38,16 @@
:aria-label="t('h5.login.backToSite')"
@click="goOfficialSite"
>
<img :src="logoImg" alt="" class="h5-login-card__logo" />
<h2 class="h5-login-card__title">{{ t('h5.login.brandName') }}</h2>
<img
v-if="logoSrc"
:src="logoSrc"
alt=""
class="h5-login-card__logo"
/>
<span v-else class="h5-login-card__logo-mark" aria-hidden="true">{{
BRAND_TEXT_LOGO
}}</span>
<h2 v-if="logoSrc" class="h5-login-card__title">{{ t('h5.login.brandName') }}</h2>
</button>
<p class="h5-login-card__hint">{{ t('h5.login.brandHint') }}</p>
</header>
@ -172,7 +188,7 @@ import { isWeChatBrowser } from '@/utils/device';
import { loginErrorForUser, useRbacUserStore } from '@/store/modules/rbac-user';
import { useLoginCaptchaGate } from '@/composables/useLoginCaptchaGate';
import LoginCaptchaField from '@/components/LoginCaptchaField/index.vue';
import logoImg from '@/assets/logo2.png';
import { BRAND_TEXT_LOGO, fetchBrandLogoUrlsPublic } from '@/utils/brandLogo';
import LoginLangToggle from '@/views/login/components/LoginLangToggle.vue';
import H5LoginPortalSwitch from '@/views/h5/components/H5LoginPortalSwitch.vue';
import WechatOAuthLoginButton from '../components/WechatOAuthLoginButton.vue';
@ -189,6 +205,10 @@ const { t } = useI18n();
const route = useRoute();
const router = useRouter();
const rbacUserStore = useRbacUserStore();
const logoSrc = ref('');
void fetchBrandLogoUrlsPublic().then((urls) => {
logoSrc.value = urls.site || '';
});
const {
requireCaptcha,
captchaId,
@ -596,6 +616,16 @@ onMounted(async () => {
pointer-events: none;
}
.h5-login-card__logo-mark {
display: block;
font-size: 22px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
color: #86909c;
user-select: none;
}
.h5-login-card__title {
margin: 0;
font-size: 22px;

View File

@ -263,12 +263,14 @@
class="h5-empty h5-empty--no-quote"
>
<img
v-if="appMascotUrl"
class="h5-empty__mascot"
:src="appMascotUrl"
alt=""
decoding="async"
draggable="false"
/>
<span v-else class="h5-empty__text-logo" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
<div class="h5-empty__badge">{{ t('h5.price.noResultTitle') }}</div>
<p class="h5-empty__title">
{{
@ -528,12 +530,14 @@
<div v-else-if="isLoggedIn" class="h5-empty h5-price-empty">
<img
v-if="appMascotUrl"
class="h5-empty__mascot"
:src="appMascotUrl"
alt=""
decoding="async"
draggable="false"
/>
<span v-else class="h5-empty__text-logo" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
<p>{{ t('h5.price.empty') }}</p>
</div>
@ -732,7 +736,7 @@ import {
} from '@/api/order';
import { getSalesProductDetail } from '@/api/channel/salesProduct';
import { h5Navigate } from '@/utils/device';
import { appMascotUrl } from '@/utils/brandLogo';
import { appMascotUrl, BRAND_TEXT_LOGO } from '@/utils/brandLogo';
import { isLogin } from '@/utils/auth';
import { checkCustomerContactRequired } from '@/utils/customerContactGate';
import { ensureH5Login } from '../composables/useH5LoginGate';
@ -2979,6 +2983,19 @@ onMounted(() => {
user-select: none;
}
.h5-empty__text-logo {
display: block;
margin: 0 auto 8px;
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
text-align: center;
color: var(--color-text-3, #86909c);
opacity: 0.55;
user-select: none;
}
.h5-empty__badge {
display: inline-flex;
align-items: center;

View File

@ -1,17 +1,26 @@
<template>
<div class="login-brand" aria-hidden="true">
<img class="login-brand__img" :src="logoImg" alt="" draggable="false" />
<span class="login-brand__name">{{ t('brand.name') }}</span>
<template v-if="logoSrc">
<img class="login-brand__img" :src="logoSrc" alt="" draggable="false" />
<span class="login-brand__name">{{ t('brand.name') }}</span>
</template>
<span v-else class="login-brand__mark">{{ BRAND_TEXT_LOGO }}</span>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import logoImg from '@/assets/logo2.png';
import { BRAND_TEXT_LOGO, fetchBrandLogoUrlsPublic } from '@/utils/brandLogo';
defineOptions({ name: 'LoginLockLogo' });
const { t } = useI18n();
const logoSrc = ref('');
void fetchBrandLogoUrlsPublic().then((urls) => {
logoSrc.value = urls.site || '';
});
</script>
<style lang="less" scoped>
@ -31,6 +40,16 @@ const { t } = useI18n();
object-fit: contain;
}
.login-brand__mark {
display: block;
font-size: 28px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
color: #86909c;
user-select: none;
}
.login-brand__name {
font-size: 24px;
font-weight: 700;

View File

@ -17,7 +17,7 @@ import {
updateCustoms9610,
} from '@/api/order/customs9610'
import { $baseMessage } from '@/utils'
import { appMascotUrl } from '@/utils/brandLogo'
import { appMascotUrl, BRAND_TEXT_LOGO } from '@/utils/brandLogo'
import { hasPermission } from '@/utils/rbac-permission'
import { formatDateTime, normalizeListRow, pickField } from '@/utils/warehouseListMapper'
import { renderWarehouseActionBtn, wrapWarehouseActions } from '@/utils/warehouseActionRenderer'
@ -770,7 +770,14 @@ onMounted(() => {
<div ref="tableContainerRef" class="list-wrap">
<div v-if="!listLoading && totalCount === 0" class="list-empty-hint">
<img class="list-empty-hint__mascot" :src="appMascotUrl" alt="" draggable="false" />
<img
v-if="appMascotUrl"
class="list-empty-hint__mascot"
:src="appMascotUrl"
alt=""
draggable="false"
/>
<span v-else class="list-empty-hint__text-logo" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
<span>{{ t('order.customs9610.empty.hint') }}</span>
</div>
<a-spin :loading="listLoading" class="table-spin">
@ -1147,6 +1154,16 @@ onMounted(() => {
opacity: 0.78;
}
.list-empty-hint__text-logo {
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
line-height: 1;
color: var(--color-text-3, #86909c);
opacity: 0.55;
user-select: none;
}
.table-spin {
width: 100%;
flex: 1;

View File

@ -2,11 +2,14 @@
<header id="header" class="header d-flex align-items-center fixed-top">
<div class="container-fluid container-xl d-flex align-items-center justify-content-between">
<a href="/" class="logo d-flex align-items-center" @click="$emit('home')">
<img :src="siteLogoSrc" alt="BCD logo" width="40" height="40" />
<span class="brand-lockup">
<h1>BCD</h1>
<small class="brand-fullname">Business & Customer & Delivery</small>
</span>
<template v-if="siteLogoSrc">
<img :src="siteLogoSrc" alt="BCD logo" width="40" height="40" />
<span class="brand-lockup">
<h1>BCD</h1>
<small class="brand-fullname">Business & Customer & Delivery</small>
</span>
</template>
<span v-else class="logo-mark" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
</a>
<button
@ -117,7 +120,11 @@
<script lang="ts" setup>
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import { applyDocumentFavicon, fetchBrandLogoUrlsPublic } from '@/utils/brandLogo';
import {
applyDocumentFavicon,
BRAND_TEXT_LOGO,
fetchBrandLogoUrlsPublic,
} from '@/utils/brandLogo';
import { useUserStore } from '@/store';
import { useRbacUserStore } from '@/store/modules/rbac-user';
import { applyRbacUserToUserStore } from '@/utils/enter-system';
@ -151,9 +158,9 @@
const rbacUserStore = useRbacUserStore();
const signedIn = computed(() => rbacUserStore.isLoggedIn);
const homeUrl = officialAppHomeUrl();
const siteLogoSrc = ref('/site/img/logo1.png');
const siteLogoSrc = ref('');
void fetchBrandLogoUrlsPublic().then((urls) => {
siteLogoSrc.value = urls.site;
siteLogoSrc.value = urls.site || '';
applyDocumentFavicon(urls.favicon);
});

View File

@ -55,6 +55,19 @@ body.command-home {
margin-right: 8px;
}
.header .logo .logo-mark {
display: inline-flex;
align-items: center;
justify-content: center;
height: 40px;
font-size: 22px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
color: var(--kc-secondary, #86909c);
user-select: none;
}
.header .logo h1 {
margin: 0;
color: var(--kc-primary);

View File

@ -459,7 +459,7 @@
v-model:visible="paymentQrVisible"
:title="t('system.otherConfig.paymentQr.title')"
:footer="false"
width="640px"
width="680px"
:mask-closable="false"
unmount-on-close
>
@ -469,36 +469,75 @@
<div v-if="paymentQrLoading" class="payment-qr-loading">
<a-spin />
</div>
<div v-else class="payment-qr-grid">
<div v-else class="brand-logo-grid">
<div
v-for="item in paymentQrCards"
:key="item.channel"
class="payment-qr-card"
class="brand-logo-card"
>
<div class="payment-qr-card__head">
<span class="payment-qr-card__title">{{ item.title }}</span>
<a-upload
:show-file-list="false"
<div class="brand-logo-card__meta">
<div class="brand-logo-card__meta-text">
<span class="brand-logo-card__title">{{ item.title }}</span>
</div>
<a-button
v-if="item.url"
class="brand-logo-card__clear"
size="mini"
:loading="item.uploading"
@click.stop="handlePaymentQrClear(item.channel)"
>
{{ t('system.otherConfig.paymentQr.clear') }}
</a-button>
</div>
<div
class="brand-logo-card__zone"
:class="{
'is-filled': !!item.url,
'is-uploading': item.uploading,
'is-dragover': paymentQrDragOver[item.channel],
}"
@click="openPaymentQrPicker(item.channel)"
@dragenter.prevent="onPaymentQrDragEnter(item.channel)"
@dragover.prevent="onPaymentQrDragEnter(item.channel)"
@dragleave.prevent="onPaymentQrDragLeave(item.channel, $event)"
@drop.prevent="onPaymentQrDrop(item.channel, $event)"
>
<template v-if="item.url">
<img
class="brand-logo-card__img brand-logo-card__img--qr"
:src="item.url"
:alt="item.title"
draggable="false"
/>
<div v-if="item.uploading" class="brand-logo-card__mask is-busy">
<a-spin />
<span>{{ t('system.otherConfig.paymentQr.uploading') }}</span>
</div>
<div v-else class="brand-logo-card__mask">
{{ t('system.otherConfig.paymentQr.dropReplace') }}
</div>
</template>
<template v-else-if="item.uploading">
<a-spin />
<span class="brand-logo-card__hint">
{{ t('system.otherConfig.paymentQr.uploading') }}
</span>
</template>
<template v-else>
<span class="brand-logo-card__plus">+</span>
<span class="brand-logo-card__hint">
{{ t('system.otherConfig.paymentQr.dropUpload') }}
</span>
</template>
<input
class="brand-logo-card__file"
type="file"
:data-channel="`qr-${item.channel}`"
accept="image/png,image/jpeg,image/jpg,image/webp,image/gif,image/bmp"
:disabled="item.uploading"
:custom-request="(option) => handlePaymentQrUpload(item.channel, option)"
>
<a-button size="small" :loading="item.uploading">
{{ t('system.otherConfig.paymentQr.replace') }}
</a-button>
</a-upload>
</div>
<div class="payment-qr-card__preview">
<a-image
v-if="item.url"
:src="item.url"
:preview="true"
width="200"
fit="contain"
@click.stop
@change="onPaymentQrFileChange(item.channel, $event)"
/>
<div v-else class="payment-qr-card__empty">
{{ t('system.otherConfig.paymentQr.empty') }}
</div>
</div>
</div>
</div>
@ -525,44 +564,70 @@
class="brand-logo-card"
>
<div class="brand-logo-card__meta">
<span class="brand-logo-card__title">{{ item.title }}</span>
<span class="brand-logo-card__size">{{ item.sizeHint }}</span>
</div>
<a-upload
class="brand-logo-card__upload"
draggable
:show-file-list="false"
accept="image/png,image/jpeg,image/jpg,image/webp,image/gif,image/bmp"
:disabled="item.uploading"
:custom-request="(option) => handleBrandLogoUpload(item.channel, option)"
>
<div
class="brand-logo-card__zone"
:class="{
'is-filled': !!item.url,
'is-uploading': item.uploading,
}"
>
<template v-if="item.uploading">
<a-spin />
<span class="brand-logo-card__hint">
{{ t('system.otherConfig.brandLogo.uploading') }}
</span>
</template>
<template v-else-if="item.url">
<img class="brand-logo-card__img" :src="item.url" alt="" />
<div class="brand-logo-card__mask">
{{ t('system.otherConfig.brandLogo.clickReplace') }}
</div>
</template>
<template v-else>
<span class="brand-logo-card__plus">+</span>
<span class="brand-logo-card__hint">
{{ t('system.otherConfig.brandLogo.clickUpload') }}
</span>
</template>
<div class="brand-logo-card__meta-text">
<span class="brand-logo-card__title">{{ item.title }}</span>
<span class="brand-logo-card__size">{{ item.sizeHint }}</span>
</div>
</a-upload>
<a-button
v-if="item.url"
class="brand-logo-card__clear"
size="mini"
:loading="item.uploading"
@click.stop="handleBrandLogoClear(item.channel)"
>
{{ t('system.otherConfig.brandLogo.clear') }}
</a-button>
</div>
<div
class="brand-logo-card__zone"
:class="{
'is-filled': !!item.url,
'is-uploading': item.uploading,
'is-dragover': brandLogoDragOver[item.channel],
}"
@click="openBrandLogoPicker(item.channel)"
@dragenter.prevent="onBrandLogoDragEnter(item.channel)"
@dragover.prevent="onBrandLogoDragEnter(item.channel)"
@dragleave.prevent="onBrandLogoDragLeave(item.channel, $event)"
@drop.prevent="onBrandLogoDrop(item.channel, $event)"
>
<template v-if="item.url">
<img
class="brand-logo-card__img"
:src="item.url"
:alt="item.title"
draggable="false"
/>
<div v-if="item.uploading" class="brand-logo-card__mask is-busy">
<a-spin />
<span>{{ t('system.otherConfig.brandLogo.uploading') }}</span>
</div>
<div v-else class="brand-logo-card__mask">
{{ t('system.otherConfig.brandLogo.dropReplace') }}
</div>
</template>
<template v-else-if="item.uploading">
<a-spin />
<span class="brand-logo-card__hint">
{{ t('system.otherConfig.brandLogo.uploading') }}
</span>
</template>
<template v-else>
<span class="brand-logo-card__mark">LOGO</span>
<span class="brand-logo-card__hint">
{{ t('system.otherConfig.brandLogo.dropUpload') }}
</span>
</template>
<input
class="brand-logo-card__file"
type="file"
:data-channel="item.channel"
accept="image/png,image/jpeg,image/jpg,image/webp,image/gif,image/bmp"
:disabled="item.uploading"
@click.stop
@change="onBrandLogoFileChange(item.channel, $event)"
/>
</div>
</div>
</div>
</a-modal>
@ -582,6 +647,8 @@ import {
WECHAT_MP_FOLLOW_CONFIG_CODE,
createSystemOtherConfig,
deleteSystemOtherConfig,
clearBrandLogo,
clearPaymentReceiveQr,
getBrandLogo,
getPaymentReceiveQr,
getSystemOtherConfigDetail,
@ -1053,28 +1120,41 @@ const paymentQrUploading = reactive({
alipay: false,
wechat: false,
})
const paymentQrDragOver = reactive({
alipay: false,
wechat: false,
})
const paymentQrLocalPreview = reactive<Record<PaymentReceiveQrChannel, string>>({
alipay: '',
wechat: '',
})
const paymentQrCards = computed(() => [
{
channel: 'alipay' as PaymentReceiveQrChannel,
title: t('system.otherConfig.paymentQr.alipay'),
url: paymentQrUrls.alipay,
url: paymentQrLocalPreview.alipay || paymentQrUrls.alipay,
uploading: paymentQrUploading.alipay,
},
{
channel: 'wechat' as PaymentReceiveQrChannel,
title: t('system.otherConfig.paymentQr.wechat'),
url: paymentQrUrls.wechat,
url: paymentQrLocalPreview.wechat || paymentQrUrls.wechat,
uploading: paymentQrUploading.wechat,
},
])
function applyPaymentQrDto(data?: { alipayUrl?: string; wechatUrl?: string } | null) {
const stamp = Date.now()
const alipay = resolveOmsAssetUrl(data?.alipayUrl)
const wechat = resolveOmsAssetUrl(data?.wechatUrl)
paymentQrUrls.alipay = alipay ? `${alipay}${alipay.includes('?') ? '&' : '?'}_t=${stamp}` : ''
paymentQrUrls.wechat = wechat ? `${wechat}${wechat.includes('?') ? '&' : '?'}_t=${stamp}` : ''
function applyPaymentQrDto(
data?: {
alipayUrl?: string
wechatUrl?: string
AlipayUrl?: string
WechatUrl?: string
} | null,
) {
const row = (data || {}) as Record<string, any>
paymentQrUrls.alipay = resolveBrandLogoDisplayUrl(pickBrandLogoUrl(row, 'alipayUrl', 'AlipayUrl'))
paymentQrUrls.wechat = resolveBrandLogoDisplayUrl(pickBrandLogoUrl(row, 'wechatUrl', 'WechatUrl'))
}
async function loadPaymentQr() {
@ -1108,53 +1188,80 @@ const brandLogoUploading = reactive({
favicon: false,
mascot: false,
})
const brandLogoDragOver = reactive({
portal: false,
site: false,
favicon: false,
mascot: false,
})
const brandLogoLocalPreview = reactive<Record<BrandLogoChannel, string>>({
portal: '',
site: '',
favicon: '',
mascot: '',
})
const brandLogoCards = computed(() => [
{
channel: 'portal' as BrandLogoChannel,
title: t('system.otherConfig.brandLogo.portal'),
sizeHint: t('system.otherConfig.brandLogo.size.portal'),
url: brandLogoUrls.portal,
url: brandLogoLocalPreview.portal || brandLogoUrls.portal,
uploading: brandLogoUploading.portal,
},
{
channel: 'site' as BrandLogoChannel,
title: t('system.otherConfig.brandLogo.site'),
sizeHint: t('system.otherConfig.brandLogo.size.site'),
url: brandLogoUrls.site,
url: brandLogoLocalPreview.site || brandLogoUrls.site,
uploading: brandLogoUploading.site,
},
{
channel: 'favicon' as BrandLogoChannel,
title: t('system.otherConfig.brandLogo.favicon'),
sizeHint: t('system.otherConfig.brandLogo.size.favicon'),
url: brandLogoUrls.favicon,
url: brandLogoLocalPreview.favicon || brandLogoUrls.favicon,
uploading: brandLogoUploading.favicon,
},
{
channel: 'mascot' as BrandLogoChannel,
title: t('system.otherConfig.brandLogo.mascot'),
sizeHint: t('system.otherConfig.brandLogo.size.mascot'),
url: brandLogoUrls.mascot,
url: brandLogoLocalPreview.mascot || brandLogoUrls.mascot,
uploading: brandLogoUploading.mascot,
},
])
function pickBrandLogoUrl(data: Record<string, any> | null | undefined, camel: string, pascal: string) {
const raw = data?.[camel] ?? data?.[pascal]
return typeof raw === 'string' ? raw : ''
}
/** 已签名 COS/OSS URL 勿再追加缓存戳,否则验签失败图片空白 */
function resolveBrandLogoDisplayUrl(raw?: string | null) {
const url = resolveOmsAssetUrl(raw)
if (!url) return ''
if (/[?&](q-sign-algorithm|x-oss-signature|Signature)=/i.test(url)) {
return url
}
return `${url}${url.includes('?') ? '&' : '?'}_t=${Date.now()}`
}
function applyBrandLogoDto(data?: {
portalUrl?: string
siteUrl?: string
faviconUrl?: string
mascotUrl?: string
PortalUrl?: string
SiteUrl?: string
FaviconUrl?: string
MascotUrl?: string
} | null) {
const stamp = Date.now()
const stampUrl = (raw?: string) => {
const url = resolveOmsAssetUrl(raw)
return url ? `${url}${url.includes('?') ? '&' : '?'}_t=${stamp}` : ''
}
brandLogoUrls.portal = stampUrl(data?.portalUrl)
brandLogoUrls.site = stampUrl(data?.siteUrl)
brandLogoUrls.favicon = stampUrl(data?.faviconUrl)
brandLogoUrls.mascot = stampUrl(data?.mascotUrl)
const row = (data || {}) as Record<string, any>
brandLogoUrls.portal = resolveBrandLogoDisplayUrl(pickBrandLogoUrl(row, 'portalUrl', 'PortalUrl'))
brandLogoUrls.site = resolveBrandLogoDisplayUrl(pickBrandLogoUrl(row, 'siteUrl', 'SiteUrl'))
brandLogoUrls.favicon = resolveBrandLogoDisplayUrl(pickBrandLogoUrl(row, 'faviconUrl', 'FaviconUrl'))
brandLogoUrls.mascot = resolveBrandLogoDisplayUrl(pickBrandLogoUrl(row, 'mascotUrl', 'MascotUrl'))
}
async function loadBrandLogo() {
@ -1256,52 +1363,194 @@ async function handleWechatTrial(eventCode: string) {
}
}
async function handlePaymentQrUpload(channel: PaymentReceiveQrChannel, option: any) {
const file: File | undefined = option?.fileItem?.file ?? option?.file
if (!file) {
option?.onError?.(new Error('no file'))
function revokePaymentQrLocalPreview(channel: PaymentReceiveQrChannel) {
const prev = paymentQrLocalPreview[channel]
if (prev && prev.startsWith('blob:')) {
URL.revokeObjectURL(prev)
}
paymentQrLocalPreview[channel] = ''
}
function setPaymentQrLocalPreview(channel: PaymentReceiveQrChannel, file: File) {
revokePaymentQrLocalPreview(channel)
paymentQrLocalPreview[channel] = URL.createObjectURL(file)
}
function openPaymentQrPicker(channel: PaymentReceiveQrChannel) {
if (paymentQrUploading[channel]) return
document
.querySelector<HTMLInputElement>(`.brand-logo-card__file[data-channel="qr-${channel}"]`)
?.click()
}
function onPaymentQrDragEnter(channel: PaymentReceiveQrChannel) {
if (paymentQrUploading[channel]) return
paymentQrDragOver[channel] = true
}
function onPaymentQrDragLeave(channel: PaymentReceiveQrChannel, e: DragEvent) {
const current = e.currentTarget as HTMLElement | null
const related = e.relatedTarget as Node | null
if (current && related && current.contains(related)) return
paymentQrDragOver[channel] = false
}
function onPaymentQrDrop(channel: PaymentReceiveQrChannel, e: DragEvent) {
paymentQrDragOver[channel] = false
if (paymentQrUploading[channel]) return
const file = e.dataTransfer?.files?.[0]
if (!isBrandLogoImageFile(file)) {
Message.warning(t('system.otherConfig.paymentQr.invalidFile'))
return
}
void uploadPaymentQrFile(channel, file)
}
function onPaymentQrFileChange(channel: PaymentReceiveQrChannel, e: Event) {
const input = e.target as HTMLInputElement
const file = input.files?.[0]
input.value = ''
if (!isBrandLogoImageFile(file)) {
if (file) Message.warning(t('system.otherConfig.paymentQr.invalidFile'))
return
}
void uploadPaymentQrFile(channel, file)
}
async function uploadPaymentQrFile(channel: PaymentReceiveQrChannel, file: File) {
setPaymentQrLocalPreview(channel, file)
paymentQrUploading[channel] = true
try {
const data = await uploadPaymentReceiveQr(channel, file)
applyPaymentQrDto(data)
option?.onSuccess?.(data)
revokePaymentQrLocalPreview(channel)
Message.success(t('system.otherConfig.paymentQr.uploadSuccess'))
} catch (e: any) {
option?.onError?.(e)
Message.error(e?.message || t('system.otherConfig.paymentQr.uploadFailed'))
} finally {
paymentQrUploading[channel] = false
}
}
async function handleBrandLogoUpload(channel: BrandLogoChannel, option: any) {
const file: File | undefined = option?.fileItem?.file ?? option?.file
if (!file) {
option?.onError?.(new Error('no file'))
async function handlePaymentQrClear(channel: PaymentReceiveQrChannel) {
paymentQrUploading[channel] = true
try {
const data = await clearPaymentReceiveQr(channel)
revokePaymentQrLocalPreview(channel)
applyPaymentQrDto(data)
Message.success(t('system.otherConfig.paymentQr.clearSuccess'))
} catch (e: any) {
Message.error(e?.message || t('system.otherConfig.paymentQr.clearFailed'))
} finally {
paymentQrUploading[channel] = false
}
}
function revokeBrandLogoLocalPreview(channel: BrandLogoChannel) {
const prev = brandLogoLocalPreview[channel]
if (prev && prev.startsWith('blob:')) {
URL.revokeObjectURL(prev)
}
brandLogoLocalPreview[channel] = ''
}
function setBrandLogoLocalPreview(channel: BrandLogoChannel, file: File) {
revokeBrandLogoLocalPreview(channel)
brandLogoLocalPreview[channel] = URL.createObjectURL(file)
}
function isBrandLogoImageFile(file: File | null | undefined): file is File {
if (!file) return false
if (file.type && file.type.startsWith('image/')) return true
return /\.(png|jpe?g|webp|gif|bmp)$/i.test(file.name || '')
}
function openBrandLogoPicker(channel: BrandLogoChannel) {
if (brandLogoUploading[channel]) return
const fileInput = document.querySelector<HTMLInputElement>(
`.brand-logo-card__file[data-channel="${channel}"]`,
)
fileInput?.click()
}
function onBrandLogoDragEnter(channel: BrandLogoChannel) {
if (brandLogoUploading[channel]) return
brandLogoDragOver[channel] = true
}
function onBrandLogoDragLeave(channel: BrandLogoChannel, e: DragEvent) {
const current = e.currentTarget as HTMLElement | null
const related = e.relatedTarget as Node | null
if (current && related && current.contains(related)) return
brandLogoDragOver[channel] = false
}
function onBrandLogoDrop(channel: BrandLogoChannel, e: DragEvent) {
brandLogoDragOver[channel] = false
if (brandLogoUploading[channel]) return
const file = e.dataTransfer?.files?.[0]
if (!isBrandLogoImageFile(file)) {
Message.warning(t('system.otherConfig.brandLogo.invalidFile'))
return
}
void uploadBrandLogoFile(channel, file)
}
function onBrandLogoFileChange(channel: BrandLogoChannel, e: Event) {
const input = e.target as HTMLInputElement
const file = input.files?.[0]
input.value = ''
if (!isBrandLogoImageFile(file)) {
if (file) Message.warning(t('system.otherConfig.brandLogo.invalidFile'))
return
}
void uploadBrandLogoFile(channel, file)
}
async function uploadBrandLogoFile(channel: BrandLogoChannel, file: File) {
setBrandLogoLocalPreview(channel, file)
brandLogoUploading[channel] = true
try {
const data = await uploadBrandLogo(channel, file)
applyBrandLogoDto(data)
if (channel === 'favicon' || data?.faviconUrl) {
applyDocumentFavicon(brandLogoUrls.favicon || data?.faviconUrl)
revokeBrandLogoLocalPreview(channel)
if (channel === 'favicon') {
applyDocumentFavicon(brandLogoUrls.favicon || pickBrandLogoUrl(data as any, 'faviconUrl', 'FaviconUrl'))
}
if (channel === 'mascot' || data?.mascotUrl) {
applyAppMascot(resolveOmsAssetUrl(data?.mascotUrl) || brandLogoUrls.mascot)
if (channel === 'mascot') {
applyAppMascot(
resolveOmsAssetUrl(pickBrandLogoUrl(data as any, 'mascotUrl', 'MascotUrl')) ||
brandLogoUrls.mascot,
)
}
option?.onSuccess?.(data)
Message.success(t('system.otherConfig.brandLogo.uploadSuccess'))
} catch (e: any) {
option?.onError?.(e)
Message.error(e?.message || t('system.otherConfig.brandLogo.uploadFailed'))
} finally {
brandLogoUploading[channel] = false
}
}
async function handleBrandLogoClear(channel: BrandLogoChannel) {
brandLogoUploading[channel] = true
try {
const data = await clearBrandLogo(channel)
revokeBrandLogoLocalPreview(channel)
applyBrandLogoDto(data)
if (channel === 'favicon') {
applyDocumentFavicon('')
}
if (channel === 'mascot') {
applyAppMascot('')
}
Message.success(t('system.otherConfig.brandLogo.clearSuccess'))
} catch (e: any) {
Message.error(e?.message || t('system.otherConfig.brandLogo.clearFailed'))
} finally {
brandLogoUploading[channel] = false
}
}
async function handleSave() {
if (!editingId.value) return
try {
@ -1809,49 +2058,6 @@ onMounted(() => {
min-height: 220px;
}
.payment-qr-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.payment-qr-card {
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
border: 1px solid var(--color-border-2);
border-radius: 8px;
background: #fff;
}
.payment-qr-card__head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 8px;
}
.payment-qr-card__title {
font-size: 14px;
font-weight: 600;
color: var(--color-text-1);
}
.payment-qr-card__preview {
display: flex;
align-items: center;
justify-content: center;
min-height: 220px;
background: var(--color-fill-1, #f7f8fa);
border-radius: 6px;
}
.payment-qr-card__empty {
color: var(--color-text-3);
font-size: 13px;
}
.brand-logo-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@ -1870,9 +2076,18 @@ onMounted(() => {
}
.brand-logo-card__meta {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 8px;
min-width: 0;
}
.brand-logo-card__meta-text {
display: grid;
gap: 4px;
min-width: 0;
flex: 1;
}
.brand-logo-card__title {
@ -1888,6 +2103,11 @@ onMounted(() => {
color: var(--color-text-3);
}
.brand-logo-card__clear {
flex-shrink: 0;
margin-top: -2px;
}
.brand-logo-card__upload {
width: 100%;
flex: 1;
@ -1914,13 +2134,13 @@ onMounted(() => {
justify-content: center;
gap: 8px;
width: 100%;
min-height: 200px;
padding: 20px;
min-height: 148px;
padding: 16px;
border: 1px dashed var(--color-border-3, #c9cdd4);
border-radius: 8px;
background: var(--color-fill-1, #f7f8fa);
cursor: pointer;
overflow: hidden;
cursor: pointer;
transition:
border-color 0.15s ease,
background-color 0.15s ease;
@ -1935,42 +2155,42 @@ onMounted(() => {
background: #fff;
}
&.is-dragover {
border-color: var(--app-primary-color, #1d7281);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
}
&.is-uploading {
cursor: wait;
pointer-events: none;
}
}
.brand-logo-card__file {
position: absolute;
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
.brand-logo-card__img {
max-width: 100%;
max-height: 148px;
max-height: 120px;
object-fit: contain;
display: block;
}
.brand-logo-card__mask {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 8px;
background: rgba(0, 0, 0, 0.45);
color: #fff;
font-size: 13px;
opacity: 0;
transition: opacity 0.15s ease;
.brand-logo-card__img--qr {
max-height: 200px;
}
.brand-logo-card__zone.is-filled:hover .brand-logo-card__mask {
opacity: 1;
}
.brand-logo-card__plus {
font-size: 28px;
.brand-logo-card__mark {
font-size: 22px;
font-weight: 700;
letter-spacing: 0.12em;
line-height: 1;
font-weight: 300;
color: var(--color-text-3);
color: var(--color-text-3, #86909c);
user-select: none;
}
.brand-logo-card__hint {
@ -1979,8 +2199,32 @@ onMounted(() => {
text-align: center;
}
.brand-logo-card__mask {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 8px;
background: rgba(0, 0, 0, 0.45);
color: #fff;
font-size: 13px;
opacity: 0;
transition: opacity 0.15s ease;
pointer-events: none;
&.is-busy {
opacity: 1;
}
}
.brand-logo-card__zone.is-filled:hover .brand-logo-card__mask {
opacity: 1;
}
@media (max-width: 720px) {
.payment-qr-grid,
.brand-logo-grid {
grid-template-columns: 1fr;
}