hjm 6 years ago
commit d7782a577f

@ -209,7 +209,7 @@ const UsersInfo = Loadable({
// 兴趣页面 // 兴趣页面
const Interestpage = Loadable({ const Interestpage = Loadable({
loader: () => import('./modules/user/Interestpage'), loader: () => import('./modules/login/EducoderInteresse'),
loading: Loading, loading: Loading,
}) })
@ -274,7 +274,7 @@ class App extends Component {
<Switch> <Switch>
{/*<Route path="/login" component={LoginRegisterPage}/>*/} {/*<Route path="/login" component={LoginRegisterPage}/>*/}
{/*认证*/} {/*认证*/}
<Route path="/profile" component={AccountPage}/> <Route path="/account" component={AccountPage}/>
{/*403*/} {/*403*/}
<Route path="/403" component={Shixunauthority}/> <Route path="/403" component={Shixunauthority}/>
@ -301,7 +301,10 @@ class App extends Component {
<Route <Route
path="/changepassword" component={EducoderLogin} path="/changepassword" component={EducoderLogin}
/> />
<Route
path="/interesse" component={Interestpage}
/>
<Route path="/shixuns/new" component={Newshixuns}> <Route path="/shixuns/new" component={Newshixuns}>
</Route> </Route>

@ -21,6 +21,7 @@ function locationurl(list){
const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' : const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
window._debugType = debugType; window._debugType = debugType;
// const debugType ="";
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation // TODO 避免重复的请求 https://github.com/axios/axios#cancellation
@ -145,7 +146,10 @@ export function initAxiosInterceptors(props) {
} }
if (response.data.status === 402) { if (response.data.status === 402) {
locationurl(response.data.url); debugger
console.log(response.data.status);
console.log(response.data);
locationurl(response.data.message);
} }

@ -0,0 +1,86 @@
import React, {Component} from "react";
import '../courses/css/members.css';
import "../courses/common/formCommon.css"
import '../courses/css/Courses.css';
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png';
import InterestpageComponent from '../user/Interestpage'
//educoder登入页面
var newContainer={
background: `url(${beijintulogontwo})`,
backgroundPosition: "center" ,
backgroundRepeat: "no-repeat",
backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
height:" 100%",
width:" 100%",
position: "absolute",
top: "0px",
bottom: "0px",
minHeight: "100%",
overflow:"hidden",
paddingTop: "40px",
}
class EducoderInteresse extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
}
render() {
return (
<div style={newContainer} className=" clearfix" >
<div >
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%"
}}>
<div >
<img src={educodernet}/>
</div>
</div>
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
height: "630px",
marginTop: "44px",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
bottom:"0",
position: "fixed"
}}>
<div className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&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>
)
}
}
export default EducoderInteresse;

@ -43,17 +43,27 @@ var imgback = {
backgroundImage: `url(${beijintulogontwo})`, backgroundImage: `url(${beijintulogontwo})`,
} }
var imgmian ={ var imgmian ={
"width": "100%", width: "100%",
"background": `url(${beijintulogontwo})`, background: `url(${beijintulogontwo})`,
"height": "100%", position: "relative",
"position": "relative",
} }
var newContainer={ var newContainer={
"min-height": "100%", background: `url(${beijintulogontwo})`,
"background": `url(${beijintulogontwo})`, backgroundPosition: "center" ,
"height": "auto !important", backgroundRepeat: "no-repeat",
"position": "relative", backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
height:" 100%",
width:" 100%",
position: "absolute",
top: "0px",
bottom: "0px",
minHeight: "100%",
overflow:"hidden",
paddingTop: "40px",
} }
class EducoderLogin extends Component { class EducoderLogin extends Component {
constructor(props) { constructor(props) {
@ -76,7 +86,8 @@ class EducoderLogin extends Component {
} }
}else if(props.match.url === "/register"){ }else if(props.match.url === "/register"){
this.state = { // showbool: 1,
this.state = {
showbool: 1, showbool: 1,
loginstatus:false, loginstatus:false,
logini:2, logini:2,
@ -114,13 +125,7 @@ class EducoderLogin extends Component {
this.setState({ this.setState({
showbool: 1 showbool: 1
}) })
} else if(e===2) { } else if(e===3){
this.setState({
namezh:name,
passmm:pass,
showbool: 2,
})
}else if(e===3){
this.setState({ this.setState({
showbool: 3 showbool: 3
}) })
@ -131,24 +136,16 @@ class EducoderLogin extends Component {
render() { render() {
let {showbool,loginstatus,logini} = this.state; let {showbool,loginstatus,logini} = this.state;
return ( return (
<div style={newContainer} > <div style={newContainer} className=" clearfix" >
<style>
{ <div >
`
html, body, {
height: 100%;
}
`
}
</style>
<div style={imgmian}>
<div style={{ <div style={{
"display": "flex", "display": "flex",
"justify-content": "center", "justify-content": "center",
"align-items": "center", "align-items": "center",
"width": "100%" "width": "100%"
}}> }}>
<div style={{"margin-top": "20px"}}> <div >
<img src={educodernet}/> <img src={educodernet}/>
</div> </div>
@ -157,12 +154,13 @@ class EducoderLogin extends Component {
{ {
showbool === 1 ? showbool === 1 ?
<div style={{ <div style={{
"display": "flex", display: "flex",
"justify-content": "center", justifyContent: "center",
"align-items": "center", width: "100%",
"width": "100%", height: "550px",
marginTop: "44px",
}}> }}>
<div style={{"margin-top": "40px","height":"580px"}}> <div>
<LoginRegisterComponent {...this.props} {...this.state} <LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={(e,name,pass)=>this.Setshowbool(e,name,pass)} ></LoginRegisterComponent> Setshowbool={(e,name,pass)=>this.Setshowbool(e,name,pass)} ></LoginRegisterComponent>
@ -170,39 +168,31 @@ class EducoderLogin extends Component {
</div> </div>
</div> </div>
:showbool === 2 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
: :
<div style={{ <div style={{
"display": "flex", display: "flex",
"justify-content": "center", justifyContent: "center",
"align-items": "center", width: "100%",
"width": "100%", height: "550px",
marginTop: "44px",
}}> }}>
<div style={{"margin-top": "40px","height":"580px"}}> <div >
<FindPasswordComponent {...this.props} {...this.state} <FindPasswordComponent {...this.props} {...this.state}
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent> Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
</div> </div>
</div> </div>
} }
<div style={{"height":"125px", <div style={{
"display": "flex", display: "flex",
"justify-content": "center", justifyContent: "center",
"align-items": "center", width: "100%",
"width": "100%", bottom:"0",
position: "fixed"
}}> }}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}><span className="font-18">©</span>&nbsp;2019&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 className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&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 style={{"height":"100px"}}></div>
</div> </div>
</div> </div>
) )
@ -211,3 +201,15 @@ class EducoderLogin extends Component {
} }
export default EducoderLogin; export default EducoderLogin;
// showbool === 2 ?
// <div style={{
// display: "flex",
// justifyContent: "center",
// width: "100%",
// height: "630px",
// marginTop: "44px",
// }}>
// <InterestpageComponent {...this.props} {...this.state}>
// </InterestpageComponent>
// </div>
// :

@ -754,7 +754,7 @@ submittojoinclass=(value)=>{
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><a href={`/profile/basic`}>账号管理</a></li> <li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/} {/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/} {/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}

@ -55,7 +55,7 @@ class AccountPage extends Component {
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.data){ if(result.data){
if(result.data && result.data.base_info_completed == false){ if(result.data && result.data.base_info_completed == false){
this.props.history.push(`/profile/basic/edit`); this.props.history.push(`/account/profile/edit`);
} }
this.setState({ this.setState({
basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`}) basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`})
@ -79,30 +79,30 @@ class AccountPage extends Component {
<AccountNav {...this.props} {...common}></AccountNav> <AccountNav {...this.props} {...common}></AccountNav>
<div className="basicFormWrap"> <div className="basicFormWrap">
<Switch {...this.props}> <Switch {...this.props}>
<Route exact path="/profile/basic" <Route exact path="/account/profile"
render={ render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/profile/basic/edit" <Route exact path="/account/profile/edit"
render={ render={
(props) => (<AccountBasicEdit {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountBasicEdit {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/profile/certification" <Route exact path="/account/certification"
render={ render={
(props) => (<AccountCertification {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountCertification {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/profile/secure" <Route exact path="/account/secure"
render={ render={
(props) => (<AccountSecure {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountSecure {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/profile" <Route exact path="/account"
render={ render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
} }

@ -116,23 +116,6 @@ class LoginRegisterComponent extends Component {
console.log('Notification Clicked!'); console.log('Notification Clicked!');
}, },
}); });
// if(type === 1){
// notification['success']({
// message: "提示",
// description: messge,
// });
// }else if(type === 2){
// notification['warning']({
// message: "提示",
// description: messge,
// });
//
// }else{
// notification['error']({
// message: "提示",
// description: messge,
// });
// }
} }
@ -344,8 +327,8 @@ class LoginRegisterComponent extends Component {
passwords: "", passwords: "",
Agreetotheterms: "", Agreetotheterms: "",
}) })
// this.props.history.push(result.data.redirect_uri); this.props.history.push("/interesse");
this.props.Setshowbool(2,this.state.logins,this.state.passwords); // this.props.Setshowbool(2,this.state.logins,this.state.passwords);
} catch (e) { } catch (e) {
} }
@ -464,6 +447,8 @@ class LoginRegisterComponent extends Component {
this.SMSverification(); this.SMSverification();
} }
} }
//滑动验证手机号
//获取登入 //获取登入
loginInputonChange = (e) => { loginInputonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
@ -593,8 +578,8 @@ class LoginRegisterComponent extends Component {
<div> <div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}> <Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item key="0" className="font-18" style={{color:"#05101A"}}> 登录</Menu.Item> <Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
<Menu.Item key="1" className="font-18" style={{color:"#05101A"}}>注册</Menu.Item> <Menu.Item key="1" className={tab===1?"active font-18":"font-18"} >注册</Menu.Item>
</Menu> </Menu>
{ {

@ -54,7 +54,7 @@ class AccountBasicEdit extends Component {
<div className="titleWrap"> <div className="titleWrap">
<div className="title">基本信息</div> <div className="title">基本信息</div>
<Button type="primary" style={{ marginRight: '16px'}} <Button type="primary" style={{ marginRight: '16px'}}
ghost onClick={() => this.props.history.push('/profile/basic/edit')}>修改</Button> ghost onClick={() => this.props.history.push('/account/profile/edit')}>修改</Button>
</div> </div>
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>

@ -366,7 +366,7 @@ class AccountBasic extends Component {
message: '请输入您的姓名', message: '请输入您的姓名',
}], }],
})( })(
<Input placeholder="请输入您的姓名" disabled={!showRealName} suffix={ <Input placeholder="请输入您的姓名" suffix={
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"} onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i> <i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"} onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i>
}></Input> }></Input>
)} )}

@ -4,19 +4,19 @@ import { SnackbarHOC, getImageUrl } from 'educoder';
import AccountImg from './AccountImg' import AccountImg from './AccountImg'
class AccountNav extends Component { class AccountNav extends Component {
toBasic = () => { toBasic = () => {
this.props.history.push(`/profile/basic`) this.props.history.push(`/account/profile`)
} }
toCertification = () => { toCertification = () => {
this.props.history.push(`/profile/certification`) this.props.history.push(`/account/certification`)
} }
toSecure = () => { toSecure = () => {
this.props.history.push(`/profile/secure`) this.props.history.push(`/account/secure`)
} }
render() { render() {
let { basicInfo } = this.props let { basicInfo } = this.props
console.log(this.props); console.log(this.props);
const path = window.location.pathname const path = window.location.pathname
const isBasic = path.indexOf('basic') != -1 || path == "/profile" const isBasic = path.indexOf('basic') != -1 || path == "/account"
const isCertification = path.indexOf('certification') != -1 const isCertification = path.indexOf('certification') != -1
const isSecure = path.indexOf('secure') != -1 const isSecure = path.indexOf('secure') != -1
return ( return (

@ -101,7 +101,6 @@
} }
.ysllogin_register_contents{ .ysllogin_register_contents{
display: flex; display: flex;
margin-top: 30px;
justify-content: center; justify-content: center;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15); box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
border-radius:6px; border-radius:6px;

Loading…
Cancel
Save