|
|
|
@ -361,11 +361,11 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
//验证有问题{"status":1,"message":"success"}
|
|
|
|
|
console.log(result);
|
|
|
|
|
// console.log(result);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
// console.log(error);
|
|
|
|
|
// this.setState({
|
|
|
|
|
// login:"",
|
|
|
|
|
// logins:"",
|
|
|
|
@ -374,7 +374,6 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
//短信验证
|
|
|
|
|
SMSverification = () => {
|
|
|
|
|
|
|
|
|
|
var url = `/accounts/get_verification_code.json`;
|
|
|
|
|
axios.get((url), {
|
|
|
|
|
params: {
|
|
|
|
@ -383,7 +382,8 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
//验证有问题{"status":1,"message":"success"}
|
|
|
|
|
console.log(result);
|
|
|
|
|
// console.log(result);
|
|
|
|
|
this.openNotification("验证码已发送,请注意查收!",2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
@ -412,7 +412,6 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
//倒计时
|
|
|
|
|
getverificationcode = () => {
|
|
|
|
|
debugger
|
|
|
|
|
if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) {
|
|
|
|
|
if (this.state.logins&&this.state.logins.length === 0) {
|
|
|
|
|
this.openNotification("请输入手机号或邮箱",2);
|
|
|
|
@ -509,13 +508,17 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
tab:e.key
|
|
|
|
|
})
|
|
|
|
|
// console.log(e.key);
|
|
|
|
|
// if(e.key === 0){
|
|
|
|
|
// this.props.Setlogins(1);
|
|
|
|
|
// }else{
|
|
|
|
|
// this.props.Setlogins(2);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
console.log(e.key);
|
|
|
|
|
if(e.key === 0){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos:undefined
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:undefined
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key)
|
|
|
|
|
|
|
|
|
@ -590,12 +593,13 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
onChange={this.loginInputonChange}
|
|
|
|
|
name="username"
|
|
|
|
|
className="font-14 color-grey-9"
|
|
|
|
|
onBlur={(e) => this.inputOnBlur(e, 1)}
|
|
|
|
|
style={{marginTop: '30px', height: '38px'}}></Input>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotco && Phonenumberisnotco != "" ?
|
|
|
|
|
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span>{Phonenumberisnotco}</span>
|
|
|
|
|
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotco}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
}
|
|
|
|
@ -629,9 +633,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotcos && Phonenumberisnotcos != "" ?
|
|
|
|
|
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
{/*<span className="fl">{Phonenumberisnotcos}</span>*/}
|
|
|
|
|
|
|
|
|
|
<span className="fl" style={{textAlign:"center",width: " 100%"}}>请输入手机号码</span>
|
|
|
|
|
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotcos}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
|
|
|
|
|