视频主页增加对应参数

dev_video
杨树明 5 years ago
parent b1cf2c0679
commit 4190ca2457

@ -20,7 +20,7 @@
} }
.videoItem img.cover { .videoItem img.cover {
width: 100%; width: 100%;
border-radius: 6px 6px 0px 0px; border-radius: 12px 12px 0px 0px;
height: 158px; height: 158px;
} }
.nItem.videoItem:hover .mask { .nItem.videoItem:hover .mask {
@ -34,12 +34,12 @@
display: inline-block; display: inline-block;
} }
.nItem .mask { .nItem .mask {
border-radius: 6px 6px 0px 0px; border-radius: 12px 12px 0px 0px;
display: none; display: none;
text-align: center; text-align: center;
position: absolute; position: absolute;
background: #000; background:rgba(0,0,0,0.39);
opacity: 0.5; /*opacity: 0.5;*/
} }
.videoItem .playWrap { .videoItem .playWrap {
display: none; display: none;
@ -49,6 +49,7 @@
position: absolute; position: absolute;
top: 0px; top: 0px;
left: 0px; left: 0px;
cursor: pointer;
} }
.videoItem img.play { .videoItem img.play {
margin-top: 20%; margin-top: 20%;
@ -59,7 +60,7 @@
padding: 9px 8px; padding: 9px 8px;
background: #fff; background: #fff;
border-radius: 0px 0px 6px 6px; border-radius: 0px 0px 12px 12px;
} }
.videoItem .square-main .title{ .videoItem .square-main .title{
max-width: 256px; max-width: 256px;
@ -71,7 +72,11 @@
background: #EAEAEA; background: #EAEAEA;
} }
.videoItem .time { .videoItem .time {
color: #A0A0A0; color: #C0C4CC;
}
.videoItem .square-main .buttonRow .dianjilianicon{
color: #606266 !important;
font-size: 14px !important;
} }
.videoItem .square-main .buttonRow { .videoItem .square-main .buttonRow {
@ -80,8 +85,8 @@
} }
.nItem.videoItem:hover .square-main { .nItem.videoItem:hover .square-main {
color: #fff; /*color: #fff;*/
background: #333; background: #fff;
} }
/* 预览弹框 */ /* 预览弹框 */
@ -118,3 +123,22 @@
height: 48px; height: 48px;
margin-right: 20px; margin-right: 20px;
} }
.play_duration{
width: 100%;
height:30px;
background:rgba(0,0,0,0.39);
/*opacity:0.39;*/
color:#fff;
font-size:12px;
line-height:30px;
text-align: right;
padding-right: 10px;
}
.mp23{
margin-bottom: 23px;
}
.videoItem:hover{
box-shadow:0px 4px 10px 0px rgba(3,7,45,0.1);
}

@ -20,7 +20,7 @@ const clipboardMap = {}
function VideoInReviewItem (props) { function VideoInReviewItem (props) {
const theme = useContext(ThemeContext); const theme = useContext(ThemeContext);
const { history, file_url, cover_url, title, created_at, published_at, isReview, id const { history, file_url, cover_url, title, created_at, published_at, isReview, id
, onEditVideo, onMaskClick, getCopyText, showNotification } = props; , onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration} = props;
useEffect(()=> { useEffect(()=> {
if (!isReview) { if (!isReview) {
_clipboard = new ClipboardJS(`.copybtn_item_${id}`); _clipboard = new ClipboardJS(`.copybtn_item_${id}`);
@ -53,16 +53,25 @@ function VideoInReviewItem (props) {
</div>} </div>}
{!isReview && {!isReview &&
<div className="playWrap" onClick={() => onMaskClick(props)}> <div className="playWrap" onClick={() => onMaskClick(props)}>
<img className="play" src={playIcon}></img> <img className="play mp23" src={playIcon}></img>
{play_duration===0?"":<div className={"play_duration"}>累计学习时长{play_duration} h</div>}
</div> </div>
} }
<div className="square-main"> <div className="square-main">
<div className="title overflowHidden1" <div className="title overflowHidden1"
title={title && title.length > 20 ? title : ''} title={title && title.length > 20 ? title : ''}
>{title}</div> >{title}</div>
<div className="df buttonRow mb10">
<span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}</span>
</div>
<div className="df buttonRow"> <div className="df buttonRow">
{/* 2019-09-01 10:00:22 */} {/* 2019-09-01 10:00:22 */}
<span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}</span> {vv===0?"":<span className={"dianjilianicon"}>
<Tooltip title="播放次数" placement="bottom">
<i className={`icon-dianjiliang iconfont dianjilianicon`}></i>
</Tooltip> {vv}
</span>}
{ isReview != true && <div> { isReview != true && <div>
<Tooltip title="编辑" placement="bottom"> <Tooltip title="编辑" placement="bottom">
<i className="icon-bianji1 iconfont" onClick={() => onEditVideo(props)} <i className="icon-bianji1 iconfont" onClick={() => onEditVideo(props)}

Loading…
Cancel
Save