调整删除验证码

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

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

Loading…
Cancel
Save