From f0dff8b7537d5c91eb2dc67242a4a31a5649eaae Mon Sep 17 00:00:00 2001 From: Charles7c Date: Fri, 27 Dec 2024 00:22:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/auth/index.ts | 2 +- src/apis/auth/type.ts | 8 ++++---- src/stores/modules/user.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apis/auth/index.ts b/src/apis/auth/index.ts index 4695757..bde5040 100644 --- a/src/apis/auth/index.ts +++ b/src/apis/auth/index.ts @@ -42,5 +42,5 @@ export const getUserInfo = () => { /** @desc 获取路由信息 */ export const getUserRoute = () => { - return http.get(`${BASE_URL}/route`) + return http.get(`${BASE_URL}/user/route`) } diff --git a/src/apis/auth/type.ts b/src/apis/auth/type.ts index a8a42e4..09afcea 100644 --- a/src/apis/auth/type.ts +++ b/src/apis/auth/type.ts @@ -43,10 +43,10 @@ export interface RouteItem { /** 认证类型 */ export enum AuthTypeEnum { - ACCOUNT = 'account', - PHONE = 'phone', - EMAIL = 'email', - SOCIAL_AUTH = 'socialAuth', + ACCOUNT = 'ACCOUNT', + PHONE = 'PHONE', + EMAIL = 'EMAIL', + SOCIAL = 'SOCIAL', } export interface AuthReq { clientId: string diff --git a/src/stores/modules/user.ts b/src/stores/modules/user.ts index c8e5895..6964ee7 100644 --- a/src/stores/modules/user.ts +++ b/src/stores/modules/user.ts @@ -72,7 +72,7 @@ const storeSetup = () => { // 三方账号登录 const socialLogin = async (source: string, req: any) => { - const res = await socialLoginApi({ ...req, source, clientId: import.meta.env.VITE_CLIENT_ID, authType: AuthTypeEnum.SOCIAL_AUTH }) + const res = await socialLoginApi({ ...req, source, clientId: import.meta.env.VITE_CLIENT_ID, authType: AuthTypeEnum.SOCIAL }) setToken(res.data.token) token.value = res.data.token }