提交 0078d673 authored 作者: zyx's avatar zyx

容器化修改统一登录

上级 0ba88a01
......@@ -3,7 +3,8 @@ module.exports = {
DesDir: '../client-dist',
apiBaseURL: '/',
others: {
url: '/app/learn/course'
url: '/app/learn/course',
loginUrl: 'https://login.ezijing.com/sofia/login/index'
},
webpack: {
externals: {
......
......@@ -3,7 +3,8 @@ module.exports = {
DesDir: '../client-dist',
apiBaseURL: '/',
others: {
url: '/app/learn/course'
url: '/app/learn/course',
loginUrl: 'https://login.ezijing.com/sofia/login/index'
},
isUploadStatic: false,
webpack: {
......
......@@ -73,9 +73,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, '/'))
})
// _vIn.$router.push({
// path: '/login/index?rd=' + encodeURIComponent(href.replace(/.*?\/\/.*?\//gi, '/'))
// })
window.location.href = webConf.others.loginUrl + '?rd=' + encodeURIComponent(href.replace(/.*?\/\/.*?\//gi, '/'))
}
}
......
......@@ -24,10 +24,11 @@ export default class Before {
// 检测登录状态
const isLogin = await this.isLogin()
if (!isLogin) {
next({
path: '/login/index',
query: { rd: encodeURIComponent(to.fullPath) }
})
// next({
// path: '/login/index',
// query: { rd: encodeURIComponent(to.fullPath) }
// })
window.location.href = webConf.others.loginUrl + '?rd=' + encodeURIComponent(to.fullPath)
return
}
// 移动端
......
......@@ -126,7 +126,8 @@ export default {
cAction.Other.outLogin()
.then(str => {
window.G.UserInfo = {}
this.$router.push({ path: '/login/index' })
// this.$router.push({ path: '/login/index' })
window.location.href = webConf.others.loginUrl
})
.catch(e => {
this.$message.error(e.message)
......
......@@ -67,7 +67,8 @@ export default {
cAction.Other.outLogin()
.then(str => {
window.G.UserInfo = {}
this.$router.push({ path: '/login/index' })
// this.$router.push({ path: '/login/index' })
window.location.href = webConf.others.loginUrl
})
.catch(e => {
this.$message.error(e.message)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论