This commit is contained in:
雷欧(林平凡)
2025-09-18 17:19:58 +08:00
parent 645eac253c
commit 0c1201baee
3 changed files with 139 additions and 19 deletions

View File

@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register','/public/comment'] const whiteList = ['/login', '/register', '/public/comment']
const isWhiteList = (path) => { const isWhiteList = (path) => {
return whiteList.some(pattern => isPathMatch(pattern, path)) return whiteList.some(pattern => isPathMatch(pattern, path))

View File

@@ -28,7 +28,7 @@ import Layout from '@/layout'
} }
*/ */
// 公共路由 // 公共路由(无需权限即可访问)
export const constantRoutes = [ export const constantRoutes = [
{ {
path: '/redirect', path: '/redirect',
@@ -64,13 +64,13 @@ export const constantRoutes = [
{ {
path: '', path: '',
component: Layout, component: Layout,
redirect: 'order/list', redirect: 'index',
children: [ children: [
{ {
path: 'order/list', path: 'index',
component: () => import('@/views/system/orderrows/index'), component: () => import('@/views/index'),
name: 'OrderList', name: 'Index',
meta: { title: '京粉订单', icon: 'order', affix: true } meta: { title: '首页', icon: 'dashboard', affix: true }
} }
] ]
}, },
@@ -88,13 +88,24 @@ export const constantRoutes = [
} }
] ]
}, },
// 公开评论独立页(不使用 Layout无侧边栏
{
path: '/public/comment',
component: () => import('@/views/public/CommentGenerator'),
hidden: true
}
]
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
// 京粉订单管理
{ {
path: '/order', path: '/order',
component: Layout, component: Layout,
redirect: 'list', redirect: 'list',
name: 'Order', name: 'Order',
meta: { title: '京粉订单', icon: 'money' }, meta: { title: '京粉订单', icon: 'money' },
permissions: ['jdorder:order:list'],
children: [ children: [
{ {
path: 'list', path: 'list',
@@ -106,28 +117,26 @@ export const constantRoutes = [
path: 'statistics', path: 'statistics',
component: () => import('@/views/system/orderrows/statistics'), component: () => import('@/views/system/orderrows/statistics'),
name: 'OrderStatistics', name: 'OrderStatistics',
meta: { title: '订单统计', icon: 'chart' } meta: { title: '订单统计', icon: 'chart' },
permissions: ['jdorder:order:statistics']
}, },
{ {
path: 'settings', path: 'settings',
component: () => import('@/views/system/orderrows/settings'), component: () => import('@/views/system/orderrows/settings'),
name: 'OrderSettings', name: 'OrderSettings',
meta: { title: '订单设置', icon: 'setting' } meta: { title: '订单设置', icon: 'setting' },
permissions: ['jdorder:order:settings']
} }
] ]
}, },
// 公开评论独立页(不使用 Layout无侧边栏 // 一键转链工具
{
path: '/public/comment',
component: () => import('@/views/public/CommentGenerator'),
hidden: true
},
{ {
path: '/jdorder', path: '/jdorder',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'Jdorder', name: 'Jdorder',
meta: { title: '一键转链', icon: 'link' }, meta: { title: '一键转链', icon: 'link' },
permissions: ['jdorder:convert:list'],
children: [ children: [
{ {
path: 'index', path: 'index',
@@ -137,12 +146,14 @@ export const constantRoutes = [
} }
] ]
}, },
// 京东指令台
{ {
path: '/jd-instruction', path: '/jd-instruction',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'JdInstruction', name: 'JdInstruction',
meta: { title: '京东指令台', icon: 'guide' }, meta: { title: '京东指令台', icon: 'guide' },
permissions: ['jdorder:instruction:list'],
children: [ children: [
{ {
path: 'index', path: 'index',
@@ -152,12 +163,14 @@ export const constantRoutes = [
} }
] ]
}, },
// 慢单管理
{ {
path: '/sloworder', path: '/sloworder',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'SlowOrder', name: 'SlowOrder',
meta: { title: '下好的慢单', icon: 'list' }, meta: { title: '下好的慢单', icon: 'list' },
permissions: ['jdorder:sloworder:list'],
children: [ children: [
{ {
path: 'index', path: 'index',
@@ -167,12 +180,14 @@ export const constantRoutes = [
} }
] ]
}, },
// 常用商品管理
{ {
path: '/favorite', path: '/favorite',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'Favorite', name: 'Favorite',
meta: { title: '常用商品', icon: 'star' }, meta: { title: '常用商品', icon: 'star' },
permissions: ['jdorder:favorite:list'],
children: [ children: [
{ {
path: 'index', path: 'index',
@@ -182,12 +197,14 @@ export const constantRoutes = [
} }
] ]
}, },
// 线报消息管理
{ {
path: '/message', path: '/message',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'Message', name: 'Message',
meta: { title: '线报消息', icon: 'message' }, meta: { title: '线报消息', icon: 'message' },
permissions: ['jdorder:message:list'],
children: [ children: [
{ {
path: 'index', path: 'index',
@@ -197,12 +214,14 @@ export const constantRoutes = [
} }
] ]
}, },
// 线报群管理
{ {
path: '/xbgroup', path: '/xbgroup',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'Xbgroup', name: 'Xbgroup',
meta: { title: '线报群管理', icon: 'peoples' }, meta: { title: '线报群管理', icon: 'peoples' },
permissions: ['jdorder:xbgroup:list'],
children: [ children: [
{ {
path: 'index', path: 'index',
@@ -212,12 +231,14 @@ export const constantRoutes = [
} }
] ]
}, },
// 系统管理
{ {
path: '/system', path: '/system',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'System', name: 'System',
meta: { title: '系统管理', icon: 'system' }, meta: { title: '系统管理', icon: 'system' },
permissions: ['system:admin:list'],
children: [ children: [
{ {
path: 'superadmin', path: 'superadmin',
@@ -227,10 +248,7 @@ export const constantRoutes = [
} }
] ]
}, },
] // 原有的系统路由
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
{ {
path: '/system/user-auth', path: '/system/user-auth',
component: Layout, component: Layout,

102
src/views/index.vue Normal file
View File

@@ -0,0 +1,102 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="24">
<el-card class="welcome-card">
<div slot="header" class="clearfix">
<span>欢迎使用京粉订单管理系统</span>
</div>
<div class="welcome-content">
<h2>系统首页</h2>
<p>这是一个基于若依框架开发的京粉订单管理系统提供完整的订单管理转链工具指令执行等功能</p>
<el-divider></el-divider>
<el-row :gutter="20" class="feature-cards">
<el-col :span="8">
<el-card shadow="hover" class="feature-card">
<i class="el-icon-s-order feature-icon"></i>
<h3>订单管理</h3>
<p>全面的京粉订单管理功能</p>
</el-card>
</el-col>
<el-col :span="8">
<el-card shadow="hover" class="feature-card">
<i class="el-icon-link feature-icon"></i>
<h3>一键转链</h3>
<p>快速转换京东商品链接</p>
</el-card>
</el-col>
<el-col :span="8">
<el-card shadow="hover" class="feature-card">
<i class="el-icon-setting feature-icon"></i>
<h3>系统管理</h3>
<p>完善的系统配置管理</p>
</el-card>
</el-col>
</el-row>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: "Index",
data() {
return {};
}
};
</script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
}
.welcome-card {
.welcome-content {
text-align: center;
h2 {
color: #303133;
margin-bottom: 20px;
}
p {
color: #606266;
font-size: 16px;
margin-bottom: 30px;
}
}
}
.feature-cards {
margin-top: 30px;
.feature-card {
text-align: center;
transition: transform 0.3s;
&:hover {
transform: translateY(-5px);
}
.feature-icon {
font-size: 48px;
color: #409eff;
margin-bottom: 15px;
}
h3 {
color: #303133;
margin-bottom: 10px;
}
p {
color: #909399;
font-size: 14px;
}
}
}
</style>