import React, { Component } from 'react'; import { Redirect } from 'react-router'; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import PropTypes from 'prop-types'; import classNames from 'classnames' class RecommendShixun extends Component { constructor(props) { super(props) this.state = { } } showRecommandShixun(){ const { recommend_shixuns } = this.props; if (!recommend_shixuns) { return ''; } const result = []; recommend_shixuns.forEach((shixun, index) => { const _shixun = shixun result.push(
{`${_shixun.id}`}
9 ? _shixun.name : ''} className="color-grey-6 task-hide mb10 recomment-name" style={{maxWidth:'147px'}}> {_shixun.name}

{_shixun.myshixuns_count} 人学习

) }) return result; } render() { const { match, history, currentPage } = this.props // 参考 TPMShixunDiscuss.js 推荐实训, 页面路径:http://localhost:3007/shixuns/uznmbg54/shixun_discuss return (

推荐实训

{this.showRecommandShixun()}
); } } export default RecommendShixun;