|
|
|
@ -57,6 +57,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
Phonenumberisnotcosymmm:undefined,
|
|
|
|
|
Phonenumberisnotcosytdhk:undefined,
|
|
|
|
|
Phonenumberisnotcosyfwtk:undefined,
|
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
Whethertoverify:false,
|
|
|
|
|
|
|
|
|
@ -91,6 +92,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
Phonenumberisnotcosytdhk:undefined,
|
|
|
|
|
Phonenumberisnotcosyfwtk:undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
|
Whethertoverify:false,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -194,10 +196,14 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
//登入接口
|
|
|
|
|
postLogin = () => {
|
|
|
|
|
if (this.state.login === undefined || this.state.login == "") {
|
|
|
|
|
this.openNotification(`请输入登录手机号码或邮箱`,2);
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:"账号不能为空",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else if (this.state.password === undefined || this.state.password == "") {
|
|
|
|
|
this.openNotification(`请输入密码`,2);
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcodmm:"密码不能为空",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var url = "/accounts/login.json";
|
|
|
|
@ -208,6 +214,34 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
if (response === undefined) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(response.status === -2){
|
|
|
|
|
if("该手机号尚未注册" || "该邮箱尚未注册"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:result.data.message,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if("错误的账号或密码"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:result.data.message,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if("违反平台使用规范,账号已被锁定"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:result.data.message,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.openNotification(result.data.message);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
if (response.data.status === 402) {
|
|
|
|
|
window.location.href = response.data.url;
|
|
|
|
@ -268,12 +302,12 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
Phonenumberisnotcosymmm:"密码不能为空",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else if (this.state.passwords !==undefined ||this.state.passwords.length>0&&this.state.passwords.length<8){
|
|
|
|
|
} else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length<8){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcosymmm:"密码不能少于8位",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else if (this.state.passwords !==undefined ||this.state.passwords.length>0&&this.state.passwords.length>16){
|
|
|
|
|
} else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length>16){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcosymmm:"密码不能超过16位",
|
|
|
|
|
})
|
|
|
|
@ -507,6 +541,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
login: stirngt,
|
|
|
|
|
Phonenumberisnotco:undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -528,6 +563,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
password: stirngt,
|
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
|
})
|
|
|
|
|
// this.setState({
|
|
|
|
|
// password: e.target.value
|
|
|
|
@ -628,6 +664,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
Phonenumberisnotcosytdhk,
|
|
|
|
|
Phonenumberisnotcosyzm,
|
|
|
|
|
Phonenumberisnotcosymmm,
|
|
|
|
|
Phonenumberisnotcodmm,
|
|
|
|
|
// 注册
|
|
|
|
|
readAgreement,
|
|
|
|
|
} = this.state
|
|
|
|
@ -692,7 +729,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
<Input placeholder="请输入登录手机号码或邮箱" value={this.state.login}
|
|
|
|
|
onChange={this.loginInputonChange}
|
|
|
|
|
name="username"
|
|
|
|
|
className="font-14 color-grey-9 loginInputzhuche"
|
|
|
|
|
className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
|
|
|
|
|
onBlur={(e) => this.inputOnBlur(e, 1)}
|
|
|
|
|
style={{marginTop: '30px', height: '38px'}}></Input>
|
|
|
|
|
|
|
|
|
@ -706,11 +743,17 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
<Input type="password" name="password" id="password" value={this.state.password}
|
|
|
|
|
onChange={this.passwordonChange}
|
|
|
|
|
className="font-14 color-grey-9 loginInputzhuche"
|
|
|
|
|
|
|
|
|
|
className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
|
|
|
|
|
placeholder="密码"></Input>
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotcodmm && Phonenumberisnotcodmm != "" ?
|
|
|
|
|
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcodmm}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div className="left_right mt25 font-12 " style={{color: '#676767'}}>
|
|
|
|
|
<div className="left_right font-12 " style={{color: '#676767'}}>
|
|
|
|
|
<Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox>
|
|
|
|
|
|
|
|
|
|
<a onClick={()=>this.StudyMakeMoney()}
|
|
|
|
|