mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
JeecgBoot 2.4 微服务正式版本发布,基于SpringBoot的低代码平台
This commit is contained in:
@ -5,21 +5,25 @@ import store from '@/store'
|
||||
* 单点登录
|
||||
*/
|
||||
const init = (callback) => {
|
||||
console.log("-------单点登录开始-------");
|
||||
let token = Vue.ls.get(ACCESS_TOKEN);
|
||||
let st = getUrlParam("ticket");
|
||||
let sevice = "http://"+window.location.host+"/";
|
||||
if(token){
|
||||
loginSuccess(callback);
|
||||
}else{
|
||||
if(st){
|
||||
validateSt(st,sevice,callback);
|
||||
}else{
|
||||
let serviceUrl = encodeURIComponent(sevice);
|
||||
window.location.href = window._CONFIG['casPrefixUrl']+"/login?service="+serviceUrl;
|
||||
if (process.env.VUE_APP_SSO == 'true') {
|
||||
console.log("-------单点登录开始-------");
|
||||
let token = Vue.ls.get(ACCESS_TOKEN);
|
||||
let st = getUrlParam("ticket");
|
||||
let sevice = "http://" + window.location.host + "/";
|
||||
if (token) {
|
||||
loginSuccess(callback);
|
||||
} else {
|
||||
if (st) {
|
||||
validateSt(st, sevice, callback);
|
||||
} else {
|
||||
let serviceUrl = encodeURIComponent(sevice);
|
||||
window.location.href = window._CONFIG['casPrefixUrl'] + "/login?service=" + serviceUrl;
|
||||
}
|
||||
}
|
||||
console.log("-------单点登录结束-------");
|
||||
}else{
|
||||
callback && callback()
|
||||
}
|
||||
console.log("-------单点登录结束-------");
|
||||
};
|
||||
const SSO = {
|
||||
init: init
|
||||
|
||||
Reference in New Issue
Block a user