dev_hs
杨树林 6 years ago
parent 4aa48dfaed
commit 84dbad63b0

@ -828,7 +828,7 @@ class CoursesIndex extends Component{
{/*新建精品课堂*/} {/*新建精品课堂*/}
{/*coursesId 课堂id */} {/*coursesId 课堂id */}
{/*id 是否是私有或者公有*/} {/*id 是否是私有或者公有*/}
<Route path="/paths/:subjectid/newgold/:id" <Route path="/courses/news/:subjectid/newgold/:id"
render={ render={
(props) => (<WrappedCoursesNewAppGoldclass {...this.props} {...props} {...this.state} />) (props) => (<WrappedCoursesNewAppGoldclass {...this.props} {...props} {...this.state} />)
} }

@ -145,9 +145,24 @@ class Goldsubject extends Component {
console.log(error); console.log(error);
}) })
}else{ }else{
let subjectid= this.props.match.params.subjectid;
let url = "/courses/new.json" let url = "/courses/new.json"
axios.get(url).then((result) => { axios.get(url,{params:{
console.log(result) subject_id:subjectid, //这是带过来的值
}}).then((response) => {
if (response) {
// this.goback
if(response.data){
console.log("获取Goldsubject.js");
console.log(response.data);
if(response.data.status===0){
this.props.form.setFieldsValue({
classroom: response.data.course_name,
name: response.data.name,
});
}
}
}
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
}) })
@ -159,10 +174,7 @@ class Goldsubject extends Component {
school:user_school, school:user_school,
Whethertocreateanewclassroom:true, Whethertocreateanewclassroom:true,
}); });
this.handleSearchschool(user_school); this.handleSearchschool(user_school);
} }
@ -700,17 +712,17 @@ class Goldsubject extends Component {
{options} {options}
</AutoComplete> </AutoComplete>
)} )}
<span className={"newcoursestitle fl"}> {/*<span className={"newcoursestitle fl"}>*/}
{/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/} {/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/}
<p className="ant-progress-text"> {/* <p className="ant-progress-text">*/}
<Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/> {/* <Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>*/}
<span className={"color-grey-9 font-12 ml5"}>正确示例数据结构2019春季班级</span> {/* <span className={"color-grey-9 font-12 ml5"}>正确示例数据结构2019春季班级</span>*/}
</p> {/* </p>*/}
<p className="ant-progress-text"> {/* <p className="ant-progress-text">*/}
<Icon style={{ color: 'red' }} theme="filled" type="close-circle"/> {/* <Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>*/}
<span className={"color-grey-9 font-12 ml5"}>错误示例2019春季班级数据结构</span> {/* <span className={"color-grey-9 font-12 ml5"}>错误示例2019春季班级数据结构</span>*/}
</p> {/* </p>*/}
</span> {/* </span>*/}
<div id='isclassroom'></div> <div id='isclassroom'></div>
</Form.Item> </Form.Item>

@ -26,9 +26,9 @@ class OpenCourse extends Component {
console.log(this.props.match.params.pathId) console.log(this.props.match.params.pathId)
if(value===0){ if(value===0){
window.open(`/courses/${this.props.match.params.pathId}/newgold/0 `); window.open(`/courses/news/${this.props.match.params.pathId}/newgold/0 `);
}else{ }else{
window.open(`/courses/${this.props.match.params.pathId}/newgold/1`); window.open(`/courses/news/${this.props.match.params.pathId}/newgold/1`);
} }
this.props.OpenCourseCancel(); this.props.OpenCourseCancel();
} }

Loading…
Cancel
Save