|
@@ -328,30 +328,34 @@ U.MD.D.getuser = function () {
|
|
|
if (!LoginState &&!panId && !U.UF.C.queryString('code') && !U.UF.C.queryString('tycode')) {
|
|
|
LoginState = true
|
|
|
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(); //关闭登陆
|
|
|
- // }
|
|
|
- selectUser(_user.userid, (res) => {
|
|
|
- loginSet(res.value[0][0], res);
|
|
|
- });
|
|
|
- }else {
|
|
|
- LoginState = false
|
|
|
- }
|
|
|
+ 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
|
|
|
+ }
|
|
|
|
|
|
- }, [], { "type": "GET", "withCredentials": true });
|
|
|
- }else {
|
|
|
- LoginState = false
|
|
|
- }
|
|
|
- }, [], { "type": "GET", "withCredentials": true });
|
|
|
- }else {
|
|
|
+ }, [], { "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){
|