微信登录调整

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

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

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

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

@ -21,7 +21,7 @@
overflow-y:hidden !important;
}
#log_reg_content{
top: 0px !important;
top: -64px !important;
}
#log_reg_content{
width:405px !important;
@ -106,7 +106,7 @@
#closeIcon{
position: absolute;
top: -30px;
top: -100px;
right: -27px;
z-index: 100000;
}
@ -114,7 +114,7 @@
.bluebutton{
width: 100%;
text-align: center;
color: #FFFFff!important;
color: #FFFFff !important;
display: block;
background: #cbcbcb;
height: 45px;
@ -130,4 +130,13 @@
.startlogin{
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,
Phonenumberisnotco:undefined,
Phonenumberisnotcobool:false,
weixinlogin:false
};
}
@ -506,9 +507,19 @@ class LoginDialog extends Component {
getloginurl=(url)=>{
window.location.href = url;
};
openweixinlogin=()=>{
this.setState({
weixinlogin:true
})
}
hideweixinlogin=()=>{
this.setState({
weixinlogin:false
})
}
render() {
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) {
isRender = false
@ -532,14 +543,14 @@ class LoginDialog extends Component {
</div>
<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={speedy==0?'active':''} onClick={()=>{this.register(0)}}>快捷登录</li>*/}
</ul>
</ul>}
<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"}}>
<input name="utf8" type="hidden" value="✓"></input>
@ -611,12 +622,26 @@ class LoginDialog extends Component {
</p>
{/*<p className="clearfix mt20">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*</p>*/}
</form>
<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./WeChat.png')} alt="微信登录"/>
</a>
</div>
</p>
</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>
{/*快捷登录*/}

@ -890,7 +890,9 @@ class LoginRegisterComponent extends Component {
console.log(classpass);
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>
{
`
@ -992,6 +994,15 @@ class LoginRegisterComponent extends Component {
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postLogin()}
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>
}
@ -1139,15 +1150,25 @@ class LoginRegisterComponent extends Component {
color: '#676767',
}}>我已阅读并同意
<span>
<a href={'/help?index=4'} target="_blank" >服务协议条款</a>
<a href={'/help?index=4'} target="_blank" className={"color-blue"}>服务协议条款</a>
</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>
<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>
);
}

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

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

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