mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-03 22:57:14 +08:00
新增:新增修改邮箱功能,并优化部分以往代码(引入 spring-boot-starter-mail 用于发送邮件验证码)
This commit is contained in:
22
continew-admin-ui/src/api/common/captcha.ts
Normal file
22
continew-admin-ui/src/api/common/captcha.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import axios from 'axios';
|
||||
import qs from 'query-string';
|
||||
|
||||
export interface ImageCaptchaRes {
|
||||
uuid: string;
|
||||
img: string;
|
||||
}
|
||||
export function getImageCaptcha() {
|
||||
return axios.get<ImageCaptchaRes>('/common/captcha/img');
|
||||
}
|
||||
|
||||
export interface MailCaptchaReq {
|
||||
email: string;
|
||||
}
|
||||
export function getMailCaptcha(params: MailCaptchaReq) {
|
||||
return axios.get('/common/captcha/mail', {
|
||||
params,
|
||||
paramsSerializer: (obj) => {
|
||||
return qs.stringify(obj);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user