diff --git a/src/permission.js b/src/permission.js index dedb360..4bd390c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request' NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/register','/public/comment'] +const whiteList = ['/login', '/register', '/public/comment'] const isWhiteList = (path) => { return whiteList.some(pattern => isPathMatch(pattern, path)) diff --git a/src/router/index.js b/src/router/index.js index c0dd3bb..626e931 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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, diff --git a/src/views/index.vue b/src/views/index.vue new file mode 100644 index 0000000..f8bd2fc --- /dev/null +++ b/src/views/index.vue @@ -0,0 +1,102 @@ + + + + + + + 欢迎使用京粉订单管理系统 + + + 系统首页 + 这是一个基于若依框架开发的京粉订单管理系统,提供完整的订单管理、转链工具、指令执行等功能。 + + + + + + 订单管理 + 全面的京粉订单管理功能 + + + + + + 一键转链 + 快速转换京东商品链接 + + + + + + 系统管理 + 完善的系统配置管理 + + + + + + + + + + + + +
这是一个基于若依框架开发的京粉订单管理系统,提供完整的订单管理、转链工具、指令执行等功能。
全面的京粉订单管理功能
快速转换京东商品链接
完善的系统配置管理