清理代码

This commit is contained in:
caishi 2021-03-31 15:03:16 +08:00
parent 6c4e1c6665
commit 6a588db7f6
2 changed files with 2 additions and 78 deletions

View File

@ -8,27 +8,6 @@ import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/logo.png';
import LoginRegisterComponent from '../user/LoginRegisterComponent';
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={
background: `url(${beijintulogontwo})`,
@ -67,7 +46,6 @@ class EducoderLogin extends Component {
}
}else if(props.match.url === "/register"){
// showbool: 1,
this.state = {
showbool: 1,
loginstatus:false,
@ -84,23 +62,12 @@ class EducoderLogin extends Component {
loginstatus:true,
}
}
}
}
componentDidMount() {
// console.log("EducoderLogin");
// console.log(this.props);
}
Setlogins=(i)=>{
console.log("96ye");
console.log(i)
this.setState({
logini:i
})
}
gohome=()=>{
window.location.href="/"

View File

@ -419,23 +419,6 @@ class LoginRegisterComponent extends Component {
}
//注册接口
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) {
this.setState({
Phonenumberisnotcos: "账号不能为空",
@ -445,25 +428,8 @@ class LoginRegisterComponent extends Component {
})
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) {
// this.openNotification(`请输入验证码`,2);
this.setState({
Phonenumberisnotcosyzm: "验证码不能为空",
})
return
} else if (this.state.passwords === undefined || this.state.passwords == "" || this.state.passwords.length === 0) {
if (this.state.passwords === undefined || this.state.passwords == "" || this.state.passwords.length === 0) {
this.setState({
Phonenumberisnotcosymmm: "密码不能为空",
})
@ -478,9 +444,6 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcosymmm: "密码不能超过16位",
})
return
} else if (this.state.Agreetotheterms === false) {
this.openNotification(`请同意服务协议条款`, 2);
return;
}
let url;
@ -947,13 +910,7 @@ class LoginRegisterComponent extends Component {
: <div style={{ height: "25px" }}></div>
}
{/* {this.props.mygetHelmetapi && this.props.mygetHelmetapi.main_site === true ? <Checkbox onChange={this.onChange}
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()}
<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()}
size={"large"}>{this.props.weixinlogin ? "注册并绑定" : "注册"}</Button>
</div>
</div>