From 04d20727ea7ce95e0a05a75568208f53060247e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 4 Nov 2019 14:14:46 +0800 Subject: [PATCH] =?UTF-8?q?qq=E7=99=BB=E5=BD=95start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/login/LoginDialog.css | 8 +- public/react/src/modules/login/LoginDialog.js | 135 +++--------------- .../src/modules/login/Otherloginstart.js | 1 - 3 files changed, 28 insertions(+), 116 deletions(-) diff --git a/public/react/src/modules/login/LoginDialog.css b/public/react/src/modules/login/LoginDialog.css index 9a9373770..37e2f48b6 100644 --- a/public/react/src/modules/login/LoginDialog.css +++ b/public/react/src/modules/login/LoginDialog.css @@ -136,12 +136,18 @@ .startlogin{ color:#888; } + .weixinheight390{ height: 390px; } + +.qqheight390{ + width: 450px; + height: 390px; +} #log_reg_content { padding: 38px 30px 20px !important; } .textcenter{ text-align: center; -} \ No newline at end of file +} diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 6bd6ac41f..6763f0f91 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -7,7 +7,7 @@ import Dialog, { DialogContentText, DialogTitle, } from 'material-ui/Dialog'; -import {notification } from 'antd'; +import {notification,Modal } from 'antd'; import axios from 'axios'; @@ -104,8 +104,8 @@ class LoginDialog extends Component { MyEduCoderModals:false, Phonenumberisnotco:undefined, Phonenumberisnotcobool:false, - weixinlogin:false - + weixinlogin:false, + qqlogin:false }; } enter=(num) =>{ @@ -529,14 +529,23 @@ class LoginDialog extends Component { weixinlogin:true }) } + openqqlogin=()=>{ + this.setState({ + qqlogin:true + }) + window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code` + + // window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&tp=qq&response_type=code` + } hideweixinlogin=()=>{ this.setState({ - weixinlogin:false + weixinlogin:false, + qqlogin:false }) } render() { - let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco, - dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender,weixinlogin}=this.state; + let{qqlogin,login,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco, + dialogBox, isRender,weixinlogin}=this.state; if (isRender === undefined) { isRender = false @@ -659,6 +668,9 @@ class LoginDialog extends Component { this.openweixinlogin()}> 微信登录 + {/*this.openqqlogin()} className={"ml10"}>*/} + {/*qq登录*/} + {/**/}

:""} @@ -669,7 +681,9 @@ class LoginDialog extends Component { 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%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}>:""} - {weixinlogin===true?

+ + + {weixinlogin===true?

this.hideweixinlogin()}>返回账号登录

:""} @@ -690,110 +704,3 @@ class LoginDialog extends Component { export default LoginDialog ; - -// onkeypress="user_login_keypress(event);" - -// onkeypress="user_login_keypress(event);" - - -{/*
-
-
-

-
-
} - - - -{/*第三方账号登录*/} - -{/*
-

第三方账号登录

-
- - - -
-
} - -// -// {/*
*/} -// {/*
*/} -// {/*
*/} -// {/**/} -// {/**/} -// {/*
*/} -// {/**/} -// {/**/} -// {/**/} -// {/*
*/} -// {/*

请输入有效的手机号/邮箱号*/} -// {/*

*/} -// {/*
*/} -// -// {/*
*/} -// {/*/!*drag*/ }*/} -// {/*
*/} -// {/*
*/} -// {/*
*/} -// {/*请按住滑块,拖动到最右边*/} -// {/*
*/} -// {/*
*/} -// {/*
*/} -// {/*
*/} -// {/*

请先拖动滑块完成验证

*/} -// {/*
*/} -// {/*
*/} -// -// {/*

*/} -// {/**/} -// {/**/} -// {/**/} -// {/*

*/} -// -// {/*
*/} -// {/*

*/} -// {/*请输入验证码*/} -// {/*

*/} -// {/*
*/} -// -// {/**/} -// -// {/*

*/} -// -// {/**/} -// {/**/} -// {/**/} -// {/**/} -// -// {/**/} -// {/*忘记密码*/} -// {/*注册*/} -// {/**/} -// -// {/*

*/} -// {/**/} -// {/*
*/} diff --git a/public/react/src/modules/login/Otherloginstart.js b/public/react/src/modules/login/Otherloginstart.js index fc5d46bbc..97e06f9da 100644 --- a/public/react/src/modules/login/Otherloginstart.js +++ b/public/react/src/modules/login/Otherloginstart.js @@ -10,7 +10,6 @@ class Otherloginstart extends Component { let query=this.props.location.search; const type = query.split('?code='); const types = type[1].split('&state='); - console.log(types) let codeurl = `/auth/wechat/callback.json` axios.get(codeurl,{params:{ code:types[0]