diff --git a/src/components/page/Login.vue b/src/components/page/Login.vue index 8f744f6..3cc5ee6 100644 --- a/src/components/page/Login.vue +++ b/src/components/page/Login.vue @@ -52,7 +52,7 @@ export default { }, methods:{ toClient(){ - location.href = location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdclient/#/login' : 'http://122.9.154.146/kdclient/#/login' + location.href = location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdclient/#/login' : 'http://122.9.154.146/kdclient/#/clientLogin' }, toMang(){ location.href = location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdserver/#/login' : 'http://122.9.154.146/kdserver/#/login' diff --git a/src/main.js b/src/main.js index 22cda38..b48185c 100644 --- a/src/main.js +++ b/src/main.js @@ -52,20 +52,12 @@ Vue.prototype.NumberMul = function(arg1, arg2) { router.beforeEach((to, from, next) => { document.title = config.title; const role = sessionStorage.getItem('kd_client_username'); - if (!role && to.path !== '/login') { - next('/login') - // if(to.fullPath != '/404' && to.fullPath != '/'){ - // next({ - // path: '/login', - // query: {redirect: to.fullPath} - // }) - // }else{ - // next('/login') - // } + if (!role && to.path !== '/login' && to.path !== '/clientLogin') { + next('/clientLogin') } else if (to.meta.permission) { // 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已 role === 'admin' ? next() : next('/403'); - } else if(role && to.path == '/login') { + } else if(role && to.path == '/clientLogin') { next('/dashboard') } else { // 简单的判断IE10及以下不进入富文本编000000000000辑器,该组件不兼容