feat: 新增行为验证码

This commit is contained in:
Yoofff
2024-05-17 07:29:59 +00:00
committed by Charles7c
parent 30222b08ab
commit 778b3c677f
10 changed files with 1316 additions and 6 deletions

View File

@@ -17,3 +17,13 @@ export function getSmsCaptcha(query: { phone: string }) {
export function getEmailCaptcha(query: { email: string }) {
return http.get<boolean>(`${BASE_URL}/mail`, query)
}
/** @desc 获取行为验证码 */
export function getBehaviorCaptcha(params: any) {
return http.get<Common.BehaviorCaptchaRes>(`${BASE_URL}/behavior`, {params});
}
/** @desc 校验行为验证码 */
export function checkBehaviorCaptcha(params: any) {
return http.post<Common.CheckBehaviorCaptchaRes>(`${BASE_URL}/behavior`, params);
}

View File

@@ -18,3 +18,27 @@ export interface DashboardNoticeResp {
title: string
type: number
}
/* 行为验证码类型 */
export interface BehaviorCaptchaReq {
captchaType?: string
captchaVerification?: string
clientUid?: string
}
export interface BehaviorCaptchaRes {
originalImageBase64: string
point: {
x: number
y: number
}
jigsawImageBase64: string
token: string
secretKey: string
wordList: string[]
}
export interface CheckBehaviorCaptchaRes {
repCode: string
repMsg: string
}