提交 c35fd61a authored 作者: huaxinzhu's avatar huaxinzhu

Merge branch 'modify_login' into M-2.6

......@@ -4,4 +4,4 @@ NODE_ENV = production
ENV = 'staging'
#gfast管理系统/测试环境
VUE_APP_BASE_API = 'http://192.168.26.179:6605/api/v1'
VUE_APP_BASE_API = '/api/v1'
......@@ -134,6 +134,7 @@ export default {
.catch(() => {
})
sessionStorage.removeItem('saveTitle')
},
async logout() {
this.$confirm('确定退出系统吗?', '提示', {
......@@ -145,9 +146,9 @@ export default {
let ssa = window.location.host
let ht = document.location.protocol
if(ssa =='localhost:1024'){
window.location.href=ht+'//'+this.ssourl +'/logout?redirect='+ht+'//'+ssa+'/login'
window.location.href=ht+'//'+this.ssourl +'/api/v2/logout?redirect='+ht+'//'+ssa+'/login'
}else{
window.location.href=ht+'//'+this.ssourl +'/logout?redirect='+ht+'//'+ssa+'/login'
window.location.href=ht+'//'+this.ssourl +'/api/v2/logout?redirect='+ht+'//'+ssa+'/login'
}
})
})
......
......@@ -16,7 +16,11 @@ router.beforeEach((to, from, next) => {
const hasToken = getToken()
// console.log("getToken()",getToken())
if (hasToken) {
getPageTitle()
if (sessionStorage.getItem('saveTitle')) {
document.title = sessionStorage.getItem('saveTitle')
} else {
getPageTitle()
}
/* has token*/
if (to.path === '/platformlogin') {
......
......@@ -8,6 +8,7 @@ export default function getPageTitle() {
getBaseSettingTitle({ type: 'SHOP' }).then(res => {
if (res.code == 1) {
document.title = res.data
sessionStorage.setItem('saveTitle', res.data)
}
})
}
\ No newline at end of file
......@@ -785,14 +785,14 @@
store.dispatch('LogOut').then(() => {
let ssa = window.location.host;
let ht = document.location.protocol;
window.location.href = ht + '//' + this.ssourl + '/login?redirect=' + ht + '//' + ssa + '/platformlogin'
window.location.href = ht + '//' + this.ssourl + '/login.html?redirect=' + ht + '//' + ssa + '/platformlogin'
})
},
// 去登录
toLogin() {
let ssa = window.location.host;
let ht = document.location.protocol;
window.location.href = ht + '//' + this.ssourl + '/login?redirect=' + ht + '//' + ssa + '/platformlogin'
window.location.href = ht + '//' + this.ssourl + '/login.html?redirect=' + ht + '//' + ssa + '/platformlogin'
// window.location.href = 'http://sso.jxhh.com/login?redirect=http://' + window.location.host + '/platformlogin'
}
......
......@@ -67,9 +67,9 @@ export default {
var that = this
setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href=ht+'//'+that.ssourl+'/login?redirect='+ht+'//'+ssa+'/platformlogin'
window.location.href=ht+'//'+that.ssourl+'/login.html?redirect='+ht+'//'+ssa+'/platformlogin'
}else{
window.location.href=ht+'//'+that.ssourl+'/login?redirect='+ht+'//'+ssa+'/platformlogin'
window.location.href=ht+'//'+that.ssourl+'/login.html?redirect='+ht+'//'+ssa+'/platformlogin'
}
}, 1000)
}
......
......@@ -89,9 +89,9 @@
let that = this
setTimeout(function () {
if (ssa == 'localhost:1024') {
window.location.href = ht+'//'+that.ssourl+'/logout?redirect='+ht+'//' + ssa + '/login'
window.location.href = ht+'//'+that.ssourl+'/api/v2/logout?redirect='+ht+'//' + ssa + '/login'
} else {
window.location.href = ht+'//'+that.ssourl+'/logout?redirect='+ht+'//' + ssa + '/login'
window.location.href = ht+'//'+that.ssourl+'/api/v2/logout?redirect='+ht+'//' + ssa + '/login'
}
}, 1000)
}
......@@ -104,9 +104,9 @@
let that = this
setTimeout(function () {
if (ssa == 'localhost:1024') {
window.location.href = ht+'//'+that.ssourl+'/logout?redirect='+ht+'//' + ssa + '/login'
window.location.href = ht+'//'+that.ssourl+'/api/v2/logout?redirect='+ht+'//' + ssa + '/login'
} else {
window.location.href = ht+'//'+that.ssourl+'/logout?redirect='+ht+'//' + ssa + '/login'
window.location.href = ht+'//'+that.ssourl+'/api/v2/logout?redirect='+ht+'//' + ssa + '/login'
}
}, 1000)
this.loading = false
......
......@@ -366,9 +366,9 @@
var ssa = window.location.host
setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
window.location.href='http://sso.jxhh.com/api/v2/logout?redirect=http://'+ssa+'/login'
}else{
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
window.location.href='http://sso.jxhh.com/api/v2/logout?redirect=http://'+ssa+'/login'
}
}, 1000)
})
......@@ -394,9 +394,9 @@
var ssa = window.location.host
setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
window.location.href='http://sso.jxhh.com/api/v2/logout?redirect=http://'+ssa+'/login'
}else{
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
window.location.href='http://sso.jxhh.com/api/v2/logout?redirect=http://'+ssa+'/login'
}
}, 1000)
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论