From 9a487ae9a7064c1792f39178fdaf04b5eef96c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Wed, 9 Sep 2026 18:32:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E6=A1=8C=E9=9D=A2=E7=AB=AF?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=88=A0=E9=99=A4=E4=B8=80=E7=BA=A7=E3=80=8C?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E3=80=8D=E5=85=A5=E5=8F=A3=E2=80=94=E2=80=94?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=B7=B2=E5=B9=B6=E5=85=A5=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E9=A1=B5(/image-video)=E4=BA=8C=E7=BA=A7=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E9=A6=96=E9=A1=B5=E4=BB=85=E4=BF=9D=E7=95=99=20?= =?UTF-8?q?=E4=BA=9A=E9=A9=AC=E9=80=8A/=E8=A7=86=E9=A2=91=EF=BC=8C?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=AE=A1=E7=AE=97=E5=90=8C=E6=AD=A5=E6=B8=85?= =?UTF-8?q?=E7=90=86=20image=20=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/home/DesktopHomePage.vue | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/frontend-vue/src/pages/home/DesktopHomePage.vue b/frontend-vue/src/pages/home/DesktopHomePage.vue index 4b4af2e3..66f266f3 100644 --- a/frontend-vue/src/pages/home/DesktopHomePage.vue +++ b/frontend-vue/src/pages/home/DesktopHomePage.vue @@ -50,14 +50,6 @@ :class="{ disabled: !videoHref }" data-column-key="wb" >视频 - - 图片
{{ toastText }}
@@ -80,17 +72,17 @@ const { checking, updating, currentVersion, hasUpdate, canDownload, hint, checke // 桌面端原 Flask /logout 已随瘦身下线:统一跳登录页并清本地 token(/login?logout=1) const logoutHref = computed(() => `${resolvePageHref('/new_web_source/login.html')}?logout=1`) -type PermissionState = { amazon: boolean; video: boolean; image: boolean } -const permissionState = ref({ amazon: false, video: false, image: false }) +// 桌面端首页仅保留一级入口:亚马逊 / 视频;图片已收进视频页(/image-video)二级菜单。 +type PermissionState = { amazon: boolean; video: boolean } +const permissionState = ref({ amazon: false, video: false }) const permissionUnavailable = ref(false) const permissionReady = ref(false) const amazonHref = computed(() => resolvePageHref('/new_web_source/amazon-console.html')) const videoHref = computed(() => resolvePageHref('/new_web_source/image-video.html')) -const imageHref = computed(() => resolvePageHref('/new_web_source/image.html')) const canShow = computed(() => - permissionUnavailable.value ? { amazon: true, video: true, image: true } : permissionState.value, + permissionUnavailable.value ? { amazon: true, video: true } : permissionState.value, ) function getUid() { @@ -119,15 +111,14 @@ function computePermissionState(items: PermissionMenuItem[]): PermissionState { ;[item.columnKey, item.column_key, item.routePath, item.route_path].forEach((v) => push(allowedKeys, v)) }) const videoVisible = allowedKeys.indexOf('wb') >= 0 - const imageVisible = allowedKeys.indexOf('image') >= 0 let amazonVisible = allowedRootKeys.indexOf('brand_front_tools') >= 0 || allowedRootKeys.indexOf('brand_operation_tools') >= 0 || allowedRootKeys.indexOf('brand_logistics_tools') >= 0 if (!hasRootMetadata) { - amazonVisible = allowedColumnKeys.some((key) => key !== 'wb' && key !== 'image') + amazonVisible = allowedColumnKeys.some((key) => key !== 'wb') } - return { amazon: amazonVisible, video: videoVisible, image: imageVisible } + return { amazon: amazonVisible, video: videoVisible } } async function loadPermissions() { @@ -187,16 +178,14 @@ onMounted(() => { body { font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif; - background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), - url("/bg.jpg") center/cover no-repeat; min-height: 100vh; } .home-root { - /* 背景直接落到根容器,避免依赖 body 被 SPA 全局样式覆盖导致图不显示 */ + /* 背景只挂根容器,不再写全局 body 背景:页面各自的 body 规则会在 SPA 注入顺序上互相覆盖 */ min-height: 100vh; background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), - url("/bg.jpg") center/cover no-repeat; + image-set(url("/bg.webp") 1x, url("/bg.jpg") 1x) center/cover no-repeat #eef3f7; display: flex; flex-direction: column; align-items: center;