dev_aliyun_beta
杨树明 6 years ago
parent ee8c6a6b6d
commit c766a452e9

@ -69,11 +69,18 @@ class ShixunWorkReport extends Component {
} }
componentDidMount() { componentDidMount() {
let query = this.props.location.pathname;
const type = query.split('/');
this.setState({ this.setState({
shixuntypes:type[3],
spinning:true spinning:true
}) })
this.getdatalist()
}
getdatalist=()=>{
let homeworkid=this.props.match.params.homeworkid; let homeworkid=this.props.match.params.homeworkid;
let url = `/student_works/${homeworkid}/shixun_work_report.json` let url = `/student_works/${homeworkid}/shixun_work_report.json`
axios.get(url).then((result) => { axios.get(url).then((result) => {
if (result.data.status === 403||result.data.status === 401||result.data.status === 407||result.data.status === 408) { if (result.data.status === 403||result.data.status === 401||result.data.status === 407||result.data.status === 408) {
@ -90,11 +97,7 @@ class ShixunWorkReport extends Component {
spinning:false spinning:false
}) })
}) })
let query = this.props.location.pathname;
const type = query.split('/');
this.setState({
shixuntypes:type[3]
})
} }
jumptopic=(anchorName)=>{ jumptopic=(anchorName)=>{
; if (anchorName) { ; if (anchorName) {
@ -182,6 +185,7 @@ class ShixunWorkReport extends Component {
{...this.props} {...this.props}
data={data} data={data}
jumptopic={this.jumptopic} jumptopic={this.jumptopic}
getdatalist={()=>this.getdatalist()}
/> />
</div> </div>

@ -32,6 +32,7 @@ class OfficialAcademicTranscript extends Component {
challenge_id:id challenge_id:id
}).then((result)=>{ }).then((result)=>{
if(result.data.status===0){ if(result.data.status===0){
this.props.getdatalist()
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
}else{ }else{
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);

Loading…
Cancel
Save