更新保存代码

This commit is contained in:
2025-12-24 15:19:57 +08:00
parent ee5ed42a0d
commit c4f4babe1d
8 changed files with 2363 additions and 59 deletions

View File

@@ -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: '*',