Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hs
jingquan huang 6 years ago
commit 52c353e07d

@ -275,6 +275,11 @@ class App extends Component {
})
window.location.href = "/";
};
ModalshowCancelsy=()=>{
this.setState({
mydisplay:true,
})
};
componentDidMount() {
// force an update if the URL changes
history.listen(() => {
@ -327,7 +332,7 @@ class App extends Component {
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
<Addcourses {...this.props} {...this.state} HideAddcoursestypess={(i)=>this.HideAddcoursestypess(i)}/>
<AccountProfile {...this.props} {...this.state} />
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy}/>
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy}/>
<Router>
<Switch>

@ -581,8 +581,8 @@ class CoursesBanner extends Component {
<a className="fr user_default_btn task-btn-orange font-18 mr20" id="shixun_operation"
onClick={() => this.tojoinclass(1)}>加入课堂</a>
:
<a className="fr user_default_btn user_white_btn mr20 font-18" style={{width:"130px"}}
onClick={() => this.myyslgradin()}>加入课堂</a>
<a className="fr user_default_btn task-btn-orange font-18 mr20" id="shixun_operation"
onClick={() => this.myyslgradin(1)}>加入课堂</a>
)
: ""}
@ -591,8 +591,8 @@ class CoursesBanner extends Component {
<a className="fr user_default_btn task-btn-orange font-18 mr20" id="shixun_operation"
onClick={() => this.tojoinclass(1)}>加入课堂</a>
:
<a className="fr user_default_btn user_white_btn mr20 font-18" style={{width:"130px"}}
onClick={() => this.myyslgradin()}>加入课堂</a>
<a className="fr user_default_btn task-btn-orange font-18 mr20" id="shixun_operation"
onClick={() => this.myyslgradin(1)}>加入课堂</a>
: ""}
{coursedata.course_identity === 6&&coursedata.educoder_teacher===true?

@ -442,7 +442,8 @@ class Goldsubject extends Component {
var subjectids=this.props.match.params.subjectid;
window.location.href=`/paths/${subjectids}`
}else{
this.props.history.goBack();
// this.props.history.goBack();
window.location.href=`/courses/${this.props.match.params.coursesId}/informs`
}
}

@ -18,20 +18,23 @@ class Certifiedprofessional extends Component {
componentDidMount() {
// console.log("加入金品课堂");
// console.log(this.props);
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 410) {
try {
this.props.ModalshowCancelsy();
}catch (e) {
}
}
return response;
}, (error) => {
});
}
componentDidMount() {
// axios.interceptors.response.use((response) => {
// if (response != undefined)
// if (response && response.data.status === -1) {
//
// }
// return response;
// }, (error) => {
// //TODO 这里如果样式变了会出现css不加载的情况
//
// });
}
modalCancel=()=>{
this.props.ModalCancelsy();
};

@ -19,6 +19,7 @@ class Jointheclass extends Component {
};
setDownload=()=>{
let cousestype=this.props.pathcousestypeid;
let id=this.props.Pathcourseid===undefined?this.props.match.params.coursesId:this.props.Pathcourseid
let url = `/courses/${id}/join_excellent_course.json`;
axios.post(url).then((result) => {
@ -27,6 +28,9 @@ class Jointheclass extends Component {
if(result.data.status === 0){
this.props.showNotification(result.data.message);
this.props.ysljoinmodalCanceltwo();
if(cousestype===1){
window.open(`/courses/${id}/informs`)
}
}else {
this.props.showNotification(result.data.message);
}

@ -34,7 +34,7 @@ class DetailTop extends Component{
if(this.props.courses!=undefined&&this.props.courses.length!=0){
this.props.courses.map((item,key)=>{
if(1===key+1){
if(this.props.pathtopskey===key+1){
return(
courseslist.push(item)
)
@ -52,7 +52,7 @@ class DetailTop extends Component{
if(this.props.courses!=undefined&&this.props.courses.length!=0){
this.props.courses.map((item,key)=>{
if(1===key+1){
if(this.props.pathtopskey===key+1){
return(
courseslist.push(item)
)
@ -205,7 +205,7 @@ class DetailTop extends Component{
})
}
JoinnowCourse=(id)=>{
JoinnowCourse=(id,typeid)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
@ -220,7 +220,8 @@ class DetailTop extends Component{
this.setState({
yslJointhe:true,
Pathcourseid:id
Pathcourseid:id,
pathcousestypeid:typeid
})
}
ysljoinmodalCancel=()=>{
@ -228,11 +229,11 @@ class DetailTop extends Component{
yslJointhe:false
})
};
ysljoinmodalCanceltwo=()=>{
ysljoinmodalCanceltwo=(key)=>{
this.setState({
yslJointhe:false
})
this.props.getdatasindex()
this.props.getdatasindex(key)
};
OpenCoursefun=()=>{
@ -282,7 +283,7 @@ class DetailTop extends Component{
loadtype={loadtype}
>
</Modals>
{this.state.yslJointhe===true?<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo()}></Jointheclass>:""}
{this.state.yslJointhe===true?<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo(this.state.MenuItemskey)}></Jointheclass>:""}
{this.state.OpenCourseTypes===true?<OpenCourse {...this.props} {...this.state} OpenCourseCancel={()=>this.OpenCourseCancel()}/>:""}
{
@ -541,7 +542,7 @@ class DetailTop extends Component{
进入课堂
</a>:item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" href={item.first_category_url} target="_blank">
立即学习
</a>:<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" onClick={()=>this.JoinnowCourse(item.course_id)}></a>:""}
</a>:<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" onClick={()=>this.JoinnowCourse(item.course_id,item.course_status.status)}></a>:""}
{item.course_status.status===2?
item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" href={item.first_category_url} target="_blank">

@ -82,7 +82,8 @@ class PathDetailIndex extends Component{
user_id:undefined,
loadtype:false,
courses:undefined,
items: getItems(10)
items: getItems(10),
pathtopskey:1
}
this.onDragEnd = this.onDragEnd.bind(this);
@ -148,7 +149,8 @@ class PathDetailIndex extends Component{
this.getdatasindex()
}
getdatasindex=()=>{
getdatasindex=(key)=>{
let pathid=this.props.match.params.pathId;
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
@ -166,7 +168,8 @@ class PathDetailIndex extends Component{
if(result.data.allow_visit===true){
this.setState({
detailInfoList:result.data,
courses:result.data.courses
courses:result.data.courses,
pathtopskey:key===undefined?1:key,
// items: getItems(result.data.members.length),
})
}
@ -372,7 +375,7 @@ class PathDetailIndex extends Component{
>
</Modals>
<div className="newMain clearfix">
<DetailTop {...this.state} {...this.props} getdatasindex={()=>this.getdatasindex()}></DetailTop>
<DetailTop {...this.state} {...this.props} getdatasindex={(key)=>this.getdatasindex(key)}></DetailTop>
<div className="educontent clearfix mb80">
<div className="with65 fl">
<div className="produce-content mb10">

Loading…
Cancel
Save