调整登录注册微信登录

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

@ -67,7 +67,7 @@ class LoginRegisterComponent extends Component {
MyEduCoderModals:false, MyEduCoderModals:false,
registered:undefined, registered:undefined,
Phonenumberisnotcodmms:undefined, Phonenumberisnotcodmms:undefined,
weixinlogin:false,
} }
} }
if(props.loginstatus === false){ if(props.loginstatus === false){
@ -105,6 +105,7 @@ class LoginRegisterComponent extends Component {
MyEduCoderModals:false, MyEduCoderModals:false,
registered:undefined, registered:undefined,
Phonenumberisnotcodmms:undefined, Phonenumberisnotcodmms:undefined,
weixinlogin:false,
} }
} }
@ -857,6 +858,17 @@ class LoginRegisterComponent extends Component {
registered:"注册成功" registered:"注册成功"
}) })
}; };
openweixinlogin=()=>{
this.setState({
weixinlogin:true
})
}
hideweixinlogin=()=>{
this.setState({
weixinlogin:false
})
}
render() { render() {
const { const {
// 登录 // 登录
@ -881,13 +893,14 @@ class LoginRegisterComponent extends Component {
readAgreement, readAgreement,
pciphone, pciphone,
Phonenumberisnotcodmms, Phonenumberisnotcodmms,
weixinlogin
} = this.state } = this.state
// height: 346px; // height: 346px;
if (this.state.seconds === 0) { if (this.state.seconds === 0) {
// window.location.href='http://www.cnblogs.com/a-cat/'; // window.location.href='http://www.cnblogs.com/a-cat/';
} }
console.log(classpass);
return ( return (
<div className="login_register_content login_register_contents" <div className="login_register_content login_register_contents"
@ -905,13 +918,13 @@ class LoginRegisterComponent extends Component {
</style> </style>
<div> <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="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.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'}}> <div style={{width: '340px'}}>
<style> <style>
{ {
@ -1008,7 +1021,7 @@ class LoginRegisterComponent extends Component {
{ {
parseInt(tab[0])==1 && weixinlogin===false&&parseInt(tab[0])==1 &&
<div style={{width: '340px'}}> <div style={{width: '340px'}}>
<Input placeholder="请使用手机号/邮箱账号进行注册" <Input placeholder="请使用手机号/邮箱账号进行注册"
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"} className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
@ -1166,7 +1179,15 @@ class LoginRegisterComponent extends Component {
</p> </p>
</div> </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>
</div> </div>

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