chore: 脚手架

This commit is contained in:
dap
2024-08-07 08:57:56 +08:00
parent 4bd4f7490b
commit c31259598b
83 changed files with 2127 additions and 225 deletions

View File

@@ -0,0 +1,42 @@
import { requestClient } from '#/api/request';
/**
* 发送短信验证码
* @param phonenumber 手机号
* @returns void
*/
export function sendSmsCode(phonenumber: string) {
return requestClient.get<void>('/resource/sms/code', {
params: { phonenumber },
});
}
/**
* 发送邮件验证码
* @param email 邮箱
* @returns void
*/
export function sendEmailCode(email: string) {
return requestClient.get<void>('/resource/email/code', {
params: { email },
});
}
/**
* @param img 图片验证码 需要和base64拼接
* @param captchaEnabled 是否开启
* @param uuid 验证码ID
*/
export interface CaptchaResponse {
captchaEnabled: boolean;
img: string;
uuid: string;
}
/**
* 图片验证码
* @returns resp
*/
export function captchaImage() {
return requestClient.get<CaptchaResponse>('/auth/code');
}