调整手机端 微信登录

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

@ -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?<style>
{
`
#DialogID .dialogBox {
width: 405px !important;
}
.dialogBox {
height: 290px !important;
}
`
}
</style>:""}
{isRender===true?
<div className={dialogBox}>
<div id="closeIcon" onClick={()=>{this.handleDialogClose()}}>
@ -622,7 +652,7 @@ class LoginDialog extends Component {
</p>
<p className="clearfix mt20">
{this.state.isphone===true?<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
@ -630,7 +660,7 @@ class LoginDialog extends Component {
<img src={require('./WeChat.png')} alt="微信登录"/>
</a>
</div>
</p>
</p>:""}
</form>}
{weixinlogin===true?<iframe

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

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

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

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

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

Loading…
Cancel
Save