|
@@ -6,7 +6,13 @@ import { Message } from 'element-ui';
|
|
export default (router) => {
|
|
export default (router) => {
|
|
router.beforeEach((to, from, next) => {
|
|
router.beforeEach((to, from, next) => {
|
|
if (to.path.includes('dev')) {
|
|
if (to.path.includes('dev')) {
|
|
- if (!$dev_env) next('/');
|
|
|
|
|
|
+ if (_.get(store, 'state.user.role.code') === 'sadmin') {
|
|
|
|
+ next();
|
|
|
|
+ return;
|
|
|
|
+ } else if (!$dev_env) {
|
|
|
|
+ next('/');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 检查是不是登陆,登陆页面放过
|
|
// 检查是不是登陆,登陆页面放过
|
|
if (to.path === '/login') {
|
|
if (to.path === '/login') {
|