|
|
|
@ -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,15 +1033,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">
|
|
|
|
|
{this.state.isphone===true?<p className="clearfix mb10 textcenter">
|
|
|
|
|
|
|
|
|
|
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
|
|
|
|
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
|
|
|
|
<div className={"mt10"}>
|
|
|
|
|
<a onClick={()=>this.openweixinlogin()}>
|
|
|
|
|
<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
|
|
|
|
|