feat(admin): 账号域三页平台分侧+京东上架额度收口(V206/V207)

This commit is contained in:
2026-11-17 03:29:33 +08:00
parent 764eeb2914
commit 5c7a310ee7
58 changed files with 2796 additions and 1455 deletions
@@ -7,7 +7,7 @@ import { joinAdminPath } from '@/config/app'
import { pageTitleOf, topbarUserOf } from '@/layout/topbar-model'
import { groupKeysForActive, toSidebarEntries } from '@/layout/menu-mapper'
import { filterMenuTreeByPlatform, visiblePlatformsFor } from '@/layout/platform-menu-filter'
import { PLATFORM_TABS, platformOfMenuKey } from '@/config/platform-scope'
import { PLATFORM_TABS, platformsOfMenuKey } from '@/config/platform-scope'
import { usePlatformTabStore } from '@/stores/platform-tab'
import { firstVisiblePath } from '@/router/helpers'
import {
@@ -58,12 +58,15 @@ watch(
)
// 直达 URL/面包屑跳到另一平台的页面时,tab 指示自动跟过去(与侧边栏保持一致)。
// 双侧清单里的页面(账号域三页)两个 tab 都算归属:当前 tab 已含它就不动。
watch(
() => route.meta.menuKey as string | undefined,
(menuKey) => {
if (!menuKey) return
const target = platformOfMenuKey(menuKey)
if (target !== platformTab.active && visibleTabIds.value.includes(target)) {
const owners = platformsOfMenuKey(menuKey)
if (owners.includes(platformTab.active)) return
const target = owners.find((platform) => visibleTabIds.value.includes(platform))
if (target && target !== platformTab.active) {
platformTab.setActive(target)
}
},
@@ -71,11 +74,12 @@ watch(
)
// 切到另一侧 tab 时当前页多半不在那边:跳到该侧第一个可见页;该侧为空(tab 不可见)则不动。
// 双侧清单里的页面(账号域三页)切 tab 不跳转——页面自己按当前平台过滤数据。
watch(
() => platformTab.active,
(tab) => {
const menuKey = route.meta.menuKey as string | undefined
if (!menuKey || platformOfMenuKey(menuKey) === tab) return
if (!menuKey || platformsOfMenuKey(menuKey).includes(tab)) return
const first = firstVisiblePath(filterMenuTreeByPlatform(session.menuTree, tab))
if (first) void router.replace(first)
},