import React,{ Component } from "react"; import CoursesListType from '../../coursesPublic/CoursesListType'; import { WordsBtn } from 'educoder' import {Tooltip} from 'antd' import axios from 'axios' import LoginDialog from "../../../login/LoginDialog"; const map={0:"待选中",1:"待确认",2:"已确认"} class GraduateTopicItem extends Component{ constructor(props){ super(props); this.state = { isRender:false, } } editTopic=(topicId)=>{ let courseId=this.props.match.params.coursesId; this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`); } toDetailPage=(topicId)=>{ // console.log("toDetailPage"); // console.log(this.props); try { if(this.props.current_user.username==="游客"){ this.setState({ isRender:true, match:"", }); return } }catch (e) { } let courseId=this.props.match.params.coursesId; this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`); }; Modifyloginvalue=()=>{ this.setState({ isRender:false, }) }; render(){ const { checkBox, discussMessage, index,chooseTopic, data, courseId } = this.props; const { isRender }=this.state; const isAdmin = this.props.isAdmin(); const isStudent=this.props.isStudent(); const isNotMember=this.props.isNotMember(); if (!discussMessage || !discussMessage.author) { return ''; } return(