|
|
@ -60,6 +60,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
Whethertoverify:false,
|
|
|
|
Whethertoverify:false,
|
|
|
|
|
|
|
|
pciphone:true,
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -94,11 +95,27 @@ class LoginRegisterComponent extends Component {
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
Phonenumberisnotcobool: false,
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
Phonenumberisnotcodmm:undefined,
|
|
|
|
Whethertoverify:false,
|
|
|
|
Whethertoverify:false,
|
|
|
|
|
|
|
|
pciphone:true,
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否是手机端
|
|
|
|
|
|
|
|
IsPC=()=> {
|
|
|
|
|
|
|
|
var userAgentInfo = navigator.userAgent;
|
|
|
|
|
|
|
|
var Agents = ["Android", "iPhone",
|
|
|
|
|
|
|
|
"SymbianOS", "Windows Phone",
|
|
|
|
|
|
|
|
"iPad", "iPod"];
|
|
|
|
|
|
|
|
var flag = true;//这个意思是说自己的是pc 端
|
|
|
|
|
|
|
|
for (var v = 0; v < Agents.length; v++) {
|
|
|
|
|
|
|
|
if (userAgentInfo.indexOf(Agents[v]) > 0) {
|
|
|
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return flag;
|
|
|
|
|
|
|
|
}
|
|
|
|
// 点击表单后,改变type
|
|
|
|
// 点击表单后,改变type
|
|
|
|
changeType = () => {
|
|
|
|
changeType = () => {
|
|
|
|
this.setState({classpass: 'password'});
|
|
|
|
this.setState({classpass: 'password'});
|
|
|
@ -106,17 +123,21 @@ class LoginRegisterComponent extends Component {
|
|
|
|
componentDidMount = () => {
|
|
|
|
componentDidMount = () => {
|
|
|
|
// console.log("componentDidUpdate");
|
|
|
|
// console.log("componentDidUpdate");
|
|
|
|
// console.log(this.props);
|
|
|
|
// console.log(this.props);
|
|
|
|
|
|
|
|
let pcipns=this.IsPC();
|
|
|
|
if (this.props.match.url === "/login") {
|
|
|
|
if (this.props.match.url === "/login") {
|
|
|
|
console.log("11111111111111111111111111");
|
|
|
|
console.log("11111111111111111111111111");
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
tab:["0"],
|
|
|
|
tab:["0"],
|
|
|
|
|
|
|
|
pciphone:pcipns,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (this.props.match.url === "/register") {
|
|
|
|
} else if (this.props.match.url === "/register") {
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
tab:["1"],
|
|
|
|
tab:["1"],
|
|
|
|
|
|
|
|
pciphone:pcipns,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
openNotification = (messge,type) => {
|
|
|
|
openNotification = (messge,type) => {
|
|
|
|
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
|
|
|
|
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
|
|
|
@ -214,10 +235,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
if (response === undefined) {
|
|
|
|
if (response === undefined) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(response.data.identity === null || response.data.identity === undefined){
|
|
|
|
|
|
|
|
this.props.history.push("/interesse");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(response.data.status === -2){
|
|
|
|
if(response.data.status === -2){
|
|
|
|
if("该手机号尚未注册" || "该邮箱尚未注册"){
|
|
|
|
if("该手机号尚未注册" || "该邮箱尚未注册"){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -246,6 +264,11 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(response.data.identity === null || response.data.identity === undefined){
|
|
|
|
|
|
|
|
this.props.history.push("/interesse");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
if (response.status === 200) {
|
|
|
|
if (response.data.status === 402) {
|
|
|
|
if (response.data.status === 402) {
|
|
|
|
window.location.href = response.data.url;
|
|
|
|
window.location.href = response.data.url;
|
|
|
@ -284,17 +307,20 @@ class LoginRegisterComponent extends Component {
|
|
|
|
// this.openNotification(`请同意服务协议条款`,2);
|
|
|
|
// this.openNotification(`请同意服务协议条款`,2);
|
|
|
|
// return;
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
if(this.state.pciphone===true){
|
|
|
|
|
|
|
|
if (this.state.dragOk === false) {
|
|
|
|
|
|
|
|
// this.openNotification(`请拖动滑块完成验证`,2);
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) {
|
|
|
|
if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
Phonenumberisnotcos:"账号不能为空",
|
|
|
|
Phonenumberisnotcos:"账号不能为空",
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return
|
|
|
|
return
|
|
|
|
} else if (this.state.dragOk === false) {
|
|
|
|
|
|
|
|
// this.openNotification(`请拖动滑块完成验证`,2);
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
} else if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
|
|
|
|
} else if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
|
|
|
|
// this.openNotification(`请输入验证码`,2);
|
|
|
|
// this.openNotification(`请输入验证码`,2);
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -555,6 +581,11 @@ class LoginRegisterComponent extends Component {
|
|
|
|
this.isCorrectname(e.target.value, id);
|
|
|
|
this.isCorrectname(e.target.value, id);
|
|
|
|
// this.Emailphonenumberverification(e.target.value, id);
|
|
|
|
// this.Emailphonenumberverification(e.target.value, id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
inputOnBlurzhuche = (e, id) => {
|
|
|
|
|
|
|
|
if(this.state.pciphone===false) {
|
|
|
|
|
|
|
|
this.Emailphonenumberverification(e.target.value, id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//获取登入密码
|
|
|
|
//获取登入密码
|
|
|
|
passwordonChange = (e) => {
|
|
|
|
passwordonChange = (e) => {
|
|
|
|
// console.log(e.target.value);
|
|
|
|
// console.log(e.target.value);
|
|
|
@ -671,6 +702,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
Phonenumberisnotcodmm,
|
|
|
|
Phonenumberisnotcodmm,
|
|
|
|
// 注册
|
|
|
|
// 注册
|
|
|
|
readAgreement,
|
|
|
|
readAgreement,
|
|
|
|
|
|
|
|
pciphone,
|
|
|
|
} = this.state
|
|
|
|
} = this.state
|
|
|
|
// height: 346px;
|
|
|
|
// height: 346px;
|
|
|
|
if (this.state.seconds === 0) {
|
|
|
|
if (this.state.seconds === 0) {
|
|
|
@ -778,6 +810,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
value={this.state.logins}
|
|
|
|
value={this.state.logins}
|
|
|
|
type="text" autoComplete="off"
|
|
|
|
type="text" autoComplete="off"
|
|
|
|
onChange={this.loginInputonChanges}
|
|
|
|
onChange={this.loginInputonChanges}
|
|
|
|
|
|
|
|
onBlur={(e) => this.inputOnBlurzhuche(e, 2)}
|
|
|
|
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
|
|
|
|
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
|
|
|
|
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
|
|
|
@ -788,7 +821,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Whethertoverify===false?
|
|
|
|
Whethertoverify===false&&pciphone===true?
|
|
|
|
<DragValidator
|
|
|
|
<DragValidator
|
|
|
|
height={38} successGreenColor="#29bd8b"
|
|
|
|
height={38} successGreenColor="#29bd8b"
|
|
|
|
style={{ height: '38px'}}
|
|
|
|
style={{ height: '38px'}}
|
|
|
@ -799,7 +832,7 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Whethertoverify===true?
|
|
|
|
Whethertoverify===true&&pciphone===true?
|
|
|
|
<DragValidatortwo
|
|
|
|
<DragValidatortwo
|
|
|
|
height={38} successGreenColor="#29bd8b"
|
|
|
|
height={38} successGreenColor="#29bd8b"
|
|
|
|
style={{ height: '38px'}}
|
|
|
|
style={{ height: '38px'}}
|
|
|
@ -808,14 +841,21 @@ class LoginRegisterComponent extends Component {
|
|
|
|
:
|
|
|
|
:
|
|
|
|
""
|
|
|
|
""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
<div>
|
|
|
|
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
|
|
|
|
{
|
|
|
|
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
|
|
pciphone===true?
|
|
|
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
|
|
|
|
(
|
|
|
|
</p>
|
|
|
|
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
|
|
|
|
: <div style={{height:"25px"}}></div>
|
|
|
|
<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">
|
|
|
|
<div className="yslbutondls">
|
|
|
|