perf:完善第三方登录后逻辑
This commit is contained in:
@@ -166,7 +166,7 @@ import useUserStore from "@/stores/user";
|
|||||||
import useConfigStore from "@/stores/config";
|
import useConfigStore from "@/stores/config";
|
||||||
|
|
||||||
const configStore = useConfigStore();
|
const configStore = useConfigStore();
|
||||||
const { loginFun, registerFun, setToken } = useAuths();
|
const { loginFun, registerFun, loginSuccess } = useAuths();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const loginFormRef = ref();
|
const loginFormRef = ref();
|
||||||
@@ -321,7 +321,7 @@ const handleGiteeLogin = () => {
|
|||||||
|
|
||||||
window.addEventListener("message", async (e) => {
|
window.addEventListener("message", async (e) => {
|
||||||
const { authData, type } = e.data;
|
const { authData, type } = e.data;
|
||||||
setToken(authData);
|
await loginSuccess({ token: authData });
|
||||||
if (e.data) {
|
if (e.data) {
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user