调整登录注册微信登录

competitions
杨树明 5 years ago
parent c1e2ca77a0
commit 5348725dc0

@ -594,7 +594,10 @@ class LoginRegisterComponent extends Component {
})
}
gobackshowbool=()=>{
this.props.history.push("/login");
this.props.Setshowbool(1)
}
render() {
const {
// 登录
@ -621,7 +624,7 @@ class LoginRegisterComponent extends Component {
// height: 346px;
return (
<div className="login_register_content" style={{height: "470px"}}>
<div className="login_register_content" >
<ReadPassword
modalsType={this.state.modalsType}
StudyMakeMoney={()=>this.StudyMakeMoney()}
@ -801,6 +804,9 @@ class LoginRegisterComponent extends Component {
<Button size={"large"} type="primary"
style={{height:"46px", width: "100%",marginBottom:"26px"}}
onClick={this.Retrievepassword}>完成</Button>
<p className="clearfix mb20 textcenter">
<a className={"startlogin color-blue"} onClick={()=>this.gobackshowbool()}>返回登录注册</a>
</p>
</div>
</div>

@ -67,7 +67,7 @@ class LoginRegisterComponent extends Component {
MyEduCoderModals:false,
registered:undefined,
Phonenumberisnotcodmms:undefined,
weixinlogin:false,
}
}
if(props.loginstatus === false){
@ -105,6 +105,7 @@ class LoginRegisterComponent extends Component {
MyEduCoderModals:false,
registered:undefined,
Phonenumberisnotcodmms:undefined,
weixinlogin:false,
}
}
@ -857,6 +858,17 @@ class LoginRegisterComponent extends Component {
registered:"注册成功"
})
};
openweixinlogin=()=>{
this.setState({
weixinlogin:true
})
}
hideweixinlogin=()=>{
this.setState({
weixinlogin:false
})
}
render() {
const {
// 登录
@ -881,13 +893,14 @@ class LoginRegisterComponent extends Component {
readAgreement,
pciphone,
Phonenumberisnotcodmms,
weixinlogin
} = this.state
// height: 346px;
if (this.state.seconds === 0) {
// window.location.href='http://www.cnblogs.com/a-cat/';
}
console.log(classpass);
return (
<div className="login_register_content login_register_contents"
@ -905,13 +918,13 @@ class LoginRegisterComponent extends Component {
</style>
<div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
{weixinlogin===false?<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>
</Menu>:""}
{
parseInt(tab[0])==0 &&
{
weixinlogin===false&&parseInt(tab[0])==0 &&
<div style={{width: '340px'}}>
<style>
{
@ -1008,7 +1021,7 @@ class LoginRegisterComponent extends Component {
{
parseInt(tab[0])==1 &&
weixinlogin===false&&parseInt(tab[0])==1 &&
<div style={{width: '340px'}}>
<Input placeholder="请使用手机号/邮箱账号进行注册"
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
@ -1166,7 +1179,15 @@ class LoginRegisterComponent extends Component {
</p>
</div>
}
{weixinlogin===true?<iframe
className={"weixinheight390 mt20"}
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src="https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2f&response_type=code&scope=snsapi_login#wechat_redirect"></iframe>:""}
{weixinlogin===true?<p className="clearfix mb20 textcenter">
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回登录注册</a>
</p>:""}
</div>
</div>

@ -274,3 +274,7 @@
.ysllw100{
width: 100%;
}
.textcenter{
text-align: center;
}
Loading…
Cancel
Save