更新保存代码
This commit is contained in:
@@ -3,6 +3,40 @@
|
||||
* @description 定义所有电商页面的路由配置
|
||||
*/
|
||||
|
||||
// 认证相关路由(独立布局,无Header)
|
||||
export const authRoutes = [
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
component: () => import('../views/auth/login.vue'),
|
||||
meta: {
|
||||
title: '用户登录',
|
||||
description: '登录到您的账户',
|
||||
requiresAuth: false // 不需要登录即可访问
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
name: 'Register',
|
||||
component: () => import('../views/auth/register.vue'),
|
||||
meta: {
|
||||
title: '用户注册',
|
||||
description: '创建新账户',
|
||||
requiresAuth: false
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/reset-password',
|
||||
name: 'ResetPassword',
|
||||
component: () => import('../views/auth/reset-password.vue'),
|
||||
meta: {
|
||||
title: '重置密码',
|
||||
description: '重置您的账户密码',
|
||||
requiresAuth: false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
// 商品相关路由
|
||||
export const productRoutes = [
|
||||
{
|
||||
@@ -100,13 +134,9 @@ export const accountRoutes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
// 兼容旧入口:收款记录 -> 卖家资金流水(收款tab)
|
||||
path: 'receipt-record',
|
||||
name: 'accountReceiptRecord',
|
||||
redirect: (to) => ({
|
||||
path: '/account/seller-funds-flow',
|
||||
query: { ...(to && to.query ? to.query : {}), tab: 'receipt' }
|
||||
}),
|
||||
component: () => import('../views/account/receiptRecord.vue'),
|
||||
meta: {
|
||||
title: '收款记录',
|
||||
description: '卖家收款流水记录',
|
||||
@@ -114,29 +144,15 @@ export const accountRoutes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
// 兼容旧入口:提现记录 -> 卖家资金流水(提现tab)
|
||||
path: 'withdraw-record',
|
||||
name: 'accountWithdrawRecord',
|
||||
redirect: (to) => ({
|
||||
path: '/account/seller-funds-flow',
|
||||
query: { ...(to && to.query ? to.query : {}), tab: 'withdraw' }
|
||||
}),
|
||||
component: () => import('../views/account/withdrawRecord.vue'),
|
||||
meta: {
|
||||
title: '提现记录',
|
||||
description: '卖家提现流水记录',
|
||||
allAuthority: ['all']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'seller-funds-flow',
|
||||
name: 'accountSellerFundsFlow',
|
||||
component: () => import('../views/account/sellerFundsFlow.vue'),
|
||||
meta: {
|
||||
title: '资金流水',
|
||||
description: '卖家收款/提现记录切换查看',
|
||||
allAuthority: ['all']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'shop-new',
|
||||
name: 'accountShopNew',
|
||||
@@ -197,16 +213,6 @@ export const accountRoutes = [
|
||||
allAuthority: ['all']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'purchased-machine-detail/:id',
|
||||
name: 'purchasedMachineDetail',
|
||||
component: () => import('../views/account/purchasedMachineDetail.vue'),
|
||||
meta: {
|
||||
title: '已购商品详情',
|
||||
description: '查看已购买商品的详细信息',
|
||||
allAuthority: ['all']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'funds-flow',
|
||||
name: 'accountFundsFlow',
|
||||
@@ -281,6 +287,10 @@ export const childrenRoutes = [
|
||||
|
||||
// 主路由配置
|
||||
export const mainRoutes = [
|
||||
// 认证路由(独立布局,无Header)
|
||||
...authRoutes,
|
||||
|
||||
// 主应用路由(带Layout)
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
@@ -288,6 +298,7 @@ export const mainRoutes = [
|
||||
redirect: '/productList',
|
||||
children: childrenRoutes
|
||||
},
|
||||
|
||||
// 404页面重定向到商品列表
|
||||
{
|
||||
path: '*',
|
||||
|
||||
Reference in New Issue
Block a user