courseware
杨树明 5 years ago
parent 833562f9ba
commit f949451986

@ -191,15 +191,21 @@ class Video extends Component {
const CourseId = this.props.match.params.coursesId;
const VID = this.props.match.params.videoId;
const login = this.props.user && this.props.user.login;
let login = this.props && this.props.user&&this.props.user.login;;
const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url);
const { admin, is_teacher, business, user_id } = this.props.user;
// const { admin, is_teacher, business, user_id } = this.props && this.props.user;
let admin = this.props && this.props.user&&this.props.user.admin;;
let business = this.props && this.props.user&&this.props.user.business;;
let user_id = this.props && this.props.user&&this.props.user.user_id;;
const { videos, upload, uploadVideo, videoData, changePage, pageSize, page } = this.props;
const operation = admin || business;
const { course_identity } = this.props.coursedata;
const { course_identity } = this.props && this.props.coursedata;
const flagMove = parseInt(course_identity) < 5;
return (
@ -245,7 +251,7 @@ class Video extends Component {
<p className="mt20 mb20 pl5" style={{marginLeft:'auto',color:'#C0C4CC'}}>播放数据从2020-03-13 24:00开始统计</p>
</div>
<div className="videoContent">
{
videos.map((item, key) => {

@ -245,7 +245,7 @@ class VideoIndex extends Component{
const { videos , upload , videoData , type , liveData , lives , page , liveVisible , isSpining , liveId , otherLinkVisible,statistics } = this.state;
const { coursesId , videoId }=this.props.match.params;
let course_identity = this.props&&this.props.coursedata;
let is_teacher = this.props&&this.props.user;
let is_teacher=this.props&&this.props.user&&this.props.user.is_teacher;
const flag = parseInt(course_identity) < 5;
const newOperation = flag;
const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification());

Loading…
Cancel
Save