微信登录调整

competitions
杨树明 5 years ago
parent 8bda0a6c1b
commit c1e2ca77a0

@ -21,16 +21,16 @@ let hashTimeout
// TODO 开发期多个身份切换 // TODO 开发期多个身份切换
let debugType ="" let debugType =""
if (isDev) { // if (isDev) {
const _search = window.location.search; // const _search = window.location.search;
let parsed = {}; // let parsed = {};
if (_search) { // if (_search) {
parsed = queryString.parse(_search); // parsed = queryString.parse(_search);
} // }
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : // debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : // window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' // window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
} // }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {
initOnlineOfflineListener() initOnlineOfflineListener()

@ -20,9 +20,6 @@ var newContainer={
top: "0px", top: "0px",
bottom: "0px", bottom: "0px",
minHeight: "100%", minHeight: "100%",
overflow:"hidden",
} }
class EducoderInteresse extends Component { class EducoderInteresse extends Component {
constructor(props) { constructor(props) {

@ -60,7 +60,6 @@ var newContainer={
top: "0px", top: "0px",
bottom: "0px", bottom: "0px",
minHeight: "100%", minHeight: "100%",
overflow:"hidden",
paddingTop: "40px", paddingTop: "40px",
} }

@ -21,7 +21,7 @@
overflow-y:hidden !important; overflow-y:hidden !important;
} }
#log_reg_content{ #log_reg_content{
top: 0px !important; top: -64px !important;
} }
#log_reg_content{ #log_reg_content{
width:405px !important; width:405px !important;
@ -106,7 +106,7 @@
#closeIcon{ #closeIcon{
position: absolute; position: absolute;
top: -30px; top: -100px;
right: -27px; right: -27px;
z-index: 100000; z-index: 100000;
} }
@ -131,3 +131,12 @@
.startlogin{ .startlogin{
color:#888; color:#888;
} }
.weixinheight390{
height: 390px;
}
#log_reg_content {
padding: 38px 30px 20px !important;
}
.textcenter{
text-align: center;
}

@ -104,6 +104,7 @@ class LoginDialog extends Component {
MyEduCoderModals:false, MyEduCoderModals:false,
Phonenumberisnotco:undefined, Phonenumberisnotco:undefined,
Phonenumberisnotcobool:false, Phonenumberisnotcobool:false,
weixinlogin:false
}; };
} }
@ -506,9 +507,19 @@ class LoginDialog extends Component {
getloginurl=(url)=>{ getloginurl=(url)=>{
window.location.href = url; window.location.href = url;
}; };
openweixinlogin=()=>{
this.setState({
weixinlogin:true
})
}
hideweixinlogin=()=>{
this.setState({
weixinlogin:false
})
}
render() { render() {
let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco, let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco,
dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state; dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender,weixinlogin}=this.state;
if (isRender === undefined) { if (isRender === undefined) {
isRender = false isRender = false
@ -532,14 +543,14 @@ class LoginDialog extends Component {
</div> </div>
<div id="log_reg_content" > <div id="log_reg_content" >
<ul className="log_nav clearfix"> {weixinlogin===true?"": <ul className="log_nav clearfix">
<li className={login==0?'active':''} onClick={()=>{this.enter(0)}}>登录</li> <li className={login==0?'active':''} onClick={()=>{this.enter(0)}}>登录</li>
{/*<li className={speedy==0?'active':''} onClick={()=>{this.register(0)}}>快捷登录</li>*/} {/*<li className={speedy==0?'active':''} onClick={()=>{this.register(0)}}>快捷登录</li>*/}
</ul> </ul>}
<div className="login-panel" id="login-panel-1" style={{display: login==0?'block':'none'}}> <div className="login-panel" id="login-panel-1" style={{display: login==0?'block':'none'}}>
<form acceptCharset="UTF-8" action="/login" id="main_login_form" method="post"> {weixinlogin===true?"":<form acceptCharset="UTF-8" action="/login" id="main_login_form" method="post">
<div style={{"display":"inline","padding":"0","margin":"0"}}> <div style={{"display":"inline","padding":"0","margin":"0"}}>
<input name="utf8" type="hidden" value="✓"></input> <input name="utf8" type="hidden" value="✓"></input>
@ -611,12 +622,26 @@ class LoginDialog extends Component {
</p> </p>
{/*<p className="clearfix mt20">*/} <p className="clearfix mt20">
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/} <span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./WeChat.png')} alt="微信登录"/>
</a>
</div>
</p>
{/*</p>*/} </form>}
</form> {weixinlogin===true?<iframe
className={"weixinheight390"}
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">
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回账号登录</a>
</p>:""}
</div> </div>
{/*快捷登录*/} {/*快捷登录*/}

@ -890,7 +890,9 @@ class LoginRegisterComponent extends Component {
console.log(classpass); console.log(classpass);
return ( return (
<div className="login_register_content login_register_contents" style={ parseInt(tab[0])==0?{height: "366px"} :{height: "510px"}}> <div className="login_register_content login_register_contents"
// style={ parseInt(tab[0])==0?{height: "366px"} :{height: "510px"}}
>
<style> <style>
{ {
` `
@ -992,6 +994,15 @@ class LoginRegisterComponent extends Component {
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postLogin()} <Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postLogin()}
size={"large"}>登录</Button> size={"large"}>登录</Button>
<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
</div>
</p>
</div> </div>
} }
@ -1139,15 +1150,25 @@ class LoginRegisterComponent extends Component {
color: '#676767', color: '#676767',
}}>我已阅读并同意 }}>我已阅读并同意
<span> <span>
<a href={'/help?index=4'} target="_blank" >服务协议条款</a> <a href={'/help?index=4'} target="_blank" className={"color-blue"}>服务协议条款</a>
</span></span></Checkbox> </span></span></Checkbox>
<Button className=" font-16" type="primary" style={{height:"46px", width: "100%",marginTop:"26px"}} onClick={() => this.postregistered()} <Button className=" font-16 mb20" type="primary" style={{height:"46px", width: "100%",marginTop:"26px"}} onClick={() => this.postregistered()}
size={"large"}>注册</Button> size={"large"}>注册</Button>
<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
</div>
</p>
</div> </div>
} }
</div> </div>
</div> </div>
); );
} }

@ -266,3 +266,13 @@
.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix { .ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
background: transparent !important; background: transparent !important;
} }
.startlogin{
color:#888;
}
.weixinheight390{
height: 390px;
}
#log_reg_content {
padding: 38px 30px 20px !important;
}

@ -58,7 +58,7 @@
.login_btn { .login_btn {
width: 100%; width: 100%;
margin-top: 26px; margin-top: 26px;
margin-bottom: 26px; margin-bottom: 20px;
} }
.dragValidator { .dragValidator {
margin-bottom: 16px; margin-bottom: 16px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Loading…
Cancel
Save