feat: update

This commit is contained in:
landaiqing
2024-05-29 21:33:58 +08:00
parent cb9c827220
commit 4ce065214a
11 changed files with 173 additions and 144 deletions

View File

@@ -1,5 +1,7 @@
import type { TicketInfoType, TokenInfoType } from "react-rotate-captcha";
import { getCaptcha, VerfiyCaptcha } from "@/api/captcha/api.ts";
/** @format */
import type { TokenInfoType } from "react-rotate-captcha";
import { getCaptcha } from "@/api/captcha/api.ts";
export type ActionType = {
code: 0 | 1;
@@ -36,11 +38,10 @@ export function sleep(time: number) {
});
}
export async function verify(token: string, deg: number): Promise<TicketInfoType> {
const data: any = {
token: token,
deg: deg,
};
const res: any = await VerfiyCaptcha(data);
return res;
}
// export async function verify(token: string, deg: number): Promise<TicketInfoType> {
// const data: any = {
// token: token,
// deg: deg,
// };
// return await VerfiyCaptcha(data);
// }