Commit e7e83c0b by zhangleyuan

feat:登录验证码长度限制

parent 4ea28862
......@@ -28,7 +28,7 @@ const CropperModal = (props: CropperModalProps) => {
const { title, close, save } = props;
const [imgUrl, setImgUrl] = useState(props.imgUrl ? `${props.imgUrl}` : baseImg);
const [clickStatus,setClickStatus] = useState(false);
useEffect(() => {
imgUrl && initCropper();
}, [imgUrl]);
......@@ -64,6 +64,13 @@ const CropperModal = (props: CropperModalProps) => {
function _handleSave(): any {
if (clickStatus) {
return;
}
setClickStatus(true);
setTimeout(() => {
setClickStatus(false);
}, 1000);
const $image = $('#image');
($image as any).cropper('getCroppedCanvas').toBlob((blob: any) => {
console.log("blob",blob);
......
......@@ -148,6 +148,7 @@ function Login(props) {
placeholder="验证码"
autoComplete="off"
value={phoneverify}
maxLength={4}
onChange={(e) => { setPhoneverify(e.target.value) }}
/>
<Popover
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment