update 处理内部用户登录地址跳转IAM登录页
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
NODE_ENV=production
|
||||
VUE_APP_PLATFORM_NAME=JeroBoot 企业级快速开发平台
|
||||
VUE_APP_SSO=false
|
||||
VUE_TAG_FLAG=0
|
||||
VUE_TAG_FLAG=0
|
||||
VUE_APP_LOGIN_PAGE='/user/login'
|
||||
+2
-1
@@ -1,2 +1,3 @@
|
||||
NODE_ENV=development
|
||||
VUE_APP_TAG_FLAG=0
|
||||
VUE_APP_TAG_FLAG=0
|
||||
VUE_APP_LOGIN_PAGE='/user/login'
|
||||
+2
-1
@@ -1,2 +1,3 @@
|
||||
NODE_ENV=production
|
||||
VUE_APP_TAG_FLAG=1
|
||||
VUE_APP_TAG_FLAG=1
|
||||
VUE_APP_LOGIN_PAGE='https://iam-uat.sinotruk.com:7011/idp/oauth2/authorize?redirect_uri=http://laws-test.sinotruk.com/dashboard/analysis&state=123&client_id=SRMS&response_type=code'
|
||||
@@ -2,4 +2,5 @@ NODE_ENV=production
|
||||
VUE_APP_API_BASE_URL=http://boot.jero.com:8080/laws-sinotruk
|
||||
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://fileview.jero.com/onlinePreview
|
||||
VUE_APP_TAG_FLAG=1
|
||||
VUE_APP_TAG_FLAG=1
|
||||
VUE_APP_LOGIN_PAGE='/user/login'
|
||||
@@ -27,7 +27,8 @@ module.exports = {
|
||||
paymentMethod: '缴费方式',
|
||||
expenseReimbursement: '费用列支',
|
||||
meetingMaterial: '会议资料',
|
||||
pleaseEnterCorrectPhone: '请输入正确格式的电话'
|
||||
pleaseEnterCorrectPhone: '请输入正确格式的电话',
|
||||
addUpToFourLevels: '该节点无法添加子节点'
|
||||
},
|
||||
// 问答库
|
||||
questionAnswer: {
|
||||
|
||||
@@ -215,7 +215,7 @@ export default {
|
||||
content: '真的要注销登录吗 ?',
|
||||
onOk () {
|
||||
return that.Logout({}).then(() => {
|
||||
window.location.replace('/user/login')
|
||||
window.location.replace(process.env.VUE_APP_LOGIN_PAGE)
|
||||
}).catch(err => {
|
||||
that.$message.warning({
|
||||
title: '错误',
|
||||
|
||||
@@ -172,3 +172,9 @@ export const StandardizedActivityType = new EsEnums({
|
||||
workingTeam: { text: '工作组', value: '3' },
|
||||
fourLevelBiddingCommittee: { text: '分标委', value: '4' }
|
||||
})
|
||||
|
||||
// 支付状态
|
||||
export const PayState = new EsEnums({
|
||||
已支付: { text: '已支付', value: '1' },
|
||||
未支付: { text: '未支付', value: '2' }
|
||||
})
|
||||
|
||||
@@ -116,13 +116,22 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (to.path === '/user/login' && isOAuth2AppEnv()) {
|
||||
next({ path: OAUTH2_LOGIN_PAGE_PATH })
|
||||
} else {
|
||||
let path = to.path
|
||||
// 在免登录白名单,直接进入
|
||||
if (to.path === '/user/login' && to.path !== process.env.VUE_APP_LOGIN_PAGE) {
|
||||
window.location.replace(process.env.VUE_APP_LOGIN_PAGE)
|
||||
return
|
||||
}
|
||||
next()
|
||||
}
|
||||
NProgress.done()
|
||||
} else {
|
||||
// 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面
|
||||
const path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : '/user/login'
|
||||
if (path === '/user/login' && path !== process.env.VUE_APP_LOGIN_PAGE) {
|
||||
window.location.replace(process.env.VUE_APP_LOGIN_PAGE)
|
||||
return
|
||||
}
|
||||
next({ path: path, query: { redirect: to.fullPath } })
|
||||
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ const user = {
|
||||
window.location.href = process.env.VUE_APP_CAS_BASE_URL + '/logout?service=' + serviceUrl
|
||||
}
|
||||
resolve()
|
||||
window.location.replace('/user/login')
|
||||
window.location.replace(process.env.VUE_APP_LOGIN_PAGE)
|
||||
}).catch(() => {
|
||||
resolve()
|
||||
})
|
||||
|
||||
@@ -39,7 +39,7 @@ const err = (error) => {
|
||||
break
|
||||
}
|
||||
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||
if (token && data.includes('Token失效')) {
|
||||
if (data.includes('Token失效')) {
|
||||
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
|
||||
if (/wxwork|dingtalk/i.test(navigator.userAgent)) {
|
||||
Vue.prototype.$Jmessage.loading('登录已过期,正在重新登陆', 0)
|
||||
|
||||
Reference in New Issue
Block a user