From b6718315db5bc793e9193902854e2097417a32ea Mon Sep 17 00:00:00 2001 From: Guwan Date: Sat, 7 Dec 2024 16:36:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B3=A8=E5=86=8C=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/api/user.ts b/src/api/user.ts index dafc55e..6639c95 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -53,9 +53,12 @@ import type { ApiResponse, PageResult } from './common/types' */ export interface LoginParams { - phone: string + activeTab: string + username: string password: string - verifyCode?: string + phone: string + email: string + code: string } export interface RegisterParams { @@ -101,27 +104,24 @@ export interface UserQueryParams { // 用户API接口 export const userApi = { - + //注册 register(data: RegisterParams) { return request.post('/user/register', data) }, - // 手机号密码登录 + // 登录 login(data: LoginParams) { - return request.post>('/auth/login', data) + return request.post>('/user/login', data) }, - - - // 发送验证码 sendVerifyEmailCode(email: string) { return request.post('/user/getEmailCode', { email }) }, // 发送验证码 sendVerifyPhoneCode(phone: string) { - return request.post('/user/getphoneCode', { phone }) + return request.post('/user/getPhoneCode', { phone }) }, // 获取当前登录用户信息