执法的单点登录那边 你加个判断 取当前浏览器的ip地址

zhangtao
laozt 1 year ago
parent 57a5ad55e3
commit 141ce15162

@ -2,7 +2,7 @@
# @Author: 张涛
# @Date: 2023-07-18 13:04:50
# @LastEditors: 张涛
# @LastEditTime: 2023-10-18 16:40:13
# @LastEditTime: 2023-10-27 14:12:24
# @FilePath: \suzhouyingjiPC\.env.development
###
# 页面标题
@ -17,16 +17,16 @@ VUE_APP_BASE_API = 'http://localhost:13002'
# VUE_APP_BASE_API = 'http://180.108.205.123:13002'
# 统一登录-内网
# VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
VUE_APP_SSO_LOGIN_N = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-内网
# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
VUE_APP_SSO_LOGOUT_N ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 统一登录-外网
VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
VUE_APP_SSO_LOGIN_W = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-外网
VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
VUE_APP_SSO_LOGOUT_W ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -10,16 +10,16 @@ ENV = 'production'
VUE_APP_BASE_API = 'http://180.108.205.123:13002'
n
# 统一登录-内网
# VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
VUE_APP_SSO_LOGIN_N = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-内网
# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
VUE_APP_SSO_LOGOUT_N ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 统一登录-外网
VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
VUE_APP_SSO_LOGIN_W = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-外网
VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
VUE_APP_SSO_LOGOUT_W ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -135,7 +135,10 @@ export default {
);
if (isGovernmentAffairsNetwork == "1") {
localStorage.removeItem("isGovernmentAffairsNetwork");
location.href = process.env.VUE_APP_SSO_LOGOUT;
location.href =
window.location.hostname == "180.108.205.123"
? process.env.VUE_APP_SSO_LOGOUT_W
: process.env.VUE_APP_SSO_LOGOUT_N;
} else {
localStorage.removeItem("isGovernmentAffairsNetwork");
location.href = "/login?redirect=%2Findex";

@ -130,7 +130,10 @@ export default {
// console.log("");
if (isGovernmentAffairsNetwork == "1") {
localStorage.removeItem("isGovernmentAffairsNetwork");
location.href = process.env.VUE_APP_SSO_LOGOUT;
location.href =
window.location.hostname == "180.108.205.123"
? process.env.VUE_APP_SSO_LOGOUT_W
: process.env.VUE_APP_SSO_LOGOUT_N;
} else {
localStorage.removeItem("isGovernmentAffairsNetwork");
location.href = "/login?redirect=%2Findex";

@ -82,7 +82,10 @@ router.beforeEach((to, from, next) => {
});
})
.catch((err) => {
location.href = process.env.VUE_APP_SSO_LOGIN;
location.href =
window.location.hostname == "180.108.205.123"
? process.env.VUE_APP_SSO_LOGIN_W
: process.env.VUE_APP_SSO_LOGIN_N;
});
} else {
// console.log('没code')
@ -91,7 +94,10 @@ router.beforeEach((to, from, next) => {
next();
NProgress.done();
} else {
location.href = process.env.VUE_APP_SSO_LOGIN;
location.href =
window.location.hostname == "180.108.205.123"
? process.env.VUE_APP_SSO_LOGIN_W
: process.env.VUE_APP_SSO_LOGIN_N;
NProgress.done();
}
}

Loading…
Cancel
Save