|
|
|
|
@ -4,8 +4,7 @@ import type { AuthApi } from '#/api';
|
|
|
|
|
import { onMounted } from 'vue';
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
|
|
|
|
|
|
|
import { DEFAULT_TENANT_ID } from '@vben/constants';
|
|
|
|
|
import { preferences } from '@vben/preferences';
|
|
|
|
|
import { DEFAULT_TENANT_ID, LOGIN_PATH } from '@vben/constants';
|
|
|
|
|
import { useAccessStore } from '@vben/stores';
|
|
|
|
|
import { cn } from '@vben/utils';
|
|
|
|
|
|
|
|
|
|
@ -64,15 +63,15 @@ onMounted(async () => {
|
|
|
|
|
await authCallback(data);
|
|
|
|
|
message.success(`${source}授权成功`);
|
|
|
|
|
} else {
|
|
|
|
|
// todo
|
|
|
|
|
// 这里内部已经做了跳转到首页的操作
|
|
|
|
|
await authStore.authLogin(data as any);
|
|
|
|
|
message.success(`${source}登录成功`);
|
|
|
|
|
}
|
|
|
|
|
} catch {
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(error);
|
|
|
|
|
// 500 你还没有绑定第三方账号,绑定后才可以登录!
|
|
|
|
|
} finally {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
router.push(preferences.app.defaultHomePath);
|
|
|
|
|
router.push(LOGIN_PATH);
|
|
|
|
|
}, 1500);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|