|
@@ -483,7 +483,10 @@ U.MD.D.getuser = function () {
|
|
|
}, [], { "type": "GET", "withCredentials": true });
|
|
|
}
|
|
|
}else if(Object.keys(userInfo).length === 0 && U.UF.C.queryString('code').length === 32){
|
|
|
- $("#U_MD_HomeC_Pop")[0].close()
|
|
|
+ if($("#U_MD_HomeC_Pop")[0]){
|
|
|
+ $("#U_MD_HomeC_Pop")[0].close()
|
|
|
+ }
|
|
|
+
|
|
|
console.log('新华跳转',U.UF.C.queryString('code'))
|
|
|
let url = "https://cloud.cocorobo.cn/api/getTeacherInfoByCode"
|
|
|
var myHeaders = new Headers();
|
|
@@ -492,7 +495,7 @@ U.MD.D.getuser = function () {
|
|
|
myHeaders.append("Access-Control-Allow-Origin","*")
|
|
|
|
|
|
var raw = JSON.stringify({
|
|
|
- "code": U.UF.C.queryString('code')
|
|
|
+ "code": U.UF.C.queryString('code')
|
|
|
});
|
|
|
|
|
|
var requestOptions = {
|
|
@@ -506,10 +509,11 @@ U.MD.D.getuser = function () {
|
|
|
.then(response => response.text())
|
|
|
.then(result => {
|
|
|
console.log(result)
|
|
|
- if(result.code == 200){
|
|
|
+ let data = JSON.parse(result).data
|
|
|
+ if(JSON.parse(result).code == 200){
|
|
|
US.userInfo = {
|
|
|
- username:result.data.realName,
|
|
|
- userid:result.data.userUniqueId,
|
|
|
+ username:data.realName,
|
|
|
+ userid:data.userUniqueId,
|
|
|
type:1,
|
|
|
userpassword:"",
|
|
|
cclassid:"",
|