/* var token ;//https://blog.csdn.net/qq_29207823/article/details/81745757 if( $.cookie('BBK_TOKEN') != null && $.cookie('BBK_TOKEN') != ''){ token = $.cookie('BBK_TOKEN'); $.ajax({ type : "get", url : "${loginInfo.SSO_BASE_URL }/user/token/" + token, dataType:"jsonp", //在浏览器地址栏输入上面url没问题,但是ajax不行,https://blog.csdn.net/m_jack/article/details/80497617 jsonp:"callback", error : function(event,request,settiongs){ console.error("tbUser请求失败"); }, success : function(data){ console.log("data="+data); if(data.status == 200){ console.log("user请求成功" + data.data.loginName); $(".username-name").prepend("<strong>"+data.data.loginName+"</strong>"); $("li.user-login").hide(); }else{ console.error("user的数据为空"); } } }); } */ /* var redirect; redirect = "${redirect}";// 在js中使用el表达式需要使用双引号括上 if(redirect == "1"){ var win = window; while(win != win.top){ // 顶层窗口,防止嵌入iframe窗口 win = win.top; } win.location.href = "${redirectUrl}";//将后端重定向的地址取出来,使用win.location.href去实现重定向的要求 } */