|
@@ -15,7 +15,7 @@ router.beforeEach((to, from, next) => {
|
|
|
if(to.meta.permission){
|
|
if(to.meta.permission){
|
|
|
const role = localStorage.getItem('ms_username');
|
|
const role = localStorage.getItem('ms_username');
|
|
|
// 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
|
|
// 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
|
|
|
- role === 'admin' ? next() : next('/login');
|
|
|
|
|
|
|
+ role === 'admin' ? next() : next('/403');
|
|
|
}else{
|
|
}else{
|
|
|
// 简单的判断IE10及以下不进入富文本编辑器,该组件不兼容
|
|
// 简单的判断IE10及以下不进入富文本编辑器,该组件不兼容
|
|
|
if(navigator.userAgent.indexOf('MSIE') > -1 && to.path === '/editor'){
|
|
if(navigator.userAgent.indexOf('MSIE') > -1 && to.path === '/editor'){
|