|
@@ -321,27 +321,37 @@ U.MD.D.getuser = function () {
|
|
|
// $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gif/longhuaBg.gif")'
|
|
|
var userInfo = US.userInfo;
|
|
|
var panId = userInfo && userInfo.accountNumber
|
|
|
- if (!panId && !U.UF.C.queryString('code') && !U.UF.C.queryString('tycode')) {
|
|
|
+ if (!LoginState && !panId && !U.UF.C.queryString('code') && !U.UF.C.queryString('tycode')) {
|
|
|
var _cookie = U.UF.Cookie.get("cocorobo");
|
|
|
- if (!panId && _cookie) {
|
|
|
- U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
|
- if (res.value && res.value[0] && res.value[0][0]) {
|
|
|
- var _user = res.value[0][0];
|
|
|
- U.A.Request(US.Config.edu + "admin/userinfo/userinfoById/" + _user.userid, [], function (res) {
|
|
|
- if (res.value && res.value[0] && res.value[0][0]) {
|
|
|
- US.userInfo = res.value[0][0]; //记录用户数据
|
|
|
- US.userInfo.userid = _user.userid;
|
|
|
- if ($("#U_MD_HomeC_Pop")[0]) {
|
|
|
- $("#U_MD_HomeC_Pop")[0].close(); //关闭登陆
|
|
|
+ try {
|
|
|
+ if (!panId && _cookie) {
|
|
|
+ U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
|
|
|
+ if (res.value && res.value[0] && res.value[0][0]) {
|
|
|
+ var _user = res.value[0][0];
|
|
|
+ U.A.Request(US.Config.edu + "admin/userinfo/userinfoById/" + _user.userid, [], function (res) {
|
|
|
+ if (res.value && res.value[0] && res.value[0][0]) {
|
|
|
+ US.userInfo = res.value[0][0]; //记录用户数据
|
|
|
+ US.userInfo.userid = _user.userid;
|
|
|
+ // if ($("#U_MD_HomeC_Pop")[0]) {
|
|
|
+ // $("#U_MD_HomeC_Pop")[0].close(); //关闭登陆
|
|
|
+ // }
|
|
|
+ selectUser(_user.userid, (res) => {
|
|
|
+ loginSet(res.value[0][0], res);
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ LoginState = false
|
|
|
}
|
|
|
- selectUser(_user.userid, (res) => {
|
|
|
- loginSet(res.value[0][0], res);
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
- }, [], { "type": "GET", "withCredentials": true });
|
|
|
- }
|
|
|
- }, [], { "type": "GET", "withCredentials": true });
|
|
|
+ }, [], { "type": "GET", "withCredentials": true });
|
|
|
+ }else {
|
|
|
+ LoginState = false
|
|
|
+ }
|
|
|
+ }, [], { "type": "GET", "withCredentials": true });
|
|
|
+ }else {
|
|
|
+ LoginState = false
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ LoginState = false
|
|
|
}
|
|
|
}else if(!LoginState && !panId && U.UF.C.queryString('code').length === 32){
|
|
|
if($("#U_MD_HomeC_Pop")[0]){
|