Commit 34c3c067 by zhangleyuan

feat:设定短信验证码的长度

parents b747f54d 3e7f1532
......@@ -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]);
......@@ -63,6 +63,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);
......
/*
* @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01
* @LastEditTime: 2020-12-15 10:58:42
* @LastEditTime: 2020-12-15 15:56:34
* @LastEditors: zhangleyuan
* @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
......
......@@ -146,6 +146,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