issues25489
杨树林 5 years ago
parent a8e0495426
commit 7c49d453a9

@ -476,10 +476,28 @@ class LoginDialog extends Component {
if (response.data.status === 402) { if (response.data.status === 402) {
// window.location.href = response.data.url; // window.location.href = response.data.url;
}else if (response.data.status === -2) { }else if (response.data.status === -2) {
notification.open({ if (response.data.message === "登录密码出错已达上限,账号已被锁定, 请10分钟后重新登录或找回密码") {
message: '提示', const messge = (
description:response.data.message, <div>
}); <p>
登录密码出错已达上限账号已被锁定
</p>
<p className="mt10">
请10分钟后重新登录或<a href={'/changepassword'} style={{
textDecoration: "underline",
color: "#4CACFF",
}}>找回密码</a>
</p>
</div>
)
this.openNotifications(messge);
} else {
notification.open({
message: '提示',
description: response.data.message,
duration: 5,
});
}
}else{ }else{
@ -529,6 +547,17 @@ class LoginDialog extends Component {
weixinlogin:true weixinlogin:true
}) })
} }
openNotifications = (btn) => {
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
notification.open({
message: "提示",
description: btn,
duration: 5,
onClick: () => {
},
});
}
openqqlogin=()=>{ openqqlogin=()=>{
this.setState({ this.setState({
qqlogin:true qqlogin:true
@ -543,7 +572,7 @@ class LoginDialog extends Component {
`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2ftest-newweb.educoder.net%2fotherloginqq&response_type=code` `https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2ftest-newweb.educoder.net%2fotherloginqq&response_type=code`
) )
} }
hideweixinlogin=()=>{ hideweixinlogin=()=>{
this.setState({ this.setState({
weixinlogin:false, weixinlogin:false,
@ -605,27 +634,37 @@ class LoginDialog extends Component {
<input name="back_url" type="hidden" value={this.back_url}></input> <input name="back_url" type="hidden" value={this.back_url}></input>
<input <input
type="text" type="text"
className="input-100-45 mt20" className="input-100-45 mt20"
id="name_loggin_input" id="name_loggin_input"
ref="loginPassText" ref="loginPassText"
onInput={this.loginChange} onInput={this.loginChange}
onBlur={(e) => this.inputOnBlur(e, 1)} onBlur={(e) => this.inputOnBlur(e, 1)}
value={this.state.loginValue} onPressEnter={disabled === false ?
name="username" this.loginEDU : () => {
placeholder="请输入有效的手机号/邮箱号" ></input> }
// console.log(1)
}
value={this.state.loginValue}
name="username"
placeholder="请输入有效的手机号/邮箱号" ></input>
<div style={{height: '25px'}}><p className="color-orange edu-txt-left none" id="username_error_notice" <div style={{height: '25px'}}><p className="color-orange edu-txt-left none" id="username_error_notice"
style={{display: Phonenumberisnotco===undefined?'none':'block'}}>{Phonenumberisnotco}</p></div> style={{display: Phonenumberisnotco===undefined?'none':'block'}}>{Phonenumberisnotco}</p></div>
<div> <div>
<input type="password" id="password_loggin_input" <input type="password" id="password_loggin_input"
name="password" name="password"
ref="passwordText" ref="passwordText"
onInput={this.passwordChange} onInput={this.passwordChange}
onKeyDown={this.onKeydowns} onKeyDown={this.onKeydowns}
className="input-100-45 mt5" className="input-100-45 mt5"
placeholder="密码" > onPressEnter={disabled === false ?
this.loginEDU : () => {
}
// console.log(1)
}
placeholder="密码" >
</input> </input>
<div style={{height: '25px'}}> <div style={{height: '25px'}}>
<p className="color-orange edu-txt-left none" id="password_error_notice"> <p className="color-orange edu-txt-left none" id="password_error_notice">
@ -662,7 +701,8 @@ class LoginDialog extends Component {
</span> </span>
<span className="fr"> <span className="fr">
<a onClick={(url)=>this.getloginurl("/changepassword")} className="mr3 color-grey-9">忘记密码</a><em className="vertical-line"></em> <a onClick={(url) => this.getloginurl("/changepassword")}
className="mr3 color-grey-9">找回密码</a><em className="vertical-line"></em>
<a onClick={(url)=>this.getloginurl("/register")} className="color-grey-9">注册</a> <a onClick={(url)=>this.getloginurl("/register")} className="color-grey-9">注册</a>
</span> </span>

@ -698,7 +698,7 @@ submittojoinclass=(value)=>{
} }
document.head.appendChild(link); document.head.appendChild(link);
} }
getAppdata=()=>{ getAppdata=()=>{
let url = "/setting.json"; let url = "/setting.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
@ -1226,8 +1226,8 @@ submittojoinclass=(value)=>{
this.props.Headertop && this.props.Headertop.laboratory_user && this.props.Headertop && this.props.Headertop.laboratory_user &&
<li><a href="/admins">后台管理</a></li> <li><a href="/admins">后台管理</a></li>
} }
<li><a href={`/account/profile`}>账号管理</a></li> <li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/} {/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/} {/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}
@ -1235,6 +1235,7 @@ submittojoinclass=(value)=>{
<li className="bor-top-greyE"> <li className="bor-top-greyE">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/} {/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}
{/*<a onClick={()=>this.educoderlogin()}>退出</a>*/} {/*<a onClick={()=>this.educoderlogin()}>退出</a>*/}
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
<a onClick={()=>this.educoderloginysl()}>退出</a> <a onClick={()=>this.educoderloginysl()}>退出</a>
</li> </li>

@ -183,12 +183,21 @@ class LoginRegisterComponent extends Component {
notification.open({ notification.open({
message: "提示", message: "提示",
description: messge, description: messge,
duration: 0,
onClick: () => { onClick: () => {
console.log('Notification Clicked12312313123!'); console.log('Notification Clicked12312313123!');
}, },
}); });
} }
openNotifications = (btn) => {
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
notification.open({
message: "提示",
description: btn,
onClick: () => {
},
});
}
StudyMakeMoney = () => { // 调用父组件方法 StudyMakeMoney = () => { // 调用父组件方法
@ -370,8 +379,23 @@ class LoginRegisterComponent extends Component {
}) })
return; return;
} } else if (response.data.message === "登录密码出错已达上限,账号已被锁定, 请10分钟后重新登录或找回密码") {
else { const messge = (
<div>
<p>
登录密码出错已达上限账号已被锁定
</p>
<p className="mt10">
请10分钟后重新登录或<a href={'/changepassword'} style={{
textDecoration: "underline",
color: "#4CACFF",
}}>找回密码</a>
</p>
</div>
)
this.openNotifications(messge);
return;
} else {
this.openNotification(response.data.message); this.openNotification(response.data.message);
return; return;
} }
@ -1013,7 +1037,9 @@ class LoginRegisterComponent extends Component {
name="username" name="username"
className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"} className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
onBlur={(e) => this.inputOnBlur(e, 1)} onBlur={(e) => this.inputOnBlur(e, 1)}
style={{marginTop: '30px', height: '38px'}}></Input> style={{marginTop: '30px', height: '38px'}}
onPressEnter={() => this.postLogin()}
></Input>
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
@ -1023,8 +1049,9 @@ class LoginRegisterComponent extends Component {
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
} }
<Input type="password" name="password" id="password" value={this.state.password} <Input type="password" name="password" id="password" value={this.state.password}
onChange={this.passwordonChange} onChange={this.passwordonChange}
onPressEnter={() => this.postLogin()}
className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"} className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
placeholder="密码"></Input> placeholder="密码"></Input>
{ {

Loading…
Cancel
Save