dev_video
caicai8 5 years ago
parent 6c860ebc0f
commit 2b57369c7b

@ -145,8 +145,8 @@ class VideoIndex extends Component{
}
toUpload =()=> {
const { admin , is_teacher} = this.props.user;
if (admin || (is_teacher && this.props.checkIfProfessionalCertification())) {
const { admin , is_teacher,business} = this.props.user;
if (admin || business || (is_teacher && this.props.checkIfProfessionalCertification())) {
this.setState({
upload:true
})
@ -160,7 +160,9 @@ class VideoIndex extends Component{
const login=this.props.user&&this.props.user.login;
const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url);
const { admin , is_teacher ,business} = this.props.user;
// console.log(this.props && this.props.admin());
const operation = admin || business || (is_teacher && this.props.checkIfProfessionalCertification())
return(
<React.Fragment>
<div className="edu-back-white">
@ -193,14 +195,17 @@ class VideoIndex extends Component{
</HeadlessModal>
<p className="clearfix padding30">
<span className="fl font-grey-9"> <span className="color-orange">{count}</span> </span>
<li className="fr">
{
upload ?
<WordsBtn style="grey" className="font-16" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn>
:
<WordsBtn style="blue" className="font-16" onClick={this.toUpload}>上传视频</WordsBtn>
}
</li>
{
(admin || is_teacher) &&
<li className="fr">
{
upload ?
<WordsBtn style="grey" className="font-16" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn>
:
<WordsBtn style="blue" className="font-16" onClick={this.toUpload}>上传视频</WordsBtn>
}
</li>
}
</p>
</div>
{
@ -228,7 +233,7 @@ class VideoIndex extends Component{
onEditVideo={this.onEditVideo}
onMaskClick={this.onMaskClick}
getCopyText={this.getCopyText}
operation={operation}
>
</VideoInReviewItem>
)

@ -1178,7 +1178,9 @@ class Coursesleftnav extends Component{
item.type==="poll"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-wenjuan mr10 fl":"iconfont icon-wenjuan mr10 fl"}></i>:
item.type==="attachment"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-ziyuan mr10 fl":"iconfont icon-ziyuan mr10 fl"} ></i>:
item.type==="board"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-taolun mr10 fl":"iconfont icon-taolun mr10 fl"} ></i>:
item.type==="course_group"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-fenban mr10 fl":"iconfont icon-fenban mr10 fl"} ></i>:
item.type==="course_group"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-fenban mr10 fl":"iconfont icon-fenban mr10 fl"} ></i>:
item.type==="video"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-bofang1 mr10 fl":"iconfont icon-bofang1 mr10 fl"} ></i>:
item.type==="statistics"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-tongji mr10 fl":"iconfont icon-tongji mr10 fl"} ></i>:""
}

@ -20,7 +20,7 @@ const clipboardMap = {}
function VideoInReviewItem (props) {
const theme = useContext(ThemeContext);
const { history, file_url, cover_url, title, created_at, published_at, isReview, id
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration} = props;
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation} = props;
useEffect(()=> {
if (!isReview) {
_clipboard = new ClipboardJS(`.copybtn_item_${id}`);
@ -73,11 +73,14 @@ function VideoInReviewItem (props) {
</Tooltip> } {vv===0?"":vv}
</span>
{ isReview != true && <div>
<Tooltip title="编辑" placement="bottom">
<i className="icon-bianji1 iconfont" onClick={() => onEditVideo(props)}
style={{ marginTop: '1px', display: 'inline-block'}}
></i>
</Tooltip>
{
operation &&
<Tooltip title="编辑" placement="bottom">
<i className="icon-bianji1 iconfont" onClick={() => onEditVideo(props)}
style={{ marginTop: '1px', display: 'inline-block'}}
></i>
</Tooltip>
}
<Tooltip title="复制视频地址" placement="bottom">
<i className={`icon-fuzhi iconfont copybtn_item_${id}`} data-clipboard-text={getCopyText(file_url, cover_url)}></i>
</Tooltip>

Loading…
Cancel
Save