parent
2141b068f9
commit
e0668cea7c
@ -1,136 +1,136 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import {getImageUrl} from 'educoder';
|
import {getImageUrl} from 'educoder';
|
||||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
||||||
import {Tooltip,Spin,Alert} from 'antd';
|
import {Tooltip,Spin,Alert} from 'antd';
|
||||||
import ShowSpin from '../../../common/ShowSpin';
|
import ShowSpin from '../../../common/ShowSpin';
|
||||||
|
|
||||||
class coursesHomeCard extends Component{
|
class coursesHomeCard extends Component{
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
}
|
}
|
||||||
render(){
|
render(){
|
||||||
let {coursesHomelist}=this.props;
|
let {coursesHomelist}=this.props;
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="educontent mb20" id="subjects_list_content">
|
<div className="educontent mb20" id="subjects_list_content">
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
.square-Item .square-img img {
|
.square-Item .square-img img {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
border-radius: 6px 6px 0px 0px;
|
border-radius: 6px 6px 0px 0px;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}`
|
}`
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div className="square-list clearfix">
|
<div className="square-list clearfix">
|
||||||
|
|
||||||
{/*<ShowSpin/>*/}
|
{/*<ShowSpin/>*/}
|
||||||
|
|
||||||
{
|
{
|
||||||
coursesHomelist===undefined?"":coursesHomelist.courses.map((item,key)=>{
|
coursesHomelist===undefined?"":coursesHomelist.courses.map((item,key)=>{
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className = "square-Item" style={{cursor:'pointer'}} key={key}>
|
<div className = "square-Item" style={{cursor:'pointer'}} key={key}>
|
||||||
|
|
||||||
<div className={item.is_public===0&&item.is_accessible === false ? "closeSquare" : "none"}>
|
<div className={item.is_public===0&&item.is_accessible === false ? "closeSquare" : "none"}>
|
||||||
<img src={getImageUrl("images/educoder/icon/lockclose.svg")}
|
<img src={getImageUrl("images/educoder/icon/lockclose.svg")}
|
||||||
className="mt80 mb25"/>
|
className="mt80 mb25"/>
|
||||||
<p className="font-14 color-white">非成员不能访问</p>
|
<p className="font-14 color-white">非成员不能访问</p>
|
||||||
</div>
|
</div>
|
||||||
<Link to={item.first_category_url} className="square-img" target="_blank">
|
<a href={item.first_category_url} className="square-img" target="_blank">
|
||||||
{
|
{
|
||||||
item.is_public===1&&item.id===1309?
|
item.is_public===1&&item.id===1309?
|
||||||
<div>
|
<div>
|
||||||
<div className = "publicpart orangeBlack"></div>
|
<div className = "publicpart orangeBlack"></div>
|
||||||
<span className="smalltrangle"></span>
|
<span className="smalltrangle"></span>
|
||||||
<span className={"publicword"}> 公开 </span>
|
<span className={"publicword"}> 公开 </span>
|
||||||
</div>
|
</div>
|
||||||
:""
|
:""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
item.is_public===1&&item.id!=1309?
|
item.is_public===1&&item.id!=1309?
|
||||||
<div>
|
<div>
|
||||||
<div className = "publicpart"></div>
|
<div className = "publicpart"></div>
|
||||||
<span className="smalltrangle"></span>
|
<span className="smalltrangle"></span>
|
||||||
<span className={"publicword"}> 公开 </span>
|
<span className={"publicword"}> 公开 </span>
|
||||||
</div>
|
</div>
|
||||||
:""
|
:""
|
||||||
}
|
}
|
||||||
{item.is_end===true?<p className="fr squareIconSpan mt10 biaoqiancours">
|
{item.is_end===true?<p className="fr squareIconSpan mt10 biaoqiancours">
|
||||||
<i className="iconfont icon-biaoqian fl memberscount"></i>
|
<i className="iconfont icon-biaoqian fl memberscount"></i>
|
||||||
<div className={"coursesover"}>已结束</div>
|
<div className={"coursesover"}>已结束</div>
|
||||||
</p>:""}
|
</p>:""}
|
||||||
<div className="substance">
|
<div className="substance">
|
||||||
|
|
||||||
<p className="subName font-16">
|
<p className="subName font-16">
|
||||||
{/*{item.name.length>32?*/}
|
{/*{item.name.length>32?*/}
|
||||||
{/*<Tooltip placement="bottom" >*/}
|
{/*<Tooltip placement="bottom" >*/}
|
||||||
{/**/}
|
{/**/}
|
||||||
{/*</Tooltip>: <span>{item.name}</span>}*/}
|
{/*</Tooltip>: <span>{item.name}</span>}*/}
|
||||||
<span title={item.name.length>23?item.name:""}>{item.name}</span>
|
<span title={item.name.length>23?item.name:""}>{item.name}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<span className={"color-dark"}>
|
<span className={"color-dark"}>
|
||||||
<img alt="用户" className="radius mt15" height="60" src={getImageUrl(`${"images/"+item.avatar_url}`)} width="60"/>
|
<img alt="用户" className="radius mt15" height="60" src={getImageUrl(`${"images/"+item.avatar_url}`)} width="60"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<p className="font-14 mt10"><span className={"color-dark"}>{item.creator} {item.technical_title}</span></p>
|
<p className="font-14 mt10"><span className={"color-dark"}>{item.creator} {item.technical_title}</span></p>
|
||||||
<p className="font-16 mb15 task-hide mt10">
|
<p className="font-16 mb15 task-hide mt10">
|
||||||
|
|
||||||
<Tooltip placement="bottom" title={item.school}>
|
<Tooltip placement="bottom" title={item.school}>
|
||||||
<span className="color-grey-98">{item.school}</span>
|
<span className="color-grey-98">{item.school}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="edu-txt-center course-bottom">
|
<div className="edu-txt-center course-bottom">
|
||||||
<div className="inline color-grey-B4">
|
<div className="inline color-grey-B4">
|
||||||
{item.visits===0?"":<span className="fl ml10 mr10 squareIconSpan">
|
{item.visits===0?"":<span className="fl ml10 mr10 squareIconSpan">
|
||||||
<Tooltip placement="bottom" title="访问量">
|
<Tooltip placement="bottom" title="访问量">
|
||||||
<i className="iconfont icon-liulanyan fl mr3"></i>{item.visits}
|
<i className="iconfont icon-liulanyan fl mr3"></i>{item.visits}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
</span>}
|
</span>}
|
||||||
|
|
||||||
{item.course_members_count===0?"":<span className="fl ml10 mr10 squareIconSpan">
|
{item.course_members_count===0?"":<span className="fl ml10 mr10 squareIconSpan">
|
||||||
<Tooltip placement="bottom" title="成员">
|
<Tooltip placement="bottom" title="成员">
|
||||||
<i className="iconfont icon-chengyuan fl mr3"></i>{item.course_members_count}
|
<i className="iconfont icon-chengyuan fl mr3"></i>{item.course_members_count}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</span>}
|
</span>}
|
||||||
|
|
||||||
{item.tasks_count===0?"":<span className="fl ml10 mr10 squareIconSpan">
|
{item.tasks_count===0?"":<span className="fl ml10 mr10 squareIconSpan">
|
||||||
<Tooltip placement="bottom" title="作业">
|
<Tooltip placement="bottom" title="作业">
|
||||||
<i className="iconfont icon-zuoye fl mr3"></i>{item.tasks_count}
|
<i className="iconfont icon-zuoye fl mr3"></i>{item.tasks_count}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</span>}
|
</span>}
|
||||||
|
|
||||||
{/*<span className="fl ml10 mr10 squareIconSpan">*/}
|
{/*<span className="fl ml10 mr10 squareIconSpan">*/}
|
||||||
|
|
||||||
{/*<Tooltip placement="bottom" title="资源">*/}
|
{/*<Tooltip placement="bottom" title="资源">*/}
|
||||||
{/*<i className="iconfont icon-ziyuan fl mr3"></i>{item.attachment_count}*/}
|
{/*<i className="iconfont icon-ziyuan fl mr3"></i>{item.attachment_count}*/}
|
||||||
{/*</Tooltip>*/}
|
{/*</Tooltip>*/}
|
||||||
|
|
||||||
{/*</span>*/}
|
{/*</span>*/}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default coursesHomeCard;
|
export default coursesHomeCard;
|
||||||
|
|
||||||
|
Loading…
Reference in new issue