|
|
|
@ -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>
|
|
|
|
|
)
|
|
|
|
|