调整手机端 微信登录

competitions
杨树明 5 years ago
parent 53a449728f
commit 1060900622

@ -349,8 +349,25 @@ class LoginDialog extends Component {
// console.log(nextProps.isRender); // 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() { componentDidMount() {
let flag = this.IsPC(); //true为PC端false为手机端
this.setState({
isphone:flag
})
if(this.props.isRender!=undefined){ if(this.props.isRender!=undefined){
this.setState({ this.setState({
@ -536,6 +553,19 @@ class LoginDialog extends Component {
modalsType={this.state.MyEduCoderModals} modalsType={this.state.MyEduCoderModals}
setNotcompleteds={()=>{this.setNotcompleteds()}} setNotcompleteds={()=>{this.setNotcompleteds()}}
/> />
{this.state.isphone===false?<style>
{
`
#DialogID .dialogBox {
width: 405px !important;
}
.dialogBox {
height: 290px !important;
}
`
}
</style>:""}
{isRender===true? {isRender===true?
<div className={dialogBox}> <div className={dialogBox}>
<div id="closeIcon" onClick={()=>{this.handleDialogClose()}}> <div id="closeIcon" onClick={()=>{this.handleDialogClose()}}>
@ -622,7 +652,7 @@ class LoginDialog extends Component {
</p> </p>
<p className="clearfix mt20"> {this.state.isphone===true?<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span> <span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}> <div className={"mt10"}>
@ -630,7 +660,7 @@ class LoginDialog extends Component {
<img src={require('./WeChat.png')} alt="微信登录"/> <img src={require('./WeChat.png')} alt="微信登录"/>
</a> </a>
</div> </div>
</p> </p>:""}
</form>} </form>}
{weixinlogin===true?<iframe {weixinlogin===true?<iframe

@ -199,12 +199,13 @@ class DetailCards extends Component{
this.props.showLoginDialog() this.props.showLoginDialog()
return return
} }
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({ if(this.props.checkIfProfileCompleted()===false){
// AccountProfiletype:true this.props.showProfileCompleteDialog()
// }) return
// return }
// }
// if(this.props.checkIfProfessionalCertification()===false){ // if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog() // this.props.showProfileCompleteDialog()
// return // return

@ -586,7 +586,7 @@ class TPMBanner extends Component {
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
const MyRate = ({ defaultValue, ...rest }) => { const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue; let myValue = defaultValue;
console.log(myValue-Math.floor(myValue)) // console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) { // if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5; // myValue = Math.floor(myValue) + 0.5;
// } // }

@ -90,7 +90,7 @@ export default class TPMFork_listComponent extends Component {
const MyRate = ({ defaultValue, ...rest }) => { const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue; let myValue = defaultValue;
console.log(myValue-Math.floor(myValue)) // console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) { // if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5; // myValue = Math.floor(myValue) + 0.5;
// } // }

@ -48,7 +48,7 @@ class ShixunCard extends Component {
let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props; let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props;
const MyRate = ({ defaultValue, ...rest }) => { const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue; let myValue = defaultValue;
console.log(myValue-Math.floor(myValue)) // console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) { // if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5; // myValue = Math.floor(myValue) + 0.5;
// } // }

@ -130,7 +130,25 @@ class LoginRegisterComponent extends Component {
changeType = () => { changeType = () => {
this.setState({classpass: 'password'}); this.setState({classpass: 'password'});
} }
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 = () => { componentDidMount = () => {
let flag = this.IsPC(); //true为PC端false为手机端
this.setState({
isphone:flag
})
// console.log("componentDidUpdate"); // console.log("componentDidUpdate");
// console.log(this.props); // console.log(this.props);
let pcipns=this.IsPC(); let pcipns=this.IsPC();
@ -1015,7 +1033,7 @@ 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"> {this.state.isphone===true?<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span> <span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}> <div className={"mt10"}>
@ -1023,7 +1041,7 @@ class LoginRegisterComponent extends Component {
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
</div> </div>
</p> </p>:""}
</div> </div>
} }
@ -1176,7 +1194,7 @@ class LoginRegisterComponent extends Component {
<Button className=" font-16 mb20" 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"> {this.state.isphone===true?<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span> <span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}> <div className={"mt10"}>
@ -1184,7 +1202,7 @@ class LoginRegisterComponent extends Component {
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
</div> </div>
</p> </p>:""}
</div> </div>
} }
{weixinlogin===true?<iframe {weixinlogin===true?<iframe

Loading…
Cancel
Save