From 5694090781fb8badc7ab31d9a4a38de1856d5eda Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期五, 08 八月 2025 16:30:54 +0800 Subject: [PATCH] feat: 接口对接 --- packages/services/apiV2/auth.ts | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 43 insertions(+), 1 deletions(-) diff --git a/packages/services/apiV2/auth.ts b/packages/services/apiV2/auth.ts index db28f67..f783319 100644 --- a/packages/services/apiV2/auth.ts +++ b/packages/services/apiV2/auth.ts @@ -19,6 +19,21 @@ }); } +/** 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛鑿滃崟璇︽儏 GET /api/user/auth/getCurrentLogierMenu */ +export async function getCurrentLogierMenu( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIgetCurrentLogierMenuParams, + options?: API.RequestConfig +) { + return request<API.GetMenuQueryResult>('/api/user/auth/getCurrentLogierMenu', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} + /** 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛鑿滃崟 GET /api/user/auth/getCurrentLogierMenus */ export async function getCurrentLogierMenus( // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) @@ -38,7 +53,34 @@ /** 瀵嗙爜鐧诲綍 POST /api/user/auth/passwordLogin */ export async function passwordLogin(body: API.PasswordLoginCommand, options?: API.RequestConfig) { - return request<API.PasswordLoginCommandCallback>('/api/user/auth/passwordLogin', { + return request<API.LoginCommandCallback>('/api/user/auth/passwordLogin', { + method: 'POST', + headers: { + 'Content-Type': 'application/json-patch+json', + }, + data: body, + ...(options || {}), + }); +} + +/** 鍙戦�佺櫥褰曟垨娉ㄥ唽鐭俊 POST /api/user/auth/sendLoginOrRegisterVerifyCode */ +export async function sendLoginOrRegisterVerifyCode( + body: API.SendLoginOrRegisterVerifyCodeCommand, + options?: API.RequestConfig +) { + return request<string>('/api/user/auth/sendLoginOrRegisterVerifyCode', { + method: 'POST', + headers: { + 'Content-Type': 'application/json-patch+json', + }, + data: body, + ...(options || {}), + }); +} + +/** 鐭俊鐧诲綍 POST /api/user/auth/smsLogin */ +export async function smsLogin(body: API.SmsLoginCommand, options?: API.RequestConfig) { + return request<API.LoginCommandCallback>('/api/user/auth/smsLogin', { method: 'POST', headers: { 'Content-Type': 'application/json-patch+json', -- Gitblit v1.9.1