矿机租赁系统代码更新

This commit is contained in:
2025-09-26 16:40:38 +08:00
parent d02c7dccf6
commit d1b3357a8e
79 changed files with 22401 additions and 1 deletions

View File

@@ -0,0 +1,250 @@
/**
* @file 路由配置文件
* @description 定义所有电商页面的路由配置
*/
// 商品相关路由
export const productRoutes = [
{
path: '/productList',
name: 'productList',
component: () => import('../views/productList/index.vue'),
meta: {
title: '商品列表',
description: '浏览所有可用商品',
allAuthority: ['all']
}
},
{
path: '/product/:id',
name: 'productDetail',
component: () => import('../views/productDetail/index.vue'),
meta: {
title: '商品详情',
description: '查看商品详细信息',
allAuthority: ['all']
}
}
]
// 购物车相关路由
export const cartRoutes = [
{
path: '/cart',
name: 'cart',
component: () => import('../views/cart/index.vue'),
meta: {
title: '购物车',
description: '管理购物车商品',
allAuthority: ['all']
}
}
]
// 结算相关路由
export const checkoutRoutes = [
{
path: '/checkout',
name: 'checkout',
component: () => import('../views/checkout/index.vue'),
meta: {
title: '订单结算',
description: '完成订单结算',
allAuthority: ['all']
}
}
]
// 个人中心相关路由
export const accountRoutes = [
{
path: '/account',
name: 'account',
component: () => import('../views/account/index.vue'),
redirect: '/account/wallet',
meta: {
title: '个人中心',
description: '管理个人资料和店铺',
allAuthority: ['all']
},
children: [
{
path: 'wallet',
name: 'Wallet',
component: () => import('../views/account/wallet.vue'),
meta: {
title: '我的钱包',
description: '查看钱包余额、充值和提现',
allAuthority: ['all']
}
},
{//充值记录
path: 'rechargeRecord',
name: 'RechargeRecord',
component: () => import('../views/account/rechargeRecord.vue'),
meta: {
title: '充值记录',
description: '查看充值记录',
allAuthority: ['all']
}
},
{//提现记录
path: 'withdrawalHistory',
name: 'WithdrawalHistory',
component: () => import('../views/account/withdrawalHistory.vue'),
meta: {
title: '提现记录',
description: '查看提现记录',
allAuthority: ['all']
}
},
{
path: 'shop-new',
name: 'accountShopNew',
component: () => import('../views/account/shopNew.vue'),
meta: {
title: '新增店铺',
description: '创建新的店铺',
allAuthority: ['all']
}
},
{
path: 'shop-config',
name: 'accountShopConfig',
component: () => import('../views/account/shopConfig.vue'),
meta: {
title: '店铺配置',
description: '配置店铺收款和支付方式',
allAuthority: ['all']
}
},
{
path: 'shops',
name: 'accountMyShops',
component: () => import('../views/account/myShops.vue'),
meta: {
title: '我的店铺',
description: '查看我的店铺信息',
allAuthority: ['all']
}
},
{
path: 'product-new',
name: 'accountProductNew',
component: () => import('../views/account/productNew.vue'),
meta: {
title: '新增商品',
description: '创建新的商品',
allAuthority: ['all']
}
},
{
path: 'products',
name: 'accountProducts',
component: () => import('../views/account/products.vue'),
meta: {
title: '商品列表',
description: '管理店铺下的商品列表',
allAuthority: ['all']
}
},
{
path: 'purchased',
name: 'accountPurchased',
component: () => import('../views/account/purchased.vue'),
meta: {
title: '已购商品',
description: '查看已购买的商品列表',
allAuthority: ['all']
}
},
{
path: 'purchased-detail/:orderItemId',
name: 'PurchasedDetail',
component: () => import('../views/account/purchasedDetail.vue'),
meta: {
title: '已购商品详情',
description: '查看已购商品详细信息',
allAuthority: ['all']
}
},
{
path: 'orders',
name: 'accountOrders',
component: () => import('../views/account/orders.vue'),
meta: {
title: '订单列表',
description: '查看与管理订单(按状态筛选)',
allAuthority: ['all']
}
},
{
path: 'seller-orders',
name: 'accountSellerOrders',
component: () => import('../views/account/SellerOrders.vue'),
meta: {
title: '已售出订单',
description: '卖家侧订单列表',
allAuthority: ['all']
}
},
{
path: 'order-detail/:id',
name: 'accountOrderDetail',
component: () => import('../views/account/orderDetail.vue'),
meta: {
title: '订单详情',
description: '查看订单详细信息',
allAuthority: ['all']
}
},
{
path: 'product-detail/:id',
name: 'accountProductDetail',
component: () => import('../views/account/productDetail.vue'),
meta: {
title: '商品详情',
description: '个人中心 - 商品详情',
allAuthority: ['all']
}
},
{
path: 'product-machine-add',
name: 'accountProductMachineAdd',
component: () => import('../views/account/productMachineAdd.vue'),
meta: {
title: '添加出售机器',
description: '为商品添加出售机器',
allAuthority: ['all']
}
}
]
}
]
// 所有子路由
export const childrenRoutes = [
...productRoutes,
...cartRoutes,
...checkoutRoutes,
...accountRoutes
]
// 主路由配置
export const mainRoutes = [
{
path: '/',
name: 'Home',
component: () => import('../Layout/idnex.vue'),
redirect: '/productList',
children: childrenRoutes
},
// 404页面重定向到商品列表
{
path: '*',
redirect: '/productList'
}
]
export default mainRoutes