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