登录优化

master
杨赟 2 years ago
parent 8e2a11c4c5
commit a7d5126b9a

@ -22,11 +22,15 @@ router.beforeEach((to, from, next) => {
return
}
NProgress.start()
if (!getAuth() && window.location.href.indexOf('authkey') >= 0) {
store.commit('SET_AUTH', {
authKey: getUrlKey('authkey', window.location.href),
sessionId: getUrlKey('sessionid', window.location.href)
})
if (window.location.href.indexOf('authkey') >= 0) {
if (!getAuth()) {
store.commit('SET_AUTH', {
authKey: getUrlKey('authkey', window.location.href),
sessionId: getUrlKey('sessionid', window.location.href)
})
} else {
window.location.href = '/'
}
}
/** 请求头包含授权信息 并且 页面必须授权 直接进入 */
if (getAuth()) {

Loading…
Cancel
Save