|
@@ -17,7 +17,7 @@
|
|
|
import Cookies from 'js-cookie'
|
|
|
import { setToken } from '@/utils/auth'
|
|
|
import { getLogoInfo, getUrlConfig } from '@/api/system/publicConfig'
|
|
|
- import { ssoGetLoginUser,initPage,getInfo } from '@/api/login'
|
|
|
+ import { ssoGetLoginUser,logout,initPage,getInfo } from '@/api/login'
|
|
|
|
|
|
export default {
|
|
|
name: 'Login',
|
|
@@ -66,14 +66,14 @@
|
|
|
},
|
|
|
created() {
|
|
|
let url = window.location.href
|
|
|
- debugger
|
|
|
if (url.indexOf('token') != -1) {
|
|
|
console.log('找到了====>')
|
|
|
setToken(url.split('=')[1])
|
|
|
this.getInfo();
|
|
|
} else {
|
|
|
console.log('没找到---->')
|
|
|
- this.ssoGetLoginUser()
|
|
|
+ // this.ssoGetLoginUser()
|
|
|
+ this.logout()
|
|
|
}
|
|
|
localStorage.setItem('windowHref', window.location.href)
|
|
|
},
|
|
@@ -106,6 +106,12 @@
|
|
|
// window.open('https://icas.jnu.edu.cn/cas/login?service=http://localhost:8081/sso/getLoginUser','_self')
|
|
|
})
|
|
|
},
|
|
|
+ //退出
|
|
|
+ logout() {
|
|
|
+ logout(response => {
|
|
|
+ // window.open('https://icas.jnu.edu.cn/cas/login?service=http://localhost:8081/sso/getLoginUser','_self')
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取首页配置
|
|
|
initPage(){
|
|
|
initPage().then(response => {
|