diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4fac8cc72..1039a648a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -28,8 +28,9 @@ module ApplicationHelper end # MD5加密 - def md5_encode(content) - Digest::MD5.hexdigest(content) + def base64_encode(content) + return nil if content.blank? + Base64.encode64(content) end def graduation_navigation graduation diff --git a/app/views/users/videos/_video.json.jbuilder b/app/views/users/videos/_video.json.jbuilder index eb5fafec5..ac030ce12 100644 --- a/app/views/users/videos/_video.json.jbuilder +++ b/app/views/users/videos/_video.json.jbuilder @@ -1,6 +1,6 @@ json.extract! video, :id, :title, :cover_url, :file_url, :play_url, :vv, :user_id, :transcoded -json.play_url md5_encode(video.play_url) -json.file_url md5_encode(video.file_url) +json.play_url base64_encode(video.play_url) +json.file_url base64_encode(video.file_url) json.play_duration video.video_play_duration json.published_at video.display_published_at json.created_at video.display_created_at diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 2bf7fb988..afd62118e 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -601,7 +601,7 @@ class CoursesBanner extends Component { - +
@@ -665,6 +665,10 @@ class CoursesBanner extends Component { {/*}*/}
+ {this.props.isStudent()?this.props.current_user&&this.props.current_user.course_is_end===true?"": this.exitclass()} + > 永久退出课堂 :""} + {coursedata.switch_to_student === true ? 由教师/助教身份切换至学生
可进行提交作品、答题等操作 @@ -723,9 +727,7 @@ class CoursesBanner extends Component { ) : ""} - {this.props.isStudent()?this.props.current_user&&this.props.current_user.course_is_end===true?"": this.exitclass()} - > 永久退出课堂 :""} +
diff --git a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js index 3ef957042..9c57cc88c 100644 --- a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js +++ b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js @@ -51,22 +51,21 @@ class OneSelfOrderModal extends Component{ let course_groups = this.props.course_groups; course_groups.map((item, key) => { - console.log(item) + if (item.end_time === null) { // if(this.props.starttimesend===undefined){ // item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); // }else{ // item.end_time = moment(handleDateString(this.props.starttimesend)).format("YYYY-MM-DD HH:mm"); // } - item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); - newarr.push(item) - } else { if(this.props.starttimesend){ item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm"); }else{ item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); } newarr.push(item) + } else { + newarr.push(item) } }) this.setState({ @@ -109,15 +108,14 @@ class OneSelfOrderModal extends Component{ course_groups.map((item,key)=>{ if(item.end_time===null){ // item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); - item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); - newarr.push(item) - }else{ if(this.props.starttimesend){ item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm"); }else{ item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); } newarr.push(item) + }else{ + newarr.push(item) } }) this.setState({ @@ -401,7 +399,7 @@ class OneSelfOrderModal extends Component{ {/*{this.props.starttime}*/} {this.props.modaltype===undefined||this.props.modaltype===2? {/*{this.props.endtime}*/} - 截止时间1 + 截止时间
  • 分班名称 - 截止时间2 + 截止时间
  • } {this.props.modaltype===undefined||this.props.modaltype===2 diff --git a/public/react/src/modules/paths/ShixunPathCard.js b/public/react/src/modules/paths/ShixunPathCard.js index 66f236692..5afceaf30 100644 --- a/public/react/src/modules/paths/ShixunPathCard.js +++ b/public/react/src/modules/paths/ShixunPathCard.js @@ -43,7 +43,7 @@ class ShixunPathCard extends Component{

    非试用内容,需要授权

    */} - + {/*target="_blank"*/} 详情图片 @@ -80,7 +80,7 @@ class ShixunPathCard extends Component{ ) } - + ) } diff --git a/public/react/src/modules/paths/statics/index.js b/public/react/src/modules/paths/statics/index.js index 5988f113d..55e391478 100644 --- a/public/react/src/modules/paths/statics/index.js +++ b/public/react/src/modules/paths/statics/index.js @@ -212,8 +212,8 @@ const App = (props) => { sorter: (a, b) => a.cost_time - b.cost_time } ]; - - + + useEffect(() => { changeParams({ page: 1, @@ -307,7 +307,7 @@ const App = (props) => { fetchData={handleFetchData} /> - + { fetchData={handleFetchData} /> - + { other_info, total, } - + }; const mapDispatchToProps = (dispatch) => ({