import React, { Component } from 'react'; import {Link} from 'react-router-dom'; import {Tooltip,Menu} from 'antd'; import {getImageUrl} from 'educoder'; import "./usersInfo.css" import "../../courses/css/members.css" import "../../courses/css/Courses.css" import { LinkAfterLogin } from 'educoder' class InfosBanner extends Component{ constructor(props){ super(props); } render(){ let { data , id, login, moduleName, current_user, }=this.props; let is_current=this.props.is_current; let {username}= this.props.match.params; let {pathname}=this.props.location; moduleName=pathname.split("/")[3]; let user_id=this.props.current_user&&this.props.current_user.user_id; let user_type=this.props.current_user&&this.props.current_user.user_identity; let targetuserid=this.props.data&&this.props.data.id; // console.log(is_current) // console.log(current_user) // console.log(current_user.is_teacher) let shixuntype=false; let pathstype=false; let coursestypes=false; if(this.props&&this.props.mygetHelmetapi!=null){ let shixun="/shixuns"; let paths="/paths"; let courses="/courses"; this.props.mygetHelmetapi.navbar.map((item,key)=>{ var reg = RegExp(item.link); if(shixun.match(reg)){ if(item.hidden===true){ shixuntype=true } } if(paths.match(reg)){ if(item.hidden===true){ pathstype=true } } if(courses.match(reg)){ if(item.hidden===true){ coursestypes=true } } }) } return(

头像

{data && data.name} {/*{*/} {/*data && is_current == false && data.identity =="学生" ? "" : */} {/**/} {/*}*/}

{is_current ? "我":"TA"}的经验值 {data && data.experience}
{is_current ? "我":"TA"}的金币 {data && data.grade}
{ is_current ? { data && data.attendance_signed ? 已签到 : 签到 } : 私信 }
{coursestypes===true?"":
  • this.setState({moduleName: 'courses'})} to={`/users/${username}/courses`}>翻转课堂
  • } {shixuntype===true?"":
  • this.setState({moduleName: 'shixuns'})} to={`/users/${username}/shixuns`}>实训项目
  • } {pathstype===true?"":
  • this.setState({moduleName: 'paths'})} to={`/users/${username}/paths`}>实践课程
  • } {this.props.user&&this.props.user.main_site===true?
  • this.setState({moduleName: 'projects'})} to={`/users/${username}/projects`}>开发项目
  • :""} {/*
  • */} {/* this.setState({moduleName: 'package'})}*/} {/* to={`/users/${username}/package`}>众包*/} {/*
  • */} {this.props.user&&this.props.user.main_site===true?((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin) &&
  • this.setState({moduleName: 'videos'})} to={`/users/${username}/videos`}>视频
  • :""} {/*自己的主页且不是学生显示题库按钮*/} {this.props.user&&this.props.user.main_site===true?(is_current && current_user&& current_user.is_teacher ) &&
  • this.setState({moduleName: 'topics'})} to={`/users/${username}/topics/personal`}>题库
  • :""}
    ) } } export default InfosBanner;