重构前端:拆分路由模块
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
export const accountRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
component: () => import('@/views/account/LoginView.vue'),
|
||||
},
|
||||
{
|
||||
path: '/orders/create',
|
||||
name: 'order-create',
|
||||
component: () => import('@/views/account/OrderCreateView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/orders',
|
||||
name: 'orders',
|
||||
component: () => import('@/views/account/OrdersView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/orders/:id',
|
||||
name: 'order-detail',
|
||||
component: () => import('@/views/account/OrderDetailView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/wallet',
|
||||
name: 'wallet',
|
||||
component: () => import('@/views/account/WalletView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/notifications',
|
||||
name: 'notifications',
|
||||
component: () => import('@/views/account/NotificationsView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/realname',
|
||||
name: 'realname',
|
||||
component: () => import('@/views/account/RealnameView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user