|
|
|
@ -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()) {
|
|
|
|
|