优化售后问题单后台位置
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user