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 {Icon, 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 console.log(this.props) return (
创建者
技能标签 已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} 个 / 共 {TPMRightSectionData&&TPMRightSectionData.tag_count} 个
展开全部
收起全部
所属课程