@ -84,8 +84,12 @@
this._gLogin().then(res => {
setTimeout(() => {
this.spinnerLoading = false
sessionStorage.setItem("sessionId", res.data)
cookies.set('sessionId', res.data,{ path: '/' })
if (res.data.hasOwnProperty("sessionId")) {
let sessionId=res.data.sessionId
sessionStorage.setItem("sessionId", sessionId)
cookies.set('sessionId', sessionId,{ path: '/' })
}
if (this.userName === 'admin') {
window.location.href = `${PUBLIC_PATH}/#/security/tenant`
} else {
@ -76,7 +76,7 @@ io.interceptors.request.use(
let sIdCookie = cookies.get('sessionId')
let sessionId = sessionStorage.getItem("sessionId")
let requstUrl = config.url.substring(config.url.lastIndexOf("/")+1)
if(requstUrl!=='login' && sIdCookie!=sessionId) {
if(sIdCookie !== null && requstUrl!=='login' && sIdCookie!=sessionId) {
window.location.href = `${PUBLIC_PATH}/view/login/index.html`
let { method } = config