本地版本-注册页面

This commit is contained in:
caishi 2020-11-18 11:31:52 +08:00
parent 1867497d52
commit cbfb9c3ffe
8 changed files with 325 additions and 1419 deletions

111
public/css/merge.css Executable file
View File

@ -0,0 +1,111 @@
.CodeMirror-merge {
position: relative;
white-space: pre;
}
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
min-height:50px;
}
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 48%; }
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 4%; }
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
.CodeMirror-merge-pane {
display: inline-block;
white-space: normal;
vertical-align: top;
}
.CodeMirror-merge-pane-rightmost {
position: absolute;
right: 0px;
z-index: 1;
}
.CodeMirror-merge-gap {
z-index: 2;
display: inline-block;
height: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
position: relative;
background: #515151;
}
.CodeMirror-merge-scrolllock-wrap {
position: absolute;
bottom: 0; left: 50%;
}
.CodeMirror-merge-scrolllock {
position: relative;
left: -50%;
cursor: pointer;
color: #d8d8d8;
line-height: 1;
}
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
position: absolute;
left: 0; top: 0;
right: 0; bottom: 0;
line-height: 1;
}
.CodeMirror-merge-copy {
position: absolute;
cursor: pointer;
color: #ce374b;
z-index: 3;
}
.CodeMirror-merge-copy-reverse {
position: absolute;
cursor: pointer;
color: #44c;
}
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
background-position: bottom left;
background-repeat: repeat-x;
}
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
background-position: bottom left;
background-repeat: repeat-x;
}
.CodeMirror-merge-r-chunk { background: #9a6868; }
.CodeMirror-merge-r-chunk-start { /*border-top: 1px solid #ee8; */}
.CodeMirror-merge-r-chunk-end {/* border-bottom: 1px solid #ee8; */}
.CodeMirror-merge-r-connect { fill:#9a6868;}
.CodeMirror-merge-l-chunk { background: #eef; }
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
.CodeMirror-merge-collapsed-widget:before {
content: "(...)";
}
.CodeMirror-merge-collapsed-widget {
cursor: pointer;
color: #88b;
background: #eef;
border: 1px solid #ddf;
font-size: 90%;
padding: 0 3px;
border-radius: 4px;
}
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }

View File

@ -76,6 +76,10 @@ const OrganizeIndex = Loadable({
loader: () => import('./forge/Team/Index'),
loading: Loading,
})
const EducoderLogin = Loadable({
loader: () => import('./modules/login/EducoderLogin'),
loading: Loading,
})
class App extends Component {
constructor(props) {
@ -240,7 +244,15 @@ class App extends Component {
}
}>
</Route>
<Route
path="/register"
render={
(props) => {
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
}
}
/>
{/*403*/}
<Route path="/403" component={Shixunauthority} />

View File

@ -341,7 +341,7 @@ class order extends Component {
});
};
islogin() {
islogin=()=>{
this.props.showLoginDialog();
}
renderNew =()=>{

View File

@ -1,6 +1,6 @@
import React, {Component} from "react";
import React, { Component } from "react";
import moment from 'moment';
import { SnackbarHOC,getImageUrl } from 'educoder';
import { getImageUrl } from 'educoder';
import '../courses/css/members.css';
import "../courses/common/formCommon.css"
import '../courses/css/Courses.css';
@ -8,121 +8,90 @@ import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.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={
var newContainer = {
background: `url(${beijintulogontwo})`,
backgroundPosition: "center" ,
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
height:" 100%",
width:" 100%",
height: " 100%",
width: " 100%",
position: "absolute",
top: "0px",
bottom: "0px",
minHeight: "100%",
minHeight: "100%",
paddingTop: "40px",
display:"flex",
alignItems:"center",
justifyContent:"center"
}
class EducoderLogin extends Component {
constructor(props) {
super(props);
if( props.match.url === "/changepassword" ){
if (props.match.url === "/changepassword") {
this.state = {
showbool: 3,
logini:3,
namezh:"",
passmm:"",
loginstatus:true,
logini: 3,
namezh: "",
passmm: "",
loginstatus: true,
}
}else {
if(props.match.url === "/login"){
} else {
if (props.match.url === "/login") {
this.state = {
showbool: 1,
loginstatus:true,
logini:1,
namezh:"",
passmm:""
loginstatus: true,
logini: 1,
namezh: "",
passmm: ""
}
}else if(props.match.url === "/register"){
// showbool: 1,
this.state = {
showbool: 1,
loginstatus:false,
logini:2,
namezh:"",
passmm:""
}
}else{
} else if (props.match.url === "/register") {
this.state = {
showbool: 1,
logini:1,
namezh:"",
passmm:"",
loginstatus:true,
loginstatus: false,
logini: 2,
namezh: "",
passmm: ""
}
} else {
this.state = {
showbool: 1,
logini: 1,
namezh: "",
passmm: "",
loginstatus: true,
}
}
}
}
componentDidMount() {
// console.log("EducoderLogin");
// console.log(this.props);
}
Setlogins=(i)=>{
Setlogins = (i) => {
console.log("96ye");
console.log(i)
this.setState({
logini:i
logini: i
})
}
gohome=()=>{
window.location.href="/"
gohome = () => {
window.location.href = "/"
}
Setshowbool = (e,name,pass) => {
if (e===1) {
Setshowbool = (e, name, pass) => {
if (e === 1) {
this.setState({
showbool: 1
})
} else if(e===3){
} else if (e === 3) {
this.setState({
showbool: 3
})
}
}
render() {
let {showbool,loginstatus,logini} = this.state;
// console.log("EducoderLogingetHelmetapi");
// console.log(this.props);
// console.log(this.props.mygetHelmetapi);
let { showbool } = this.state;
return (
<div style={newContainer} className=" clearfix" >
@ -133,13 +102,13 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%"
}}>
<div style={{cursor:"pointer"}}>
<div style={{ cursor: "pointer" }}>
{this.props.mygetHelmetapi === null ? ""
:
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.login_logo_url===null|| this.props.mygetHelmetapi.login_logo_url===undefined?
<img style={{cursor:"pointer"}} onClick={()=>this.gohome()} src={educodernet}/>
:
<img style={{cursor:"pointer"}} onClick={()=>this.gohome()} src={getImageUrl(this.props.mygetHelmetapi.login_logo_url)}/>
:
this.props.mygetHelmetapi === undefined || this.props.mygetHelmetapi.login_logo_url === null || this.props.mygetHelmetapi.login_logo_url === undefined ?
<img style={{ cursor: "pointer", width: "80px" }} onClick={() => this.gohome()} src={educodernet} />
:
<img style={{ cursor: "pointer", width: "80px" }} onClick={() => this.gohome()} src={getImageUrl(this.props.mygetHelmetapi.login_logo_url)} />
}
</div>
@ -157,48 +126,48 @@ class EducoderLogin extends Component {
<div>
<LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
Setshowbool={(e) => this.Setshowbool(e)} ></LoginRegisterComponent>
</div>
</div>
:
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
marginTop: "25px",
}}>
<div >
<FindPasswordComponent {...this.props} {...this.state}
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
:
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
marginTop: "25px",
}}>
<div >
<FindPasswordComponent {...this.props} {...this.state}
Setshowbool={(e) => this.Setshowbool(e)}></FindPasswordComponent>
</div>
</div>
</div>
</div>
}
{this.props.mygetHelmetapi === null ? <div style={{
display: "flex",
justifyContent: "center",
width: "100%",
}}>
<div className="font-14 color-grey-9 " style={{ marginTop: "20px" }}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{ "color": "#888" }} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div> :
this.props.mygetHelmetapi === undefined || this.props.mygetHelmetapi.main_site === null || this.props.mygetHelmetapi.main_site === undefined ? <div style={{
display: "flex",
justifyContent: "center",
width: "100%",
}}>
<div className="font-14 color-grey-9 " style={{ marginTop: "20px" }}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{ "color": "#888" }} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div> : this.props.mygetHelmetapi.main_site === true ?
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
}}>
<div className="font-14 color-grey-9 " style={{ marginTop: "20px" }}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{ "color": "#888" }} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
: ""
}
{this.props.mygetHelmetapi === null ? <div style={{
display: "flex",
justifyContent: "center",
width: "100%",
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>:
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined? <div style={{
display: "flex",
justifyContent: "center",
width: "100%",
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>:this.props.mygetHelmetapi.main_site===true?
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
:""
}
</div>
</div>
@ -206,16 +175,4 @@ class EducoderLogin extends Component {
}
}
export default EducoderLogin ;
// showbool === 2 ?
// <div style={{
// display: "flex",
// justifyContent: "center",
// width: "100%",
// height: "630px",
// marginTop: "44px",
// }}>
// <InterestpageComponent {...this.props} {...this.state}>
// </InterestpageComponent>
// </div>
// :
export default EducoderLogin;

View File

@ -1,13 +1,7 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import Dialog, {
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
} from 'material-ui/Dialog';
import { notification, Modal } from 'antd';
import { Link } from 'react-router-dom';
import Dialog from 'material-ui/Dialog';
import { notification } from 'antd';
import axios from 'axios';
@ -582,7 +576,7 @@ class LoginDialog extends Component {
<span className="fr">
<a onClick={(url) => this.getloginurl("https://www.trustie.net/account/lost_password")}
className="mr3 color-grey-9">找回密码</a><em className="vertical-line"></em>
<a onClick={(url) => this.getloginurl("https://www.trustie.net/login?login=false")} className="color-grey-9">注册</a>
<Link to={"/register"} className="color-grey-9">注册</Link>
</span>
</p>

View File

@ -815,7 +815,7 @@ class NewHeader extends Component {
<a onClick={() => this.educoderlogin()} className="mr5 color-grey-6">登录</a>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
<span><em className="vertical-line"></em><a className="ml5 color-grey-6" href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank"></a></span>
<span><em className="vertical-line"></em><Link className="ml5 color-grey-6" to={`/register`}></Link></span>
}
</span>
: user.login === "" ?
@ -823,7 +823,7 @@ class NewHeader extends Component {
<a onClick={() => this.educoderlogin()} className="mr5 color-grey-6">登录</a>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
<span><em className="vertical-line"></em><a className="color-grey-6 ml5" href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank"></a></span>
<span><em className="vertical-line"></em><Link className="color-grey-6 ml5" to={`/register`}></Link></span>
}
</span>
:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
.registerPanel{
padding:20px 40px 25px 40px;
}
.registerPanel input{
height: 40px;
}
.registerPanel .ant-row.ant-form-item{
margin-bottom: 25px;
}
.registerPanel .ant-form.ant-form-horizontal{
margin-top: 20px;
}
.registerPanel .ant-menu-item{
margin-left: 0px!important;
padding: 0px;
}
.ant-form-explain{
position: absolute;
}
form .has-feedback .ant-input-affix-wrapper .ant-input-suffix{
padding-right: 0px!important;
}