|
@@ -323,13 +323,16 @@ U.MD.D.error = function (errorMessage, scripturi, linenumber, columnnumber, erro
|
|
|
let CookieS = ""
|
|
let CookieS = ""
|
|
|
let CookieCheckTimes = 0
|
|
let CookieCheckTimes = 0
|
|
|
let isPanL = false
|
|
let isPanL = false
|
|
|
|
|
+let _loginInFlight = false
|
|
|
U.MD.D.getuser = function () {
|
|
U.MD.D.getuser = function () {
|
|
|
// $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gif/longhuaBg.gif")'
|
|
// $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gif/longhuaBg.gif")'
|
|
|
var userInfo = US.userInfo;
|
|
var userInfo = US.userInfo;
|
|
|
if (Object.keys(userInfo).length === 0 && !U.UF.C.queryString('code')) {
|
|
if (Object.keys(userInfo).length === 0 && !U.UF.C.queryString('code')) {
|
|
|
var _cookie = U.UF.Cookie.get("cocorobo");
|
|
var _cookie = U.UF.Cookie.get("cocorobo");
|
|
|
- if (Object.keys(userInfo).length === 0 && _cookie) {
|
|
|
|
|
|
|
+ if (Object.keys(userInfo).length === 0 && _cookie && !_loginInFlight) {
|
|
|
|
|
+ _loginInFlight = true;
|
|
|
U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
|
|
|
+ _loginInFlight = false;
|
|
|
if (res.value && res.value[0] && res.value[0][0]) {
|
|
if (res.value && res.value[0] && res.value[0][0]) {
|
|
|
var _user = res.value[0][0];
|
|
var _user = res.value[0][0];
|
|
|
U.A.Request(US.Config.edu + "admin/userinfo/userinfoById/" + _user.userid, [], function (res) {
|
|
U.A.Request(US.Config.edu + "admin/userinfo/userinfoById/" + _user.userid, [], function (res) {
|
|
@@ -581,9 +584,11 @@ U.MD.D.getuser = function () {
|
|
|
var _cookie = U.UF.Cookie.get("cocorobo");
|
|
var _cookie = U.UF.Cookie.get("cocorobo");
|
|
|
if(!CookieS){
|
|
if(!CookieS){
|
|
|
CookieS = _cookie
|
|
CookieS = _cookie
|
|
|
- }else if(_cookie != CookieS){
|
|
|
|
|
|
|
+ }else if(_cookie != CookieS && !_loginInFlight){
|
|
|
|
|
+ _loginInFlight = true;
|
|
|
US.userInfo = {}
|
|
US.userInfo = {}
|
|
|
U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
|
|
|
+ _loginInFlight = false;
|
|
|
if (res.value && res.value[0] && res.value[0][0]) {
|
|
if (res.value && res.value[0] && res.value[0][0]) {
|
|
|
var _user = res.value[0][0];
|
|
var _user = res.value[0][0];
|
|
|
U.A.Request(US.Config.edu + "admin/userinfo/userinfoById/" + _user.userid, [], function (res) {
|
|
U.A.Request(US.Config.edu + "admin/userinfo/userinfoById/" + _user.userid, [], function (res) {
|
|
@@ -603,11 +608,13 @@ U.MD.D.getuser = function () {
|
|
|
LoginState = false
|
|
LoginState = false
|
|
|
}
|
|
}
|
|
|
}, [], { "type": "GET", "withCredentials": true });
|
|
}, [], { "type": "GET", "withCredentials": true });
|
|
|
- }else if(_cookie && !isPanL){
|
|
|
|
|
|
|
+ }else if(_cookie && !isPanL && !_loginInFlight){
|
|
|
CookieCheckTimes++
|
|
CookieCheckTimes++
|
|
|
if (CookieCheckTimes % 5 !== 0) return;
|
|
if (CookieCheckTimes % 5 !== 0) return;
|
|
|
isPanL = true
|
|
isPanL = true
|
|
|
|
|
+ _loginInFlight = true;
|
|
|
U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
|
|
|
+ _loginInFlight = false;
|
|
|
if (res.value && res.value[0] && res.value[0][0]) {
|
|
if (res.value && res.value[0] && res.value[0][0]) {
|
|
|
isPanL = false
|
|
isPanL = false
|
|
|
}else if(res.status && res.status.status != 0){
|
|
}else if(res.status && res.status.status != 0){
|