From 287c667d6815e3263d12fa1541d9270890892328 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Wed, 17 Apr 2024 21:04:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=AE=8C=E5=96=84=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2=E5=85=B6=E4=BB=96=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/auth/index.ts | 5 +++ src/apis/auth/type.ts | 5 +++ src/views/home/components/WorkCard.vue | 1 - src/views/login/index.vue | 44 ++++++++++++++++++++++++-- 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/src/apis/auth/index.ts b/src/apis/auth/index.ts index e600191..399c8a3 100644 --- a/src/apis/auth/index.ts +++ b/src/apis/auth/index.ts @@ -22,3 +22,8 @@ export const getUserInfo = () => { export const getUserRoute = () => { return http.get(`${BASE_URL}/route`) } + +/** @desc 第三方登录授权 */ +export function socialAuth(source: string) { + return http.get(`/oauth/${source}`) +} \ No newline at end of file diff --git a/src/apis/auth/type.ts b/src/apis/auth/type.ts index 05b29f4..1ef2cd3 100644 --- a/src/apis/auth/type.ts +++ b/src/apis/auth/type.ts @@ -51,3 +51,8 @@ export interface AccountLoginReq { export interface LoginResp { token: string } + +// 第三方登录授权类型 +export interface SocialAuthAuthorizeResp { + authorizeUrl: string; +} \ No newline at end of file diff --git a/src/views/home/components/WorkCard.vue b/src/views/home/components/WorkCard.vue index 90a0a8e..f64cd4b 100644 --- a/src/views/home/components/WorkCard.vue +++ b/src/views/home/components/WorkCard.vue @@ -39,7 +39,6 @@ const userStore = useUserStore() } .card { - margin-top: $margin; .content { padding: 8px 20px; .welcome { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 0bf8de9..896e916 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -50,13 +50,24 @@ 登录 + - - + +