Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hs
jingquan huang 6 years ago
commit 54928335ae

@ -269,6 +269,6 @@ module CoursesHelper
myshixun = Myshixun.where(user_id: user_id, shixun_id: subject&.shixuns).order("updated_at desc").first myshixun = Myshixun.where(user_id: user_id, shixun_id: subject&.shixuns).order("updated_at desc").first
return "" unless myshixun return "" unless myshixun
stage_shixun = subject&.stage_shixuns.where(shixun_id: myshixun.shixun_id).take stage_shixun = subject&.stage_shixuns.where(shixun_id: myshixun.shixun_id).take
progress = stage_shixun&.position.to_s + "-" + stage_shixun&.position.to_s + " " + myshixun.shixun&.name progress = stage_shixun&.stage&.position.to_s + "-" + stage_shixun&.position.to_s + " " + myshixun.shixun&.name
end end
end end

@ -1,6 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Modal} from 'antd'; import { Modal} from 'antd';
import axios from 'axios'; import axios from 'axios';
import Modals from './Modals';
//加入精品课堂 //加入精品课堂
class Jointheclass extends Component { class Jointheclass extends Component {
@ -11,6 +12,12 @@ class Jointheclass extends Component {
componentDidMount() { componentDidMount() {
// console.log("加入精品课堂"); // console.log("加入精品课堂");
// console.log(this.props); // console.log(this.props);
let type=this.props.yslJointhe===undefined?false:this.props.yslJointhe;
if(type===true){
this.setState({
Modalstype:true
})
}
} }
@ -48,35 +55,15 @@ class Jointheclass extends Component {
// console.log("加入精品课堂2"); // console.log("加入精品课堂2");
//console.log(this.props.Pathcourseid); //console.log(this.props.Pathcourseid);
return( return(
<Modal <Modals
keyboard={false} modalsType={this.props.yslJointhe===undefined?false:this.props.yslJointhe}
closable={false} modalsTopval={"是否确定加入该课堂?"}
footer={null} modalCancel={()=>this.modalCancel()}
destroyOnClose={true} modalSave={()=>this.setDownload()}
title="提示" ></Modals>
centered={true}
visible={this.props.yslJointhe===undefined?false:this.props.yslJointhe}
width="600px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft"}><p className={"mt70 mb70 font-16"}>是否确认加入该课堂?</p></div>
<div className="clearfix edu-txt-center mt20">
<style>
{
`
a:hover {
color: #fff !important;
}
`
}
</style>
<a className="task-btn mr30" onClick={()=>this.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>确认</a>
</div>
</div>
</Modal>
) )
} }
} }
export default Jointheclass; export default Jointheclass;

@ -527,9 +527,7 @@ class DetailTop extends Component{
<div key={key}> <div key={key}>
{item.course_status.status===0?<div className="mr51 shixun_detail pointer fl user-colorgrey-green pathdefault">即将开课</div>:""} {item.course_status.status===0?<div className="mr51 shixun_detail pointer fl user-colorgrey-green pathdefault">即将开课</div>:""}
{item.course_status.status===1?<div className="mr51 shixun_detail pointer fl color-orange pathdefault">{item.course_status.time}</div>:""} {item.course_status.status===1?<div className="mr51 shixun_detail pointer fl color-orange pathdefault">{item.course_status.time}</div>:""}
{item.course_status.status===2? {item.course_status.status===2&&item.course_identity<6?<div className="mr51 shixun_detail pointer fl user-colorgrey-9b pathdefault">已结束</div>:""}
detailInfoList.is_creator===true||detailInfoList.allow_add_member===true?<div className="mr51 shixun_detail pointer fl user-colorgrey-9b pathdefault">已结束</div>:item.course_identity<6?
<div className="mr51 shixun_detail pointer fl user-colorgrey-9b pathdefault">已结束</div>:"":""}
{item.course_status.status===0? {item.course_status.status===0?
item.course_identity<5?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" href={item.first_category_url} target="_blank"> item.course_identity<5?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" href={item.first_category_url} target="_blank">

Loading…
Cancel
Save