From 10609006227d6ddb34dc03de6271693b26617eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 13 Oct 2019 12:35:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=20=E5=BE=AE=E4=BF=A1=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/LoginDialog.js | 36 +++++++++++++++++-- .../modules/paths/PathDetail/DetailCards.js | 13 +++---- public/react/src/modules/tpm/TPMBanner.js | 2 +- .../src/modules/tpm/TPMFork/TPMForklist.js | 2 +- .../src/modules/tpm/shixuns/ShixunCard.js | 2 +- .../modules/user/LoginRegisterComponent.js | 28 ++++++++++++--- 6 files changed, 66 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index b15518a4f..3f5afd845 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -349,8 +349,25 @@ class LoginDialog extends Component { // console.log(nextProps.isRender); } - + IsPC=()=>{ + var userAgentInfo = navigator.userAgent; + var Agents = ["Android", "iPhone", + "SymbianOS", "Windows Phone", + "iPad", "iPod"]; + var flag = true; + for (var v = 0; v < Agents.length; v++) { + if (userAgentInfo.indexOf(Agents[v]) > 0) { + flag = false; + break; + } + } + return flag; + } componentDidMount() { + let flag = this.IsPC(); //true为PC端,false为手机端 + this.setState({ + isphone:flag + }) if(this.props.isRender!=undefined){ this.setState({ @@ -536,6 +553,19 @@ class LoginDialog extends Component { modalsType={this.state.MyEduCoderModals} setNotcompleteds={()=>{this.setNotcompleteds()}} /> + + {this.state.isphone===false?:""} {isRender===true?
{this.handleDialogClose()}}> @@ -622,7 +652,7 @@ class LoginDialog extends Component {

-

+ {this.state.isphone===true?

———————— 快速登录 ————————

@@ -630,7 +660,7 @@ class LoginDialog extends Component { 微信登录
-

+

:""} } {weixinlogin===true?