import React, {Component} from 'react'; import {BrowserRouter as Router, Route, Link} from "react-router-dom"; import axios from 'axios'; import {getImageUrl,} from "educoder"; import './TPMright.css'; import {Progress, Tooltip} from 'antd'; // import "antd/dist/antd.css"; class TPMRightSection extends Component { constructor(props) { super(props) this.state = { TPMRightSection: false, clickNewsubscripttype: false } } // componentDidMount() { // let id=this.props.match.params.shixunId; // // let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`; // // axios.get(shixunsDetailsURL).then((response)=> { // if(response.status===200){ // this.setState({ // TPMRightSectionData: response.data // }); // } // }).catch((error)=>{ // console.log(error) // }); // } // shouldComponentUpdate(nextProps, nextState) { // return nextProps.TPMRightSectionData !== this.state.TPMRightSectionData // } clickNewsubscript = (val) => { if (val === 0) { this.setState({ TPMRightSection: true, clickNewsubscripttype: true }) } else { this.setState({ TPMRightSection: false, clickNewsubscripttype: false }) } } render() { let {TPMRightSection, clickNewsubscripttype} = this.state; let {TPMRightSectionData} = this.props let Progresssum; if(TPMRightSectionData&&TPMRightSectionData.complete_count!=null){ Progresssum=(parseInt(TPMRightSectionData&&TPMRightSectionData.complete_count) / parseInt(TPMRightSectionData&&TPMRightSectionData.challenge_count))*100; } // console.log(this.props&&this.props.is_jupyter===true) return (
创建者
技能标签 已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} 个 / 共 {TPMRightSectionData&&TPMRightSectionData.tag_count} 个
展开全部
收起全部
所属课程
推荐实训
{item.stu_num} 人学习 {item.level}