import React, {Component} from "react"; import {Link, NavLink} from 'react-router-dom'; import {WordsBtn, ActionBtn} from 'educoder'; import axios from 'axios'; import { notification } from "antd"; import CoursesListType from '../coursesPublic/CoursesListType'; import Completetaskdetails from './Completetaskdetails'; import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; import '../css/busyWork.css'; import '../poll/pollStyle.css'; class Completetaskpage extends Component { //分组作业内容详情 constructor(props) { super(props); // this.answerMdRef = React.createRef(); this.setState({ workid:1, isSpin:false, datas:[], }) } componentDidMount() { // console.log("父组件加载框"); if( this.props.match.params.workid){ this.setState({ workid: this.props.match.params.workid, }) } this.getdata(this.props.match.params.workid); } // 获取数据的地方 getdata=(workid)=>{ var workids= workid; if(workids){ }else{ workids=this.state.workid; } this.setState({ isSpin:true, }) let url = `/homework_banks/${workids}.json`; // axios.get(url).then((response) => { if(response){ if(response.data){ this.setState({ datas:response.data.informs, }) }else { this.setState({ datas:[], }) } }else { this.setState({ datas:[], }) } this.setState({ isSpin:false, }) }).catch((error) => { console.log(error) this.setState({ datas:[], isSpin:false, }) }); } bindRef = ref => { this.child = ref } ///////////////教师截止 render() { const isAdmin = this.props.isAdmin(); // console.log(119) return (
) } } export default Completetaskpage;