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

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