Merge branches 'dev_aliyun' and 'dev_video' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_video

dev_video
杨树明 5 years ago
commit d39285f202

@ -1,8 +1,7 @@
class LiveLinksController < ApplicationController
before_action :require_login
before_action :find_course, only: [:index, :create]
before_action :user_course_identity
before_action :teacher_allowed, only: [:create]
before_action :user_course_identity, :teacher_allowed, only: [:create]
def index
lives = @course.live_links.order("id desc")

@ -1,5 +1,6 @@
json.lives @lives do |live|
json.(live, :id, :url, :description, :on_status)
json.(live, :id, :description, :on_status)
json.url live.on_status ? live.url : ""
json.author_name live.user.show_real_name
json.author_login live.user.login
json.author_img url_to_avatar(live.user)

@ -9,8 +9,6 @@ class Live extends Component{
render(){
const { liveData , lives , successFunc , pageSize , changePage } = this.props;
const { admin , business , is_teacher } = this.props.user;
const operation = admin || business || (is_teacher && this.props.checkIfProfessionalCertification())
return(
<div className="livePanel">
{
@ -26,7 +24,6 @@ class Live extends Component{
{...this.props}
{...this.state}
successFunc={()=>successFunc()}
operation={operation}
></LiveItem>
)
})
@ -42,7 +39,6 @@ class Live extends Component{
:
<NoneData style={{width: '100%'}}></NoneData>
}
</div>
)
}

@ -20,7 +20,7 @@ class LiveItem extends Component{
})
}
render(){
const { item , operation } = this.props;
const { item } = this.props;
return(
<div className="liveItem">
<div className="lineMiddle livesMain">
@ -30,7 +30,7 @@ class LiveItem extends Component{
<span className={item.on_status?"labels living":"labels lived"}>{item.on_status?'已开播':'未开播'}</span>
</span>
{
operation &&
item.op_auth &&
<Switch checkedChildren="on" unCheckedChildren="off" defaultChecked={item.on_status} onChange={(flag,event)=>this.changeStatus(flag,event,item.id)}></Switch>
}
</div>

Loading…
Cancel
Save