专家通道

chengdu
yujialong 4 years ago
parent 705965b5b3
commit cd218d1e88
  1. 2
      src/components/page/Login.vue
  2. 14
      src/main.js

@ -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'

@ -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辑器,该组件不兼容

Loading…
Cancel
Save