From 03c9ff66f47b3be70c3d2bcfa04cee2f44174b81 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 22 Aug 2019 16:39:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 6a4353aa2..c5d376baf 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -269,6 +269,6 @@ module CoursesHelper myshixun = Myshixun.where(user_id: user_id, shixun_id: subject&.shixuns).order("updated_at desc").first return "" unless myshixun 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 From 290c681a6b117a1267badedeb2312b5cfa46a59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 22 Aug 2019 16:39:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9D=83=E9=99=90=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=20=E5=BC=B9=E7=AA=97=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/modals/Jointheclass.js | 43 +++++++------------ .../src/modules/paths/PathDetail/DetailTop.js | 4 +- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/public/react/src/modules/modals/Jointheclass.js b/public/react/src/modules/modals/Jointheclass.js index 40f62a6ac..0ad13c158 100644 --- a/public/react/src/modules/modals/Jointheclass.js +++ b/public/react/src/modules/modals/Jointheclass.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import { Modal} from 'antd'; import axios from 'axios'; +import Modals from './Modals'; //加入精品课堂 class Jointheclass extends Component { @@ -11,6 +12,12 @@ class Jointheclass extends Component { componentDidMount() { // console.log("加入精品课堂"); // 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(this.props.Pathcourseid); return( - -
-

是否确认加入该课堂?

-
- - this.modalCancel()}>取消 - this.setDownload()}>确认 -
-
-
+ this.modalCancel()} + modalSave={()=>this.setDownload()} + > ) } } -export default Jointheclass; \ No newline at end of file +export default Jointheclass; + diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index 11f56169b..9110f4fcb 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -527,9 +527,7 @@ class DetailTop extends Component{
{item.course_status.status===0?
即将开课
:""} {item.course_status.status===1?
{item.course_status.time}
:""} - {item.course_status.status===2? - detailInfoList.is_creator===true||detailInfoList.allow_add_member===true?
已结束
:item.course_identity<6? -
已结束
:"":""} + {item.course_status.status===2&&item.course_identity<6?
已结束
:""} {item.course_status.status===0? item.course_identity<5?