调整删除验证码

dev_local_2
杨树林 6 years ago
parent 61397ff292
commit ecbb557fef

@ -246,12 +246,12 @@ class LoginRegisterComponent extends Component {
})
return
}
if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") {
this.setState({
Phonenumberisnotcosyzm:"验证码不能为空"
})
return
}
// if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") {
// this.setState({
// Phonenumberisnotcosyzm:"验证码不能为空"
// })
// return
// }
var url = "/accounts/reset_password.json";
axios.post(url, {
login: this.state.login,
@ -757,46 +757,42 @@ class LoginRegisterComponent extends Component {
</p>
: <div style={{height: "25px"}}></div>
}
<div className="yslbutondls">
<Input className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}
type="text" autoComplete="off" style={{
width: "210px",
height: "38px",
}} placeholder="请输入验证码"
onChange={this.codesonChange}
value={codes}
>
</Input>
{
getverificationcodes === undefined ?
<Button className=" ml5 " disabled
style={{"width": "120px", "text-align": "center", "height": "45px",}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
disabled={boolyzm}
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
:
<Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
disabled={boolyzm}
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
}
</div>
{
Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosyzm}</span>
</p>
: <div style={{height: "25px"}}></div>
}
{/*<div className="yslbutondls">*/}
{/* <Input className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}*/}
{/* type="text" autoComplete="off" style={{*/}
{/* width: "210px",*/}
{/* height: "38px",*/}
{/* }} placeholder="请输入验证码"*/}
{/* onChange={this.codesonChange}*/}
{/* value={codes}*/}
{/* >*/}
{/* </Input>*/}
{/* {*/}
{/* getverificationcodes === undefined ?*/}
{/* <Button className=" ml5 " disabled*/}
{/* style={{"width": "120px", "text-align": "center", "height": "45px",}}*/}
{/* size={"large"}>重新发送{seconds}s</Button>*/}
{/* : getverificationcodes === true ?*/}
{/* <Button className=" ml5 "*/}
{/* style={{"width": "120px", "text-align": "center", "height": "45px"}}*/}
{/* type="primary"*/}
{/* disabled={boolyzm}*/}
{/* onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>*/}
{/* :*/}
{/* <Button className=" ml5 "*/}
{/* style={{"width": "120px", "text-align": "center", "height": "45px"}}*/}
{/* type="primary"*/}
{/* disabled={boolyzm}*/}
{/* onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>*/}
{/* }*/}
{/*</div>*/}
{/*{*/}
{/* Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?*/}
{/* <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>*/}
{/* <span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosyzm}</span>*/}
{/* </p>*/}
{/* : <div style={{height: "25px"}}></div>*/}
{/*}*/}
<Button size={"large"} type="primary"
style={{height:"46px", width: "100%",marginBottom:"26px"}}

@ -424,13 +424,14 @@ class LoginRegisterComponent extends Component {
}
}
if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
// this.openNotification(`请输入验证码`,2);
this.setState({
Phonenumberisnotcosyzm:"验证码不能为空",
})
return
} else if (this.state.passwords === undefined || this.state.passwords == "" ||this.state.passwords.length===0) {
// if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
// // this.openNotification(`请输入验证码`,2);
// this.setState({
// Phonenumberisnotcosyzm:"验证码不能为空",
// })
// return
// } else
if (this.state.passwords === undefined || this.state.passwords == "" ||this.state.passwords.length===0) {
this.setState({
Phonenumberisnotcosymmm:"密码不能为空",
})
@ -1057,42 +1058,42 @@ class LoginRegisterComponent extends Component {
<div className="yslbutondls">
<Input
className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}
name="codes" type="text" autoComplete="off" readonly
onfocus="this.removeAttribute('readonly')" style={{
width:'210px',
height:'38px',
}} placeholder="请输入验证码"
onChange={this.codesonChange}
value={codes}
>
</Input>
{
getverificationcodes === undefined ?
<Button className=" ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className=" ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
:
<Button className=" ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
}
</div>
<div>
{
Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyzm}</span>
</p>
: <div style={{height:"25px"}}></div>
}
</div>
{/*<div className="yslbutondls " style={{display: "none"}}>*/}
{/* <Input*/}
{/* className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}*/}
{/* name="codes" type="text" autoComplete="off" readonly*/}
{/* onfocus="this.removeAttribute('readonly')" style={{*/}
{/* width:'210px',*/}
{/* height:'38px',*/}
{/* }} placeholder="请输入验证码"*/}
{/* onChange={this.codesonChange}*/}
{/* value={codes}*/}
{/* >*/}
{/* </Input>*/}
{/* {*/}
{/* getverificationcodes === undefined ?*/}
{/* <Button className=" ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}}*/}
{/* size={"large"}>重新发送{seconds}s</Button>*/}
{/* : getverificationcodes === true ?*/}
{/* <Button className=" ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}*/}
{/* onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>*/}
{/* :*/}
{/* <Button className=" ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}*/}
{/* onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>*/}
{/* }*/}
{/*</div>*/}
{/*<div style={{display: "none"}}>*/}
{/* {*/}
{/* Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?*/}
{/* <p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>*/}
{/* <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyzm}</span>*/}
{/* </p>*/}
{/* : <div style={{height:"25px"}}></div>*/}
{/* }*/}
{/*</div>*/}

Loading…
Cancel
Save