优化积分充值、余额告警、开放文档与面包屑层级路径

This commit is contained in:
yml2213
2026-08-04 14:39:45 +08:00
parent 16b508eb9b
commit 68cf35b272
2 changed files with 22 additions and 2 deletions
+21 -1
View File
@@ -983,12 +983,32 @@ export default function MerchantCenter({ fixedTab, title = '商户中心' }: Mer
] ]
const fixedTabContent = tabItems.find((item) => item.key === fixedTab)?.children const fixedTabContent = tabItems.find((item) => item.key === fixedTab)?.children
const parentCategoryMap: Record<string, string> = {
products: '商品管理',
orders: '订单管理',
wallet: '积分管理',
api: '开放 API',
callbacks: '开放 API',
members: '员工管理',
}
const currentTabKey = fixedTab ?? activeTab
const parentGroup = parentCategoryMap[currentTabKey]
const computedBreadcrumbs = useMemo(() => {
const pageTitle = title === '商品' ? '商品列表' : title
if (parentGroup) {
return [{ title: parentGroup }, { title: pageTitle }]
}
return [{ title: pageTitle }]
}, [parentGroup, title])
return ( return (
<div> <div>
<PageHeader <PageHeader
title={title} title={title}
subtitle={merchant ? `${merchant.name} (${merchant.code}) · 当前身份: ${merchantRole ? roleText(merchantRole) : '-'}` : '商户配置与管理中心'} subtitle={merchant ? `${merchant.name} (${merchant.code}) · 当前身份: ${merchantRole ? roleText(merchantRole) : '-'}` : '商户配置与管理中心'}
breadcrumbs={[{ title: title }]} breadcrumbs={computedBreadcrumbs}
extra={ extra={
<Button icon={<ReloadOutlined />} loading={loading} onClick={loadAll}> <Button icon={<ReloadOutlined />} loading={loading} onClick={loadAll}>
+1 -1
View File
@@ -318,7 +318,7 @@ export default function PlatformMerchants() {
<PageHeader <PageHeader
title="平台商户管理" title="平台商户管理"
subtitle="平台管理员维护各分销商户租户、分配商品库、配置手续费费率与积分调整" subtitle="平台管理员维护各分销商户租户、分配商品库、配置手续费费率与积分调整"
breadcrumbs={[{ title: '商户管理' }]} breadcrumbs={[{ title: '平台管理' }, { title: '商户管理' }]}
extra={ extra={
<Space> <Space>
<Button icon={<ReloadOutlined />} onClick={() => load()}> <Button icon={<ReloadOutlined />} onClick={() => load()}>