feat: update

This commit is contained in:
landaiqing
2024-06-03 20:32:42 +08:00
parent fec48a8e74
commit ea92b3e2ce
4 changed files with 179 additions and 111 deletions

View File

@@ -28,7 +28,7 @@ import {
Tabs,
Tooltip,
} from "antd";
import { CSSProperties, useEffect, useRef, useState } from "react";
import { CSSProperties, useRef, useState } from "react";
import logo from "@/assets/icons/schisandra.svg";
import qrCode from "@/assets/images/login_qrcode-landaiqing.jpg";
import styles from "./index.module.less";
@@ -39,7 +39,7 @@ import { get, load } from "@/api/captcha/index.ts";
import { getSms, oauthLogin } from "@/api/user";
import { VerfiyCaptcha } from "@/api/captcha/api.ts";
import { TinyColor } from "@ctrl/tinycolor";
// import useStore from '@/utils/store/useStore.tsx'
type LoginType = "account" | "phone";
const iconStyles: CSSProperties = {
@@ -102,10 +102,9 @@ export default observer(() => {
const onSubmit = async (formData: object) => {
openCaptcha().then(() => {
console.log(formData);
console.log("formData", formData);
});
};
useEffect(() => {}, []);
return (
<RotateCaptcha get={get} load={load} verify={verify} limit={2} ref={captcha}>
<div className={styles.container}>
@@ -256,7 +255,7 @@ export default observer(() => {
fieldRef={captchaRef}
countDown={300}
onGetCaptcha={async (mobile: string) => {
const res: any = await getSms(mobile);
const res: any = getSms(mobile);
if (res && res.success) {
message.success(res.data, 3);
} else {