清理代码
This commit is contained in:
parent
6c4e1c6665
commit
6a588db7f6
|
@ -8,27 +8,6 @@ import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
|
||||||
import educodernet from '../../../src/images/login/logo.png';
|
import educodernet from '../../../src/images/login/logo.png';
|
||||||
import LoginRegisterComponent from '../user/LoginRegisterComponent';
|
import LoginRegisterComponent from '../user/LoginRegisterComponent';
|
||||||
import FindPasswordComponent from '../user/FindPasswordComponent';
|
import FindPasswordComponent from '../user/FindPasswordComponent';
|
||||||
import passopen from "../../images/login/passopen.png";
|
|
||||||
//educoder登入页面
|
|
||||||
var sectionStyle = {
|
|
||||||
"height": "100%",
|
|
||||||
"width": "100%",
|
|
||||||
"min-width": "1000px",
|
|
||||||
// makesure here is String确保这里是一个字符串,以下是es6写法
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
var imgback = {
|
|
||||||
" background-size":"cover",
|
|
||||||
"background-repeat":"no-repeat",
|
|
||||||
backgroundImage: `url(${beijintulogontwo})`,
|
|
||||||
}
|
|
||||||
var imgmian ={
|
|
||||||
width: "100%",
|
|
||||||
background: `url(${beijintulogontwo})`,
|
|
||||||
position: "relative",
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
var newContainer={
|
var newContainer={
|
||||||
background: `url(${beijintulogontwo})`,
|
background: `url(${beijintulogontwo})`,
|
||||||
|
@ -67,7 +46,6 @@ class EducoderLogin extends Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
}else if(props.match.url === "/register"){
|
}else if(props.match.url === "/register"){
|
||||||
// showbool: 1,
|
|
||||||
this.state = {
|
this.state = {
|
||||||
showbool: 1,
|
showbool: 1,
|
||||||
loginstatus:false,
|
loginstatus:false,
|
||||||
|
@ -84,23 +62,12 @@ class EducoderLogin extends Component {
|
||||||
loginstatus:true,
|
loginstatus:true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
// console.log("EducoderLogin");
|
|
||||||
// console.log(this.props);
|
|
||||||
}
|
|
||||||
|
|
||||||
Setlogins=(i)=>{
|
Setlogins=(i)=>{
|
||||||
console.log("96ye");
|
|
||||||
console.log(i)
|
|
||||||
this.setState({
|
this.setState({
|
||||||
logini:i
|
logini:i
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
gohome=()=>{
|
gohome=()=>{
|
||||||
window.location.href="/"
|
window.location.href="/"
|
||||||
|
|
|
@ -419,23 +419,6 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
//注册接口
|
//注册接口
|
||||||
postregistered = () => {
|
postregistered = () => {
|
||||||
// if (this.state.logins === undefined || this.state.logins === "") {
|
|
||||||
// this.openNotification(`请输入登录手机号码或邮箱`,2);
|
|
||||||
//
|
|
||||||
// return
|
|
||||||
// } else if (this.state.dragOk === false) {
|
|
||||||
// this.openNotification(`请拖动滑块验证`,2);
|
|
||||||
// return
|
|
||||||
// } else if (this.state.codes === undefined || this.state.codes == "") {
|
|
||||||
// this.openNotification(`请输入验证码`,2);
|
|
||||||
// return
|
|
||||||
// } else if (this.state.passwords === undefined || this.state.passwords == "") {
|
|
||||||
// this.openNotification(`请输入密码`,2);
|
|
||||||
// return
|
|
||||||
// } else if (this.state.Agreetotheterms === false) {
|
|
||||||
// this.openNotification(`请同意服务协议条款`,2);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
if (this.state.logins === undefined || this.state.logins === "" || this.state.logins.length === 0) {
|
if (this.state.logins === undefined || this.state.logins === "" || this.state.logins.length === 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: "账号不能为空",
|
Phonenumberisnotcos: "账号不能为空",
|
||||||
|
@ -445,25 +428,8 @@ class LoginRegisterComponent extends Component {
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.state.pciphone === true) {
|
|
||||||
if (this.state.dragOk === false) {
|
|
||||||
// this.openNotification(`请拖动滑块完成验证`,2);
|
|
||||||
this.setState({
|
|
||||||
Phonenumberisnotcosytdhk: "请拖动滑块完成验证",
|
|
||||||
dragOk: false,
|
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.state.codes === undefined || this.state.codes == "" || this.state.codes.length === 0) {
|
if (this.state.passwords === undefined || this.state.passwords == "" || this.state.passwords.length === 0) {
|
||||||
// this.openNotification(`请输入验证码`,2);
|
|
||||||
this.setState({
|
|
||||||
Phonenumberisnotcosyzm: "验证码不能为空",
|
|
||||||
})
|
|
||||||
return
|
|
||||||
} else if (this.state.passwords === undefined || this.state.passwords == "" || this.state.passwords.length === 0) {
|
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosymmm: "密码不能为空",
|
Phonenumberisnotcosymmm: "密码不能为空",
|
||||||
})
|
})
|
||||||
|
@ -478,9 +444,6 @@ class LoginRegisterComponent extends Component {
|
||||||
Phonenumberisnotcosymmm: "密码不能超过16位",
|
Phonenumberisnotcosymmm: "密码不能超过16位",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else if (this.state.Agreetotheterms === false) {
|
|
||||||
this.openNotification(`请同意服务协议条款`, 2);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let url;
|
let url;
|
||||||
|
@ -947,13 +910,7 @@ class LoginRegisterComponent extends Component {
|
||||||
: <div style={{ height: "25px" }}></div>
|
: <div style={{ height: "25px" }}></div>
|
||||||
|
|
||||||
}
|
}
|
||||||
{/* {this.props.mygetHelmetapi && this.props.mygetHelmetapi.main_site === true ? <Checkbox onChange={this.onChange}
|
<Button className=" font-16 mb20" type="primary" style={this.props.settings && this.props.settings.main_site === true ? { height: "46px", width: "100%", marginTop: "26px" } : { height: "46px", width: "100%" }} onClick={() => this.postregistered()}
|
||||||
checked={Agreetotheterms}
|
|
||||||
>
|
|
||||||
<span className="font-14 " style={{color: '#676767'}}>我已阅读并同意<span>
|
|
||||||
<a href={'https://forge.educoder.net/help?index=4'} target="_blank" className={"color-blue"}>《服务协议条款》</a>
|
|
||||||
</span></span></Checkbox> : ""} */}
|
|
||||||
<Button className=" font-16 mb20" type="primary" style={this.props.mygetHelmetapi && this.props.mygetHelmetapi.main_site === true ? { height: "46px", width: "100%", marginTop: "26px" } : { height: "46px", width: "100%" }} onClick={() => this.postregistered()}
|
|
||||||
size={"large"}>{this.props.weixinlogin ? "注册并绑定" : "注册"}</Button>
|
size={"large"}>{this.props.weixinlogin ? "注册并绑定" : "注册"}</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue