|
@@ -60,6 +60,20 @@ export const constantRoutes = [
|
|
|
]
|
|
|
},
|
|
|
|
|
|
+ // 404 page must be placed at the end !!!
|
|
|
+ {
|
|
|
+ path: '*',
|
|
|
+ redirect: '/404',
|
|
|
+ hidden: true
|
|
|
+ }
|
|
|
+];
|
|
|
+
|
|
|
+// TODO 上方菜单搬运下方,在meta追加roles
|
|
|
+/**
|
|
|
+ * asyncRoutes
|
|
|
+ * the routes that need to be dynamically loaded based on user roles
|
|
|
+ */
|
|
|
+export const asyncRoutes = [
|
|
|
{
|
|
|
path: '/statistics',
|
|
|
component: Layout,
|
|
@@ -67,7 +81,8 @@ export const constantRoutes = [
|
|
|
name: '数据统计',
|
|
|
meta: {
|
|
|
title: '数据统计',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
@@ -75,8 +90,9 @@ export const constantRoutes = [
|
|
|
name: '下载照片',
|
|
|
component: () => import('@/views/statistics/downloadImage/index'),
|
|
|
meta: {
|
|
|
- title: '下载照片'
|
|
|
+ title: '下载照片',
|
|
|
// icon: 'table'
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -84,8 +100,9 @@ export const constantRoutes = [
|
|
|
name: '上传照片',
|
|
|
component: () => import('@/views/statistics/uploadImage/index'),
|
|
|
meta: {
|
|
|
- title: '上传照片'
|
|
|
+ title: '上传照片',
|
|
|
// icon: 'tree'
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -93,8 +110,9 @@ export const constantRoutes = [
|
|
|
name: '提现记录',
|
|
|
component: () => import('@/views/statistics/withdrawalRecord/index'),
|
|
|
meta: {
|
|
|
- title: '提现记录'
|
|
|
+ title: '提现记录',
|
|
|
// icon: 'tree'
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -107,16 +125,19 @@ export const constantRoutes = [
|
|
|
name: '摄影师',
|
|
|
meta: {
|
|
|
title: '摄影师',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'photoer', 'photoer_management']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
|
path: 'PhotoVerify',
|
|
|
name: '摄影师', // add by 梁展鹏 20210723 因为只有一个菜单,所以暂时把菜单名称写到这里。实际上这里是"照片管理"
|
|
|
- component: () => import('@/views/photographerManagement/photoVerify/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photographerManagement/photoVerify/index'),
|
|
|
meta: {
|
|
|
- title: '摄影师'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '摄影师',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'photoer', 'photoer_management']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -129,7 +150,8 @@ export const constantRoutes = [
|
|
|
name: '图片库管理',
|
|
|
meta: {
|
|
|
title: '图片库管理',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'photo_management', 'photoer_management']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
@@ -137,26 +159,31 @@ export const constantRoutes = [
|
|
|
name: '活动列表',
|
|
|
component: () => import('@/views/photoManagement/eventsList/index'),
|
|
|
meta: {
|
|
|
- title: '活动列表'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '活动列表',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'photoer_management']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
path: 'ImageGoodsManagement',
|
|
|
name: '照片商品管理',
|
|
|
- component: () => import('@/views/photoManagement/imageGoodsManagement/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photoManagement/imageGoodsManagement/index'),
|
|
|
meta: {
|
|
|
- title: '照片商品管理'
|
|
|
- // icon: 'table'
|
|
|
+ title: '照片商品管理',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin', 'photo_management']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
path: 'PhotoVerifyManagement',
|
|
|
name: '上传照片审核',
|
|
|
- component: () => import('@/views/photoManagement/photoVerifyManagement/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photoManagement/photoVerifyManagement/index'),
|
|
|
meta: {
|
|
|
- title: '上传照片审核'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '上传照片审核',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'photoer_management']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -169,16 +196,19 @@ export const constantRoutes = [
|
|
|
name: '认证管理',
|
|
|
meta: {
|
|
|
title: '认证管理',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'photoer_management', 'business']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
|
path: 'PhotographerVerify',
|
|
|
name: '摄影师认证审核',
|
|
|
- component: () => import('@/views/photographerManagement/photographerVerify/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photographerManagement/photographerVerify/index'),
|
|
|
meta: {
|
|
|
- title: '摄影师认证审核'
|
|
|
- // icon: 'table'
|
|
|
+ title: '摄影师认证审核',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin', 'photoer_management']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -186,8 +216,9 @@ export const constantRoutes = [
|
|
|
name: '场景审核',
|
|
|
component: () => import('@/views/sceneManagement/sceneVerify/index'),
|
|
|
meta: {
|
|
|
- title: '场景审核'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '场景审核',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'business']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -195,8 +226,9 @@ export const constantRoutes = [
|
|
|
name: '场景列表',
|
|
|
component: () => import('@/views/sceneManagement/sceneList/index'),
|
|
|
meta: {
|
|
|
- title: '场景列表'
|
|
|
- // icon: 'table'
|
|
|
+ title: '场景列表',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin', 'business']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -209,7 +241,8 @@ export const constantRoutes = [
|
|
|
name: '会员管理',
|
|
|
meta: {
|
|
|
title: '会员管理',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
@@ -217,8 +250,9 @@ export const constantRoutes = [
|
|
|
name: '会员等级',
|
|
|
component: () => import('@/views/memberManagement/memberLever/index'),
|
|
|
meta: {
|
|
|
- title: '会员等级'
|
|
|
- // icon: 'table'
|
|
|
+ title: '会员等级',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -226,8 +260,9 @@ export const constantRoutes = [
|
|
|
name: '会员列表',
|
|
|
component: () => import('@/views/memberManagement/memberList/index'),
|
|
|
meta: {
|
|
|
- title: '会员列表'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '会员列表',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -240,16 +275,19 @@ export const constantRoutes = [
|
|
|
name: '财务管理',
|
|
|
meta: {
|
|
|
title: '财务管理',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'finance']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
|
path: 'OrderManagement',
|
|
|
name: '订单列表',
|
|
|
- component: () => import('@/views/financialManagement/orderManagement/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/financialManagement/orderManagement/index'),
|
|
|
meta: {
|
|
|
- title: '订单列表'
|
|
|
- // icon: 'table'
|
|
|
+ title: '订单列表',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin', 'finance']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -257,8 +295,9 @@ export const constantRoutes = [
|
|
|
name: '用户资金明细',
|
|
|
component: () => import('@/views/financialManagement/cashDetail/index'),
|
|
|
meta: {
|
|
|
- title: '用户资金明细'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '用户资金明细',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'finance']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -266,8 +305,9 @@ export const constantRoutes = [
|
|
|
name: '积分设置',
|
|
|
component: () => import('@/views/pointsManagement/pointsSetting/index'),
|
|
|
meta: {
|
|
|
- title: '积分设置'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '积分设置',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'finance']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -280,7 +320,8 @@ export const constantRoutes = [
|
|
|
name: '积分管理',
|
|
|
meta: {
|
|
|
title: '积分管理',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
@@ -288,8 +329,9 @@ export const constantRoutes = [
|
|
|
name: '积分明细',
|
|
|
component: () => import('@/views/pointsManagement/pointsDetail/index'),
|
|
|
meta: {
|
|
|
- title: '积分明细'
|
|
|
- // icon: 'table'
|
|
|
+ title: '积分明细',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -302,7 +344,8 @@ export const constantRoutes = [
|
|
|
name: '基础管理',
|
|
|
meta: {
|
|
|
title: '基础管理',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'operate', 'designer']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
@@ -310,17 +353,20 @@ export const constantRoutes = [
|
|
|
name: '热搜词管理',
|
|
|
component: () => import('@/views/baseManagement/trending/index'),
|
|
|
meta: {
|
|
|
- title: '热搜词管理'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '热搜词管理',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
path: 'BannerManagement',
|
|
|
name: 'Banner管理',
|
|
|
- component: () => import('@/views/baseManagement/bannerManagement/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/baseManagement/bannerManagement/index'),
|
|
|
meta: {
|
|
|
- title: 'Banner管理'
|
|
|
- // icon: 'table'
|
|
|
+ title: 'Banner管理',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin', 'designer']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -328,17 +374,20 @@ export const constantRoutes = [
|
|
|
name: '资讯管理',
|
|
|
component: () => import('@/views/baseManagement/infoManagement/index'),
|
|
|
meta: {
|
|
|
- title: '资讯管理'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '资讯管理',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
path: 'ProblemFeedbackManagement',
|
|
|
name: '问题管理',
|
|
|
- component: () => import('@/views/baseManagement/problemFeedbackManagement/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/baseManagement/problemFeedbackManagement/index'),
|
|
|
meta: {
|
|
|
- title: '问题管理'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '问题管理',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -351,25 +400,30 @@ export const constantRoutes = [
|
|
|
name: '系统管理',
|
|
|
meta: {
|
|
|
title: '系统管理',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
|
path: 'AccountManagement',
|
|
|
name: '账号列表',
|
|
|
- component: () => import('@/views/systemManagement/accountManagement/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/systemManagement/accountManagement/index'),
|
|
|
meta: {
|
|
|
- title: '账号列表'
|
|
|
- // icon: 'table'
|
|
|
+ title: '账号列表',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
path: 'RoleManagement',
|
|
|
name: '角色列表',
|
|
|
- component: () => import('@/views/systemManagement/roleManagement/index'),
|
|
|
+ component: () =>
|
|
|
+ import('@/views/systemManagement/roleManagement/index'),
|
|
|
meta: {
|
|
|
- title: '角色列表'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '角色列表',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -382,7 +436,8 @@ export const constantRoutes = [
|
|
|
name: '帮助信息',
|
|
|
meta: {
|
|
|
title: '帮助信息',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
+ icon: 'el-icon-s-help',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
@@ -390,8 +445,9 @@ export const constantRoutes = [
|
|
|
name: '问题分类',
|
|
|
component: () => import('@/views/helpInfo/issueType/index'),
|
|
|
meta: {
|
|
|
- title: '问题分类'
|
|
|
- // icon: 'table'
|
|
|
+ title: '问题分类',
|
|
|
+ // icon: 'table',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -399,28 +455,15 @@ export const constantRoutes = [
|
|
|
name: '信息内容',
|
|
|
component: () => import('@/views/helpInfo/information/index'),
|
|
|
meta: {
|
|
|
- title: '信息内容'
|
|
|
- // icon: 'tree'
|
|
|
+ title: '信息内容',
|
|
|
+ // icon: 'tree',
|
|
|
+ roles: ['admin', 'operate']
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
-
|
|
|
- // 404 page must be placed at the end !!!
|
|
|
- {
|
|
|
- path: '*',
|
|
|
- redirect: '/404',
|
|
|
- hidden: true
|
|
|
}
|
|
|
];
|
|
|
|
|
|
-/**
|
|
|
- * asyncRoutes
|
|
|
- * the routes that need to be dynamically loaded based on user roles
|
|
|
- */
|
|
|
-export const asyncRoutes = [
|
|
|
-];
|
|
|
-
|
|
|
const createRouter = () =>
|
|
|
new Router({
|
|
|
// mode: 'history', // require service support
|