优化售后问题单后台位置

This commit is contained in:
yml2213
2026-08-21 20:03:37 +08:00
parent a5c07ebafc
commit 700bda8250
7 changed files with 338 additions and 192 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
import {
ContainerOutlined,
LogoutOutlined,
SafetyCertificateOutlined,
ShoppingOutlined,
UserOutlined,
} from '@ant-design/icons'
@@ -19,6 +20,7 @@ import WorkerAnnouncementBanner from '@/components/worker/WorkerAnnouncementBann
const menuItems: MenuProps['items'] = [
{ key: '/hall', icon: <ShoppingOutlined />, label: '抢单大厅' },
{ key: '/orders', icon: <ContainerOutlined />, label: '我的订单' },
{ key: '/orders/after-sales', icon: <SafetyCertificateOutlined />, label: '售后问题单' },
{ key: '/profile', icon: <UserOutlined />, label: '个人中心' },
]
@@ -97,7 +99,9 @@ export default function WorkerLayout() {
<nav className="worker-mobile-tabbar" aria-label="移动端底部导航">
{tabItems.map((item) => {
const Icon = item.icon
const isActive = currentKey === item.key
const isActive =
currentKey === item.key ||
(currentKey === '/orders/after-sales' && item.key === '/orders')
return (
<button
key={item.key}
@@ -354,6 +358,7 @@ function isRecord(value: unknown): value is Record<string, unknown> {
}
function resolveSelectedKey(pathname: string) {
if (pathname.startsWith('/orders/after-sales')) return '/orders/after-sales'
if (pathname.startsWith('/orders')) return '/orders'
if (pathname.startsWith('/profile')) return '/profile'
return '/hall'