|
|
|
@ -21,7 +21,7 @@ const clipboardMap = {}
|
|
|
|
|
function VideoInReviewItem (props) {
|
|
|
|
|
const theme = useContext(ThemeContext);
|
|
|
|
|
const { history, file_url , play_url , cover_url , transcoded , title, created_at, published_at, isReview, id
|
|
|
|
|
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link} = props;
|
|
|
|
|
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link, people_num,total_time} = props;
|
|
|
|
|
useEffect(()=> {
|
|
|
|
|
if (!isReview) {
|
|
|
|
|
_clipboard = new ClipboardJS(`.copybtn_item_${id}`);
|
|
|
|
@ -37,6 +37,8 @@ function VideoInReviewItem (props) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const username = props.match.params.username
|
|
|
|
|
function toList() {
|
|
|
|
|
history.push(`/users/${username}/videos`)
|
|
|
|
@ -60,7 +62,7 @@ function VideoInReviewItem (props) {
|
|
|
|
|
{!isReview && !link && transcoded &&
|
|
|
|
|
<div className="playWrap" onClick={() => onMaskClick(props)}>
|
|
|
|
|
<img className="play mp23" src={playIcon}></img>
|
|
|
|
|
{play_duration===0?"":<div className={"play_duration"}>累计学习时长:{play_duration} h</div>}
|
|
|
|
|
{/* {play_duration===0?"":<div className={"play_duration"}>累计学习时长:{play_duration} h</div>} */}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</Spin>
|
|
|
|
@ -69,16 +71,20 @@ function VideoInReviewItem (props) {
|
|
|
|
|
title={title && title.length > 20 ? title : ''}
|
|
|
|
|
>{title}</div>
|
|
|
|
|
<div className="df buttonRow mb10">
|
|
|
|
|
|
|
|
|
|
<span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}</span>
|
|
|
|
|
{/* <div className={"play_duration"}>累计学习时长:{play_duration} h</div> */}
|
|
|
|
|
{/* <span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}{people_num}</span> */}
|
|
|
|
|
{link ?<span className="time"> </span>:<span className="time">累计学习时长:{
|
|
|
|
|
total_time<60?total_time+' s':total_time/60<60?(total_time/60).toFixed(0)+' min':(total_time/60/60).toFixed(1)+ ' h'}</span>}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="df buttonRow">
|
|
|
|
|
{/* 2019-09-01 10:00:22 */}
|
|
|
|
|
<span className={"dianjilianicon"}>
|
|
|
|
|
{!vv || (vv && vv)===0 ? "" : <Tooltip title="播放次数" placement="bottom">
|
|
|
|
|
<i className={`icon-dianjiliang iconfont dianjilianicon`}></i>
|
|
|
|
|
</Tooltip> } {!vv || (vv && vv)===0?"":vv}
|
|
|
|
|
{!people_num || (people_num && people_num)===0 ? "" : <Tooltip title="观看人数" placement="bottom">
|
|
|
|
|
<i className={`icon-dianjiliang iconfont dianjilianicon font-12`}> {!people_num || (people_num && people_num)===0?"":people_num}</i>
|
|
|
|
|
</Tooltip> }
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
isReview !== true && moveVideo &&
|
|
|
|
|