|
|
|
@ -1,9 +1,7 @@
|
|
|
|
|
import React, {Component} from 'react';
|
|
|
|
|
|
|
|
|
|
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
|
|
|
|
|
|
|
|
|
|
import {getImageUrl,broadcastChannelPostMessage} from 'educoder';
|
|
|
|
|
import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
|
|
|
|
|
import md5 from 'md5';
|
|
|
|
|
import passopen from '../../../src/images/login/passopen.png';
|
|
|
|
|
import passoff from '../../../src/images/login/passoff.png';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
@ -184,7 +182,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
message: "提示",
|
|
|
|
|
description: messge,
|
|
|
|
|
onClick: () => {
|
|
|
|
|
console.log('Notification Clicked12312313123!');
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -217,7 +215,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onTabChange = (activeKey) => {
|
|
|
|
|
console.log("onTabChange");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// -------------------- LOGIN START
|
|
|
|
|
//下次自动登入
|
|
|
|
@ -229,7 +227,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
isCorrectname = (value, id) => {
|
|
|
|
|
if (id === 1) {
|
|
|
|
|
console.log(value.length);
|
|
|
|
|
|
|
|
|
|
if (value.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: undefined,
|
|
|
|
@ -265,7 +263,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s0");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -283,7 +281,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
dragOk:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s1");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
@ -307,11 +305,11 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
});
|
|
|
|
|
console.log("s2");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
console.log("s222222");
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
@ -571,7 +569,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s5");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
@ -582,7 +580,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s6");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -611,11 +609,14 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
};
|
|
|
|
|
//短信验证
|
|
|
|
|
SMSverification = () => {
|
|
|
|
|
const opens ="79e33abd4b6588941ab7622aed1e67e8";
|
|
|
|
|
let newopens=md5(opens+this.state.logins);
|
|
|
|
|
var url = `/accounts/get_verification_code.json`;
|
|
|
|
|
axios.get((url), {
|
|
|
|
|
params: {
|
|
|
|
|
login: this.state.logins,
|
|
|
|
|
type: 1,
|
|
|
|
|
smscode:newopens
|
|
|
|
|
}
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
//验证有问题{"status":1,"message":"success"}
|
|
|
|
@ -624,13 +625,13 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//显示和不显示密码
|
|
|
|
|
Showandhide = (e) => {
|
|
|
|
|
console.log("显示于隐藏");
|
|
|
|
|
|
|
|
|
|
if (this.state.classpassbool === true) {
|
|
|
|
|
this.setState({
|
|
|
|
|
passopens:passoff ,
|
|
|
|
@ -649,7 +650,6 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
//倒计时
|
|
|
|
|
getverificationcode = () => {
|
|
|
|
|
debugger
|
|
|
|
|
// console.log(this.state.Phonenumberisnotcobool);
|
|
|
|
|
// console.log(this.state.dragOk);
|
|
|
|
|
if(this.state.logins === undefined || this.state.logins.length===0){
|
|
|
|
@ -821,7 +821,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
//获取注册登入
|
|
|
|
|
loginInputonChanges = (e) => {
|
|
|
|
|
console.log(e.target.value);
|
|
|
|
|
|
|
|
|
|
var stirngt;
|
|
|
|
|
if(e.target.value.length>0){
|
|
|
|
|
var str= e.target.value.replace(/\s*/g,"")
|
|
|
|
@ -874,7 +874,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
tab:e.key
|
|
|
|
|
})
|
|
|
|
|
console.log(e.key);
|
|
|
|
|
|
|
|
|
|
if(e.key === 0){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos:undefined
|
|
|
|
|