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

跳转统一登录

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