dev_forum
杨树林 6 years ago
parent ef4e3370cb
commit d4674d6ef1

@ -26,8 +26,12 @@ class LoginRegisterComponent extends Component {
seconds: 35,
codes: "",
getverificationcodes: true,
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
Phonenumberisnotco: undefined,
Phonenumberisnotcosytdhk:undefined,
Phonenumberisnotcosmmm: undefined,
Phonenumberisnotcosymmmm:undefined,
Phonenumberisnotcosyzm:undefined,
s: 'text',
classpass: "text",
readonlyInput: true,
@ -148,29 +152,45 @@ class LoginRegisterComponent extends Component {
Retrievepassword = () => {
if (this.state.Phonenumberisnotcobool === false) {
if (this.state.login.length === 0) {
this.openNotification("请输入正确的手机号或邮箱");
this.setState({
Phonenumberisnotco:"请输入正确的手机号或邮箱",
})
return
}
}
if (this.state.login === undefined || this.state.login === "") {
this.openNotification(`请输入登录手机号码或邮箱`);
if (this.state.login === undefined|| this.state.login.length ===0 || this.state.login === "") {
this.setState({
Phonenumberisnotco:"请输入登录手机号码或邮箱",
})
return
}
if (this.state.password === undefined || this.state.password === "") {
this.openNotification(`请输入密码`);
if (this.state.dragOk === false) {
// this.openNotification(`请拖动滑块完成验证`,2);
this.setState({
Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
})
return
}
if (this.state.password === undefined || this.state.password.length ===0 || this.state.password === "") {
this.setState({
Phonenumberisnotcosmmm:"请输入密码",
})
return
}
if (this.state.passwords === undefined || this.state.passwords === "") {
this.openNotification(`请输入密码`);
if (this.state.passwords === undefined || this.state.passwords.length ===0 || this.state.passwords === "") {
this.setState({
Phonenumberisnotcosymmmm:"请输入二次密码"
})
return
}
if (this.state.password !== this.state.passwords) {
if (this.state.password !== this.state.passwords==="") {
this.openNotification(`两次密码不相同`);
return
}
if (this.state.codes === undefined || this.state.codes === "") {
this.openNotification(`请输入验证码`);
if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") {
this.setState({
Phonenumberisnotcosyzm:"请输入验证码"
})
return
}
var url = "/accounts/reset_password.json";
@ -372,6 +392,10 @@ class LoginRegisterComponent extends Component {
seconds,
getverificationcodes,
Phonenumberisnotco,
Phonenumberisnotcosytdhk,
Phonenumberisnotcosmmm,
Phonenumberisnotcosymmmm,
Phonenumberisnotcosyzm,
readonlyInput,
codes,
Whethertoverify,
@ -446,7 +470,7 @@ class LoginRegisterComponent extends Component {
placeholder="输入注册手机号或邮箱" value={this.state.login}
onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}></Input>
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
Phonenumberisnotco && Phonenumberisnotco !== "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotco}</span>
</p>
@ -474,21 +498,41 @@ class LoginRegisterComponent extends Component {
:
""
}
{
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !=="" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<Input type={classpass}
className={"loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges}
value={this.state.password} style={{width: "100%", height: "38px", marginTop: '25px'}}
value={this.state.password} style={{width: "100%", height: "38px"}}
placeholder="输入8~16位密码区分大小写"></Input>
{
Phonenumberisnotcosmmm && Phonenumberisnotcosmmm !== "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosmmm}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<Input type={classpass}
className={"loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password"
onChange={this.loginInputonChangess} value={this.state.passwords}
style={{height: "38px", marginTop: '25px', width: "100%"}}
style={{height: "38px", width: "100%"}}
placeholder="再次输入新密码"></Input>
<div className={"mt25"}>
<Input className="fl mr5 loginInputzhuche" type="text" autoComplete="off" style={{
{
Phonenumberisnotcosymmmm && Phonenumberisnotcosymmmm !== "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosymmmm}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<div className="yslbutondls">
<Input className=" mr5 loginInputzhuche" type="text" autoComplete="off" style={{
width: "210px",
height: "38px",
}} placeholder="请输入验证码"
@ -498,16 +542,16 @@ class LoginRegisterComponent extends Component {
</Input>
{
getverificationcodes === undefined ?
<Button className="fl ml5 " disabled
<Button className=" ml5 " disabled
style={{"width": "120px", "text-align": "center", "height": "45px",}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className="fl ml5 "
<Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
:
<Button className="fl ml5 "
<Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
@ -516,9 +560,17 @@ class LoginRegisterComponent extends Component {
</div>
<Button className="login_btn" size={"large"} type="primary"
style={{height: "46px"}}
onClick={this.Retrievepassword}>完成</Button>
{
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%",}}
onClick={this.Retrievepassword}>完成</Button>
</div>
</div>

Loading…
Cancel
Save