mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-07 02:57:11 +08:00
feat: 新增行为验证码
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user