|
|
|
@ -14,12 +14,12 @@ import './common.css'
|
|
|
|
|
import './commontwo.css'
|
|
|
|
|
const { TabPane } = Tabs;
|
|
|
|
|
const loginInputsyl = {
|
|
|
|
|
"width":"434px",
|
|
|
|
|
"height": "462px",
|
|
|
|
|
"-webkit-box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
|
|
|
|
|
"box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
|
|
|
|
|
"border-radius": "6px",
|
|
|
|
|
"background": "#fff"
|
|
|
|
|
"width":"434px",
|
|
|
|
|
"height": "462px",
|
|
|
|
|
"-webkit-box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
|
|
|
|
|
"box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
|
|
|
|
|
"border-radius": "6px",
|
|
|
|
|
"background": "#fff"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//父组件EducoderLogin.js
|
|
|
|
@ -66,6 +66,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
pciphone:true,
|
|
|
|
|
MyEduCoderModals:false,
|
|
|
|
|
registered:undefined,
|
|
|
|
|
Phonenumberisnotcodmms:undefined,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -103,13 +104,14 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
pciphone:true,
|
|
|
|
|
MyEduCoderModals:false,
|
|
|
|
|
registered:undefined,
|
|
|
|
|
Phonenumberisnotcodmms:undefined,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//判断是否是手机端
|
|
|
|
|
IsPC=()=> {
|
|
|
|
|
IsPC=()=> {
|
|
|
|
|
var userAgentInfo = navigator.userAgent;
|
|
|
|
|
var Agents = ["Android", "iPhone",
|
|
|
|
|
"SymbianOS", "Windows Phone",
|
|
|
|
@ -162,7 +164,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StudyMakeMoney = () => { // 调用父组件方法
|
|
|
|
|
this.props.Setshowbool(3);
|
|
|
|
|
|
|
|
|
|
// this.props.Setlogins(3);
|
|
|
|
|
this.setState({
|
|
|
|
|
login: "",
|
|
|
|
@ -170,7 +172,12 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
logins: "",
|
|
|
|
|
passwords: "",
|
|
|
|
|
codes: "",
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
try {
|
|
|
|
|
this.props.Setshowbool(3);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onTabChange = (activeKey) => {
|
|
|
|
|
console.log("onTabChange");
|
|
|
|
@ -294,6 +301,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
//登入接口
|
|
|
|
|
postLogin = () => {
|
|
|
|
|
|
|
|
|
|
if (this.state.login === undefined || this.state.login == "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:"账号不能为空",
|
|
|
|
@ -310,34 +318,35 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
login: this.state.login,
|
|
|
|
|
password: this.state.password,
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
debugger
|
|
|
|
|
if (response === undefined) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(response.data.status === -2){
|
|
|
|
|
if("该手机号尚未注册" || "该邮箱尚未注册"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:response.data.message,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if("错误的账号或密码"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:response.data.message,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if("违反平台使用规范,账号已被锁定"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:response.data.message,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.openNotification(response.data.message);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(response.data.message==="该手机号尚未注册" || response.data.message==="该邮箱尚未注册"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:response.data.message,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if(response.data.message==="错误的账号或密码"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcodmms:response.data.message,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if(response.data.message==="违反平台使用规范,账号已被锁定"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:response.data.message,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.openNotification(response.data.message);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -474,7 +483,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
// })
|
|
|
|
|
this.setMyEduCoderModals();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
@ -495,54 +504,54 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
// this.setState({dragOk: true})
|
|
|
|
|
|
|
|
|
|
if(result){
|
|
|
|
|
if(result.data.status===-2){
|
|
|
|
|
if (id === 1) {
|
|
|
|
|
if(result.data.message==="该手机号码或邮箱已被注册"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
dragOk:true,
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: result.data.message,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s5");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
} else if (id === 2) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: result.data.message,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s6");
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
if (id === 1) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
dragOk:true,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
} else if (id === 2) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
dragOk:true,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(result.data.status===-2){
|
|
|
|
|
if (id === 1) {
|
|
|
|
|
if(result.data.message==="该手机号码或邮箱已被注册"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
dragOk:true,
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: result.data.message,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s5");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
} else if (id === 2) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: result.data.message,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
console.log("s6");
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
if (id === 1) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
dragOk:true,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
} else if (id === 2) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
dragOk:true,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
@ -603,12 +612,12 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(this.state.pciphone===true) {
|
|
|
|
|
if (this.state.dragOk === false) {
|
|
|
|
|
this.openNotification("拖动滑块验证");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(this.state.pciphone===true) {
|
|
|
|
|
if (this.state.dragOk === false) {
|
|
|
|
|
this.openNotification("拖动滑块验证");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.state.getverificationcodes === true) {
|
|
|
|
|
this.setState({
|
|
|
|
@ -666,12 +675,14 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
Phonenumberisnotcodmms:undefined,
|
|
|
|
|
login: stirngt,
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
login: stirngt,
|
|
|
|
|
Phonenumberisnotco:undefined,
|
|
|
|
|
Phonenumberisnotcodmms:undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -681,61 +692,61 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
this.Emailphonenumberverification(e.target.value, 1);
|
|
|
|
|
}
|
|
|
|
|
inputOnBlurzhuche = (e, id) => {
|
|
|
|
|
if (e.target.value.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// var telephone = $("#telephoneAdd.tianjia_phone").val();
|
|
|
|
|
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
|
|
|
|
|
// var email = $("#add_email.tianjia_email").val();
|
|
|
|
|
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
|
|
|
|
|
|
|
|
|
|
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
|
|
|
|
|
var stringdata = undefined;
|
|
|
|
|
if (!regph.test(e.target.value)) {
|
|
|
|
|
stringdata = "手机号格式不正确";
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: stringdata,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
if (e.target.value.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// var telephone = $("#telephoneAdd.tianjia_phone").val();
|
|
|
|
|
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
|
|
|
|
|
// var email = $("#add_email.tianjia_email").val();
|
|
|
|
|
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
|
|
|
|
|
var stringdata = undefined;
|
|
|
|
|
if (!regph.test(e.target.value)) {
|
|
|
|
|
stringdata = "手机号格式不正确";
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: stringdata,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
|
|
|
|
|
if (!regemail.test(e.target.value)) {
|
|
|
|
|
if ((e.target.value.indexOf("@") != -1) === true) {
|
|
|
|
|
stringdata = "邮箱格式不正确";
|
|
|
|
|
} else {
|
|
|
|
|
stringdata = "手机号格式不正确";
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: stringdata,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
if (!regemail.test(e.target.value)) {
|
|
|
|
|
if ((e.target.value.indexOf("@") != -1) === true) {
|
|
|
|
|
stringdata = "邮箱格式不正确";
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
stringdata = "手机号格式不正确";
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
this.Emailphonenumberverification(e.target.value, id);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: stringdata,
|
|
|
|
|
Phonenumberisnotcobool: true,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
this.Emailphonenumberverification(e.target.value, id);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.Emailphonenumberverification(e.target.value, id);
|
|
|
|
|
}
|
|
|
|
|
//获取登入密码
|
|
|
|
|
passwordonChange = (e) => {
|
|
|
|
@ -750,6 +761,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
password: stirngt,
|
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
|
Phonenumberisnotcodmms:undefined,
|
|
|
|
|
})
|
|
|
|
|
// this.setState({
|
|
|
|
|
// password: e.target.value
|
|
|
|
@ -759,28 +771,28 @@ 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,"")
|
|
|
|
|
stirngt=str;
|
|
|
|
|
}else{
|
|
|
|
|
stirngt= e.target.value;
|
|
|
|
|
}
|
|
|
|
|
if (e.target.value.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
logins: stirngt,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
logins: stirngt,
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(e.target.value.length>0){
|
|
|
|
|
var str= e.target.value.replace(/\s*/g,"")
|
|
|
|
|
stirngt=str;
|
|
|
|
|
}else{
|
|
|
|
|
stirngt= e.target.value;
|
|
|
|
|
}
|
|
|
|
|
if (e.target.value.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
|
logins: stirngt,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
logins: stirngt,
|
|
|
|
|
Phonenumberisnotcos: undefined,
|
|
|
|
|
dragOk:false,
|
|
|
|
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//获取注册密码
|
|
|
|
@ -810,7 +822,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
tab:e.key
|
|
|
|
|
})
|
|
|
|
|
console.log(e.key);
|
|
|
|
|
console.log(e.key);
|
|
|
|
|
if(e.key === 0){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcos:undefined
|
|
|
|
@ -868,6 +880,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
// 注册
|
|
|
|
|
readAgreement,
|
|
|
|
|
pciphone,
|
|
|
|
|
Phonenumberisnotcodmms,
|
|
|
|
|
} = this.state
|
|
|
|
|
// height: 346px;
|
|
|
|
|
if (this.state.seconds === 0) {
|
|
|
|
@ -877,30 +890,30 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
console.log(classpass);
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<div className="login_register_content login_register_contents" style={ parseInt(tab[0])==0?{height: "366px"} :{height: "510px"}}>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
<div className="login_register_content login_register_contents" style={ parseInt(tab[0])==0?{height: "366px"} :{height: "510px"}}>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.login_register_contents, .login_register_contents .ant-tabs-tabpane {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
|
|
|
|
|
<Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
|
|
|
|
|
<Menu.Item key="1" className={tab===1?"active font-18 ":"font-18 "} style={{marginLeft:"10px"}} >注册</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
parseInt(tab[0])==0 &&
|
|
|
|
|
<div style={{width: '340px'}}>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
|
|
|
|
|
<Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
|
|
|
|
|
<Menu.Item key="1" className={tab===1?"active font-18 ":"font-18 "} style={{marginLeft:"10px"}} >注册</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
parseInt(tab[0])==0 &&
|
|
|
|
|
<div style={{width: '340px'}}>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.ant-input {
|
|
|
|
|
font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
|
|
|
-webkit-box-sizing: border-box;
|
|
|
|
@ -933,193 +946,200 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<Input placeholder="请输入登录手机号码或邮箱" value={this.state.login}
|
|
|
|
|
onChange={this.loginInputonChange}
|
|
|
|
|
name="username"
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotco && Phonenumberisnotco != "" ?
|
|
|
|
|
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotco}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<Input type="password" name="password" id="password" value={this.state.password}
|
|
|
|
|
onChange={this.passwordonChange}
|
|
|
|
|
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 font-12 " style={{color: '#676767'}}>
|
|
|
|
|
<Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox>
|
|
|
|
|
|
|
|
|
|
<a onClick={()=>this.StudyMakeMoney()}
|
|
|
|
|
className="mr3 color-grey-9 mt3 font-12">找回密码</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postLogin()}
|
|
|
|
|
size={"large"}>登录</Button>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
parseInt(tab[0])==1 &&
|
|
|
|
|
<div style={{width: '340px'}}>
|
|
|
|
|
<Input placeholder="请使用手机号/邮箱账号进行注册"
|
|
|
|
|
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
|
|
|
|
|
value={this.state.logins}
|
|
|
|
|
type="text" autoComplete="off"
|
|
|
|
|
onChange={this.loginInputonChanges}
|
|
|
|
|
// onBlur={(e) => this.inputOnBlurzhuche(e, 2)}
|
|
|
|
|
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
|
|
|
|
|
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcos}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<Input placeholder="请输入登录手机号码或邮箱" value={this.state.login}
|
|
|
|
|
onChange={this.loginInputonChange}
|
|
|
|
|
name="username"
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotco && Phonenumberisnotco != "" ?
|
|
|
|
|
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotco}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<Input type="password" name="password" id="password" value={this.state.password}
|
|
|
|
|
onChange={this.passwordonChange}
|
|
|
|
|
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>
|
|
|
|
|
: (Phonenumberisnotcodmms=== undefined?<div style={{height:"25px"}}></div>:"")
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotcodmms && Phonenumberisnotcodmms != "" ?
|
|
|
|
|
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcodmms}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div className="left_right font-12 " style={{color: '#676767'}}>
|
|
|
|
|
<Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox>
|
|
|
|
|
|
|
|
|
|
<a onClick={()=>this.StudyMakeMoney()}
|
|
|
|
|
className="mr3 color-grey-9 mt3 font-12">找回密码</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postLogin()}
|
|
|
|
|
size={"large"}>登录</Button>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
parseInt(tab[0])==1 &&
|
|
|
|
|
<div style={{width: '340px'}}>
|
|
|
|
|
<Input placeholder="请使用手机号/邮箱账号进行注册"
|
|
|
|
|
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
|
|
|
|
|
value={this.state.logins}
|
|
|
|
|
type="text" autoComplete="off"
|
|
|
|
|
onChange={this.loginInputonChanges}
|
|
|
|
|
// onBlur={(e) => this.inputOnBlurzhuche(e, 2)}
|
|
|
|
|
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
|
|
|
|
|
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcos}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
{this.state.MyEduCoderModals===true? <Notcompletedysl
|
|
|
|
|
modalsType={this.state.MyEduCoderModals}
|
|
|
|
|
registered={this.state.registered}
|
|
|
|
|
setNotcompleteds={()=>{this.setNotcompleteds()}}
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Whethertoverify===false&&pciphone===true?
|
|
|
|
|
<CheckInputysl1
|
|
|
|
|
dragOkCallback={this.dragOkCallback}
|
|
|
|
|
>
|
|
|
|
|
</CheckInputysl1>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
{this.state.MyEduCoderModals===true? <Notcompletedysl
|
|
|
|
|
modalsType={this.state.MyEduCoderModals}
|
|
|
|
|
registered={this.state.registered}
|
|
|
|
|
setNotcompleteds={()=>{this.setNotcompleteds()}}
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Whethertoverify===false&&pciphone===true?
|
|
|
|
|
<CheckInputysl1
|
|
|
|
|
dragOkCallback={this.dragOkCallback}
|
|
|
|
|
>
|
|
|
|
|
</CheckInputysl1>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
Whethertoverify===true&&pciphone===true?
|
|
|
|
|
<CheckInputysl2
|
|
|
|
|
dragOkCallback={this.dragOkCallback}
|
|
|
|
|
>
|
|
|
|
|
</CheckInputysl2>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
Whethertoverify===true&&pciphone===true?
|
|
|
|
|
<CheckInputysl2
|
|
|
|
|
dragOkCallback={this.dragOkCallback}
|
|
|
|
|
>
|
|
|
|
|
</CheckInputysl2>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
pciphone===true?
|
|
|
|
|
(
|
|
|
|
|
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
pciphone===true?
|
|
|
|
|
(
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="yslbutondls">
|
|
|
|
|
|
|
|
|
|
<Input
|
|
|
|
|
className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}
|
|
|
|
|
name="codes" type="text" autoComplete="off" readonly
|
|
|
|
|
onfocus="this.removeAttribute('readonly')" style={{
|
|
|
|
|
width:'210px',
|
|
|
|
|
height:'38px',
|
|
|
|
|
}} placeholder="请输入验证码"
|
|
|
|
|
onChange={this.codesonChange}
|
|
|
|
|
value={codes}
|
|
|
|
|
>
|
|
|
|
|
</Input>
|
|
|
|
|
{
|
|
|
|
|
getverificationcodes === undefined ?
|
|
|
|
|
<Button className=" ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
|
|
|
size={"large"}>重新发送{seconds}s</Button>
|
|
|
|
|
: getverificationcodes === true ?
|
|
|
|
|
<Button className=" ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
|
|
|
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
|
|
|
|
|
:
|
|
|
|
|
<Button className=" ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
|
|
|
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
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>
|
|
|
|
|
)
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="yslbutondls">
|
|
|
|
|
|
|
|
|
|
<Input
|
|
|
|
|
className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}
|
|
|
|
|
name="codes" type="text" autoComplete="off" readonly
|
|
|
|
|
onfocus="this.removeAttribute('readonly')" style={{
|
|
|
|
|
width:'210px',
|
|
|
|
|
height:'38px',
|
|
|
|
|
}} placeholder="请输入验证码"
|
|
|
|
|
onChange={this.codesonChange}
|
|
|
|
|
value={codes}
|
|
|
|
|
>
|
|
|
|
|
</Input>
|
|
|
|
|
{
|
|
|
|
|
getverificationcodes === undefined ?
|
|
|
|
|
<Button className=" ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
|
|
|
size={"large"}>重新发送{seconds}s</Button>
|
|
|
|
|
: getverificationcodes === true ?
|
|
|
|
|
<Button className=" ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
|
|
|
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
|
|
|
|
|
:
|
|
|
|
|
<Button className=" ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
|
|
|
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.ant-input-affix-wrapper .ant-input-suffix {
|
|
|
|
|
right: 12px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Input placeholder="输入8~16位密码,区分大小写"
|
|
|
|
|
type={classpassbool===false?"text":"password"}
|
|
|
|
|
className={Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?" font-14 color-grey-9 loginInputzhucheysl ":" font-14 color-grey-9 loginInputzhuche"}
|
|
|
|
|
autoComplete="new-password"
|
|
|
|
|
onClick={this.changeType}
|
|
|
|
|
value={this.state.passwords} onChange={this.passwordonChanges}
|
|
|
|
|
suffix={
|
|
|
|
|
<img className={"mt5"} src={passopens} onClick={(key) => this.Showandhide(key)}>
|
|
|
|
|
</img>
|
|
|
|
|
}></Input>
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?
|
|
|
|
|
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosymmm}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
<Checkbox onChange={this.onChange}
|
|
|
|
|
checked={Agreetotheterms}
|
|
|
|
|
><span className="font-14 " style={{
|
|
|
|
|
color: '#676767',
|
|
|
|
|
}}>我已阅读并同意
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Input placeholder="输入8~16位密码,区分大小写"
|
|
|
|
|
type={classpassbool===false?"text":"password"}
|
|
|
|
|
className={Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?" font-14 color-grey-9 loginInputzhucheysl ":" font-14 color-grey-9 loginInputzhuche"}
|
|
|
|
|
autoComplete="new-password"
|
|
|
|
|
onClick={this.changeType}
|
|
|
|
|
value={this.state.passwords} onChange={this.passwordonChanges}
|
|
|
|
|
suffix={
|
|
|
|
|
<img className={"mt5"} src={passopens} onClick={(key) => this.Showandhide(key)}>
|
|
|
|
|
</img>
|
|
|
|
|
}></Input>
|
|
|
|
|
{
|
|
|
|
|
Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?
|
|
|
|
|
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosymmm}</span>
|
|
|
|
|
</p>
|
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
<Checkbox onChange={this.onChange}
|
|
|
|
|
checked={Agreetotheterms}
|
|
|
|
|
><span className="font-14 " style={{
|
|
|
|
|
color: '#676767',
|
|
|
|
|
}}>我已阅读并同意
|
|
|
|
|
<span>
|
|
|
|
|
<a href={'/help?index=4'} target="_blank" >《服务协议条款》</a>
|
|
|
|
|
</span></span></Checkbox>
|
|
|
|
|
<Button className=" font-16" type="primary" style={{height:"46px", width: "100%",marginTop:"26px"}} onClick={() => this.postregistered()}
|
|
|
|
|
size={"large"}>注册</Button>
|
|
|
|
|
<Button className=" font-16" type="primary" style={{height:"46px", width: "100%",marginTop:"26px"}} onClick={() => this.postregistered()}
|
|
|
|
|
size={"large"}>注册</Button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|