|
@@ -11,7 +11,7 @@
|
|
|
* home:logout
|
|
|
*/
|
|
|
|
|
|
-import { QUESTION_API } from "@/constants/constants";
|
|
|
+import { OPEN_API } from "@/constants/constants";
|
|
|
import { USER_SIGNIN } from "../store/user";
|
|
|
import { mapActions } from "vuex";
|
|
|
|
|
@@ -36,13 +36,30 @@ export default {
|
|
|
window.sessionStorage.setItem("returnUrl", data["returnUrl"]);
|
|
|
}
|
|
|
|
|
|
- const url = QUESTION_API + "/sso/login";
|
|
|
+ const url = OPEN_API + "/sso/login";
|
|
|
|
|
|
- data.path = "/admin/login-open";
|
|
|
- const res = await this.$httpWithMsg.post(url, data).catch(() => {});
|
|
|
+ const res = await this.$httpWithMsg
|
|
|
+ .post(
|
|
|
+ url,
|
|
|
+ {
|
|
|
+ account: data.account,
|
|
|
+ name: data.name,
|
|
|
+ roleCode: data.roleCode,
|
|
|
+ courses: data.courses ? JSON.parse(data.courses) : [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headers: {
|
|
|
+ Authorization: data["Authorization"],
|
|
|
+ time: data["time"],
|
|
|
+ },
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .catch(() => {});
|
|
|
|
|
|
if (!res) {
|
|
|
- // window.history.go(-1);
|
|
|
+ setTimeout(() => {
|
|
|
+ window.history.go(-1);
|
|
|
+ }, 1000);
|
|
|
return;
|
|
|
}
|
|
|
|