|
@@ -192,6 +192,12 @@ export default {
|
|
}
|
|
}
|
|
}, 1000);
|
|
}, 1000);
|
|
if (this.isEPCC) {
|
|
if (this.isEPCC) {
|
|
|
|
+ const redirectUrl = new URLSearchParams(location.search).get(
|
|
|
|
+ "redirectUrl"
|
|
|
|
+ );
|
|
|
|
+ if (redirectUrl) {
|
|
|
|
+ sessionStorage.setItem("redirectUrl", redirectUrl);
|
|
|
|
+ }
|
|
this.login();
|
|
this.login();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -203,9 +209,6 @@ export default {
|
|
},
|
|
},
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- if (this.$route.query.redirectUrl) {
|
|
|
|
- sessionStorage.setItem("redirectUrl", this.$route.query.redirectUrl);
|
|
|
|
- }
|
|
|
|
|
|
|
|
this.isElectron = typeof nodeRequire != "undefined";
|
|
this.isElectron = typeof nodeRequire != "undefined";
|
|
|
|
|
|
@@ -304,6 +307,8 @@ export default {
|
|
loginResponse = await this.epccLogin();
|
|
loginResponse = await this.epccLogin();
|
|
if (!loginResponse) {
|
|
if (!loginResponse) {
|
|
return;
|
|
return;
|
|
|
|
+ } else {
|
|
|
|
+ loginResponse.data = { content: loginResponse.data, code: "200" }; // 和老接口的always ok保持一致
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let data = loginResponse.data;
|
|
let data = loginResponse.data;
|
|
@@ -364,6 +369,7 @@ export default {
|
|
}
|
|
}
|
|
this.$router.push("/online-exam");
|
|
this.$router.push("/online-exam");
|
|
window._hmt.push(["_trackEvent", "登录页面", "登录成功"]);
|
|
window._hmt.push(["_trackEvent", "登录页面", "登录成功"]);
|
|
|
|
+ this.$Spin.hide();
|
|
} catch (error) {
|
|
} catch (error) {
|
|
window._hmt.push([
|
|
window._hmt.push([
|
|
"_trackEvent",
|
|
"_trackEvent",
|
|
@@ -376,6 +382,10 @@ export default {
|
|
duration: 15,
|
|
duration: 15,
|
|
closable: true,
|
|
closable: true,
|
|
});
|
|
});
|
|
|
|
+ if (this.isEPCC) {
|
|
|
|
+ this.$Spin.hide();
|
|
|
|
+ this.logout();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
window._hmt.push(["_trackEvent", "登录页面", "登录失败", data.desc]);
|
|
window._hmt.push(["_trackEvent", "登录页面", "登录失败", data.desc]);
|
|
@@ -635,35 +645,17 @@ export default {
|
|
) {
|
|
) {
|
|
try {
|
|
try {
|
|
const response = await this.$http.post(
|
|
const response = await this.$http.post(
|
|
- "/api/ecs_core/auth/thirdPartyStudentAccess",
|
|
|
|
- {
|
|
|
|
- accountType,
|
|
|
|
- accountValue,
|
|
|
|
- rootOrgId,
|
|
|
|
- appId,
|
|
|
|
- timestamp,
|
|
|
|
- token,
|
|
|
|
- }
|
|
|
|
|
|
+ "/api/ecs_core/auth/thirdPartyStudentAccess" + location.search
|
|
);
|
|
);
|
|
return response;
|
|
return response;
|
|
} catch (error) {
|
|
} catch (error) {
|
|
window._hmt.push(["_trackEvent", "第三方登录页面", "接口出错", ""]);
|
|
window._hmt.push(["_trackEvent", "第三方登录页面", "接口出错", ""]);
|
|
- this.$Modal.error({
|
|
|
|
- title: "返回",
|
|
|
|
- content: "第三方登录访问错误",
|
|
|
|
- onOk: () => {
|
|
|
|
- history.back();
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
|
|
+ this.$Spin.hide();
|
|
|
|
+ this.logout();
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.$Modal.error({
|
|
|
|
- title: "返回",
|
|
|
|
- content: "第三方登录参数错误",
|
|
|
|
- onOk: () => {
|
|
|
|
- history.back();
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
|
|
+ this.$Spin.hide();
|
|
|
|
+ this.logout();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|