mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2026-01-15 02:57:09 +08:00
20 lines
538 B
TypeScript
20 lines
538 B
TypeScript
import http from '@/utils/http'
|
|
import type * as Common from './type'
|
|
|
|
const BASE_URL = '/captcha'
|
|
|
|
/** @desc 获取图片验证码 */
|
|
export function getImageCaptcha() {
|
|
return http.get<Common.ImageCaptchaResp>(`${BASE_URL}/image`)
|
|
}
|
|
|
|
/** @desc 获取短信验证码 */
|
|
export function getSmsCaptcha(query: { phone: string }) {
|
|
return http.get<boolean>(`${BASE_URL}/sms`, query)
|
|
}
|
|
|
|
/** @desc 获取邮箱验证码 */
|
|
export function getEmailCaptcha(query: { email: string }) {
|
|
return http.get<boolean>(`${BASE_URL}/mail`, query)
|
|
}
|