From 87af8eda59a2679cb1c9295012adda05b72cde85 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期五, 08 八月 2025 14:28:46 +0800 Subject: [PATCH] feat: 任务 --- src/services/api/auth.ts | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/services/api/auth.ts b/src/services/api/auth.ts index ddc31b1..00b5ddb 100644 --- a/src/services/api/auth.ts +++ b/src/services/api/auth.ts @@ -2,7 +2,7 @@ // @ts-ignore import { request } from '@/utils/request'; -/** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 GET /api/user/auth/getAliyunOSSAcs */ +/** 鑾峰彇闃块噷浜慜SS鎺堟潈淇℃伅 GET /api/user/auth/getAliyunOSSAcs */ export async function getAliyunOSSAcs( // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) params: API.APIgetAliyunOSSAcsParams, @@ -19,7 +19,39 @@ }); } -/** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 POST /api/user/auth/passwordLogin */ +/** 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛鑿滃崟璇︽儏 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榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIgetCurrentLogierMenusParams, + options?: API.RequestConfig +) { + return request<API.GetMenusQueryResultItem[]>('/api/user/auth/getCurrentLogierMenus', { + method: 'GET', + params: { + ...params, + request: undefined, + ...params['request'], + }, + ...(options || {}), + }); +} + +/** 瀵嗙爜鐧诲綍 POST /api/user/auth/passwordLogin */ export async function passwordLogin(body: API.PasswordLoginCommand, options?: API.RequestConfig) { return request<API.PasswordLoginCommandCallback>('/api/user/auth/passwordLogin', { method: 'POST', @@ -30,3 +62,15 @@ ...(options || {}), }); } + +/** 鍙戦�侀獙璇佺爜 POST /api/user/auth/sendVerifyCode */ +export async function sendVerifyCode(body: API.SendVerifyCodeCommand, options?: API.RequestConfig) { + return request<string>('/api/user/auth/sendVerifyCode', { + method: 'POST', + headers: { + 'Content-Type': 'application/json-patch+json', + }, + data: body, + ...(options || {}), + }); +} -- Gitblit v1.9.1