提交 a885f771 authored 作者: 王鹏飞's avatar 王鹏飞

跳转统一登录

上级 f68de83a
......@@ -75,10 +75,10 @@ export default class API {
if (/\/login\/index/gi.test(href)) {
_vIn.$router.go(0)
} else {
_vIn.$router.push({
path: '/login/index?rd=' + encodeURIComponent(href.replace(/.*?\/\/.*?\//gi, '/'))
})
// window.location.href = `${webConf.others.loginUrl}'?rd=${encodeURIComponent(window.location.href)}`
// _vIn.$router.push({
// path: '/login/index?rd=' + encodeURIComponent(href.replace(/.*?\/\/.*?\//gi, '/'))
// })
window.location.href = `${webConf.others.loginUrl}'?rd=${encodeURIComponent(window.location.href)}`
}
}
......
......@@ -18,11 +18,11 @@ export default class Before {
// 检测登录状态
const isLogin = await this.isLogin()
if (!isLogin) {
next({
path: '/login/index',
query: { rd: encodeURIComponent(to.fullPath) }
})
// window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
// next({
// path: '/login/index',
// query: { rd: encodeURIComponent(to.fullPath) }
// })
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
return
}
// 移动端
......
......@@ -207,8 +207,8 @@ export default {
cAction.Other.outLogin()
.then(str => {
window.G.UserInfo = {}
this.$router.push({ path: '/login/index' })
// window.location.href = webConf.others.loginUrl
// this.$router.push({ path: '/login/index' })
window.location.href = webConf.others.loginUrl
})
.catch(e => {
this.$message.error(e.message)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论