feat(invitation): 支持分销站点自主配置返利比例与权限隔离
- 后端新增分站专属配置及审计接口(/api/distribution/invitation-config 等),基于分站管理员严格鉴权隔离 - 分销独立后台新增「邀请返利设置」页面(Invitations.tsx),支持分站管理员自主开启/调整返利比例并查看本站流水 - 主站后台邀请接口路径补齐 /admin 前缀,解决 404/401 鉴权作用域问题 - 验证方式:backend 单元测试全数通过,distribution-admin 类型与构建检查通过
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
SkinOutlined,
|
||||
UserOutlined,
|
||||
WalletOutlined,
|
||||
GiftOutlined,
|
||||
} from '@ant-design/icons'
|
||||
import { getMe, logout, type CurrentMember, getStoredToken } from './api'
|
||||
import { MemberContext } from './MemberContext'
|
||||
@@ -29,6 +30,7 @@ import Orders from './pages/Orders'
|
||||
import Wallet from './pages/Wallet'
|
||||
import Announcements from './pages/Announcements'
|
||||
import SiteSettings from './pages/SiteSettings'
|
||||
import Invitations from './pages/Invitations'
|
||||
import Login from './pages/Login'
|
||||
import Storefront from './pages/Storefront'
|
||||
import './style.css'
|
||||
@@ -62,6 +64,11 @@ function MainLayout({ member, onLogout }: { member: CurrentMember; onLogout: ()
|
||||
icon: <SettingOutlined />,
|
||||
label: <Link to="/rules">{member.is_superadmin ? '比例与税费规则' : '合作政策与权益'}</Link>,
|
||||
},
|
||||
{
|
||||
key: '/invitations',
|
||||
icon: <GiftOutlined />,
|
||||
label: <Link to="/invitations">邀请返利设置</Link>,
|
||||
},
|
||||
]
|
||||
|
||||
const selectedKey = menuItems.some((item) => item && 'key' in item && item.key === location.pathname)
|
||||
@@ -162,6 +169,7 @@ function MainLayout({ member, onLogout }: { member: CurrentMember; onLogout: ()
|
||||
<Route path="/sold" element={<Orders kind="sold" />} />
|
||||
<Route path="/receive" element={<Orders kind="receive" />} />
|
||||
<Route path="/orders" element={<Orders kind="all" />} />
|
||||
<Route path="/invitations" element={<Invitations />} />
|
||||
<Route path="*" element={<Navigate to="/" replace />} />
|
||||
</Routes>
|
||||
</Layout.Content>
|
||||
|
||||
Reference in New Issue
Block a user