|
|
|
|
@ -19,7 +19,7 @@ router.beforeEach(async(to, from, next) => {
|
|
|
|
|
document.title = getPageTitle(to.meta.title)
|
|
|
|
|
|
|
|
|
|
if (/^\/index\/.*/.test(to.path)) {
|
|
|
|
|
setToken('31|wFxoNgXTLwNke7CCjfCyFYd3x4s9WG74VKpYyi8S','ReceptionTokenKey')
|
|
|
|
|
//setToken('31|wFxoNgXTLwNke7CCjfCyFYd3x4s9WG74VKpYyi8S','ReceptionTokenKey')
|
|
|
|
|
|
|
|
|
|
if (getToken('ReceptionTokenKey')) {
|
|
|
|
|
next()
|
|
|
|
|
@ -33,7 +33,7 @@ router.beforeEach(async(to, from, next) => {
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
let redirectUri = encodeURIComponent(window.location.href)
|
|
|
|
|
window.location.href = `https://sso.szhct.edu.cn/cas/oauth2.0/authorize?client_id=d05e4c9d07f705ef&redirect_uri=${redirectUri}&response_type=code&scope=base_api&state=wyd`
|
|
|
|
|
window.location.href = `${process.env.VUE_APP_AUTH_BASE_API}?client_id=d05e4c9d07f705ef&redirect_uri=${redirectUri}&response_type=code&scope=base_api&state=wyd`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|