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

dev_aliyun2
杨树明 5 years ago
commit 77faec0794

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

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

@ -601,7 +601,7 @@ class CoursesBanner extends Component {
</div>
<div className="clearfix ">
<div className="fl fl mr40 mb20" >
@ -665,6 +665,10 @@ class CoursesBanner extends Component {
{/*}*/}
<div>
{this.props.isStudent()?this.props.current_user&&this.props.current_user.course_is_end===true?"":<a className="fr user_default_btn user_blue_btn mr20 font-18"
onClick={() => this.exitclass()}
> 永久退出课堂 </a>:""}
{coursedata.switch_to_student === true ?
<Tooltip placement="bottom" title={
<pre>由教师/助教身份切换至学生<br/>可进行提交作品答题等操作</pre>
@ -723,9 +727,7 @@ class CoursesBanner extends Component {
)
: ""}
{this.props.isStudent()?this.props.current_user&&this.props.current_user.course_is_end===true?"":<a className="fr user_default_btn user_blue_btn mr20 font-18"
onClick={() => this.exitclass()}
> 永久退出课堂 </a>:""}
</div>

@ -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}</span>*/}
{this.props.modaltype===undefined||this.props.modaltype===2? <span className={"font-14 color979797"}>
{/*{this.props.endtime}*/}
<span className={"mr10"}>截止时间1</span>
<span className={"mr10"}>截止时间</span>
<DatePicker
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
@ -446,7 +444,7 @@ class OneSelfOrderModal extends Component{
|| this.props.usingCheckBeforePost ?"":<div className="clearfix edu-txt-center lineh-40 F4FAFF">
<li style={{ width: '100%',padding: "0px 10px"}} className={"mb10"}>
<span style={{"float":"left","color":"#05101A"}} className="task-hide color-grey-name color-grey-9">分班名称</span>
<span style={{"float":"right","color":"#05101A","margin-right": "145px"}} className="task-hide color-grey-name color-grey-9">截止时间2</span>
<span style={{"float":"right","color":"#05101A","margin-right": "145px"}} className="task-hide color-grey-name color-grey-9">截止时间</span>
</li>
</div>}
{this.props.modaltype===undefined||this.props.modaltype===2

@ -43,7 +43,7 @@ class ShixunPathCard extends Component{
<p className="font-14 color-white">非试用内容需要授权</p>
</div> */}
<Link to={"/paths/"+item.id} className="squareImg" >
<Link to={"/paths/"+item.id} className="squareImg" target="_blank">
{/*target="_blank"*/}
<img alt="详情图片" src={setImagesUrl(item.image_url)}/>
</Link>
@ -80,7 +80,7 @@ class ShixunPathCard extends Component{
</div>
)
}
</div>
)
}

@ -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}
/>
</TabPane>
<TabPane tab="实使用情况" key="2">
<TabPane tab="实使用情况" key="2">
<DisplayTableData
columns={sxColumns}
datas={other_info}
@ -315,7 +315,7 @@ const App = (props) => {
fetchData={handleFetchData}
/>
</TabPane>
<TabPane tab="学习情况" key="3">
<TabPane tab="学员学习情况" key="3">
<DisplayTableData
columns={stColumns}
datas={other_info}
@ -339,7 +339,7 @@ const mapStateToProps = (state) => {
other_info,
total,
}
};
const mapDispatchToProps = (dispatch) => ({

Loading…
Cancel
Save