chore: 优化部分代码

This commit is contained in:
2024-05-17 21:03:00 +08:00
parent d4b9057554
commit 3a44a818d8
7 changed files with 46 additions and 58 deletions

View File

@@ -19,11 +19,11 @@ export function getEmailCaptcha(query: { email: string }) {
}
/** @desc 获取行为验证码 */
export function getBehaviorCaptcha(params: any) {
return http.get<Common.BehaviorCaptchaRes>(`${BASE_URL}/behavior`, {params});
export function getBehaviorCaptcha(req: any) {
return http.get<Common.BehaviorCaptchaResp>(`${BASE_URL}/behavior`, req)
}
/** @desc 校验行为验证码 */
export function checkBehaviorCaptcha(params: any) {
return http.post<Common.CheckBehaviorCaptchaRes>(`${BASE_URL}/behavior`, params);
export function checkBehaviorCaptcha(req: any) {
return http.post<Common.CheckBehaviorCaptchaResp>(`${BASE_URL}/behavior`, req)
}

View File

@@ -20,13 +20,7 @@ export interface DashboardNoticeResp {
}
/* 行为验证码类型 */
export interface BehaviorCaptchaReq {
captchaType?: string
captchaVerification?: string
clientUid?: string
}
export interface BehaviorCaptchaRes {
export interface BehaviorCaptchaResp {
originalImageBase64: string
point: {
x: number
@@ -38,7 +32,7 @@ export interface BehaviorCaptchaRes {
wordList: string[]
}
export interface CheckBehaviorCaptchaRes {
export interface CheckBehaviorCaptchaResp {
repCode: string
repMsg: string
}