|
|
|
@ -62,7 +62,7 @@ class sendResources extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
|
|
let {discussMessageid} =this.props;
|
|
|
|
|
try {
|
|
|
|
|
this.setState({
|
|
|
|
|
resourcesname:this.props.title,
|
|
|
|
@ -72,9 +72,45 @@ class sendResources extends Component{
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log(discussMessageid);
|
|
|
|
|
try {
|
|
|
|
|
if(discussMessageid){
|
|
|
|
|
this.getalldata();
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getalldata=()=>{
|
|
|
|
|
let {discussMessageid} =this.props;
|
|
|
|
|
let course_id=this.props.course_id;
|
|
|
|
|
let url="/files/"+discussMessageid+".json";
|
|
|
|
|
axios.get(url, {
|
|
|
|
|
params:{
|
|
|
|
|
course_id:course_id,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if(response.status===200){
|
|
|
|
|
this.setState({
|
|
|
|
|
datalist:response.data,
|
|
|
|
|
description: response.data.description,
|
|
|
|
|
is_public:response.data.is_public,
|
|
|
|
|
datatime:response.data.publish_time,
|
|
|
|
|
Radiovalue:response.data.delay_publish==false?0:1,
|
|
|
|
|
//attachment_histories:response.data.attachment_histories
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//勾选实训
|
|
|
|
|
shixunhomeworkedit=(list)=>{
|
|
|
|
|
|
|
|
|
|