打手端迁移至独立子域名
This commit is contained in:
@@ -13,15 +13,15 @@ import { useIsMobile } from '@/utils/use-is-mobile'
|
||||
import { clearWorkerSession, getWorkerStatus, getWorkerUsername } from '@/utils/worker-auth'
|
||||
|
||||
const menuItems: MenuProps['items'] = [
|
||||
{ key: '/worker/hall', icon: <ShoppingOutlined />, label: '抢单大厅' },
|
||||
{ key: '/worker/orders', icon: <ContainerOutlined />, label: '我的订单' },
|
||||
{ key: '/worker/profile', icon: <UserOutlined />, label: '个人中心' },
|
||||
{ key: '/hall', icon: <ShoppingOutlined />, label: '抢单大厅' },
|
||||
{ key: '/orders', icon: <ContainerOutlined />, label: '我的订单' },
|
||||
{ key: '/profile', icon: <UserOutlined />, label: '个人中心' },
|
||||
]
|
||||
|
||||
const tabItems = [
|
||||
{ key: '/worker/hall', icon: ShoppingOutlined, label: '抢单大厅' },
|
||||
{ key: '/worker/orders', icon: ContainerOutlined, label: '我的订单' },
|
||||
{ key: '/worker/profile', icon: UserOutlined, label: '个人中心' },
|
||||
{ key: '/hall', icon: ShoppingOutlined, label: '抢单大厅' },
|
||||
{ key: '/orders', icon: ContainerOutlined, label: '我的订单' },
|
||||
{ key: '/profile', icon: UserOutlined, label: '个人中心' },
|
||||
]
|
||||
|
||||
export default function WorkerLayout() {
|
||||
@@ -41,7 +41,7 @@ export default function WorkerLayout() {
|
||||
} finally {
|
||||
clearWorkerSession()
|
||||
message.success('已退出登录')
|
||||
navigate('/worker/login', { replace: true })
|
||||
navigate('/', { replace: true })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,9 +144,9 @@ export default function WorkerLayout() {
|
||||
}
|
||||
|
||||
function resolveSelectedKey(pathname: string) {
|
||||
if (pathname.startsWith('/worker/orders')) return '/worker/orders'
|
||||
if (pathname.startsWith('/worker/profile')) return '/worker/profile'
|
||||
return '/worker/hall'
|
||||
if (pathname.startsWith('/orders')) return '/orders'
|
||||
if (pathname.startsWith('/profile')) return '/profile'
|
||||
return '/hall'
|
||||
}
|
||||
|
||||
function formatWorkerStatus(status: string) {
|
||||
|
||||
Reference in New Issue
Block a user