Commit ef92ec1e by zhanghaozhe

我的课程页面开始学习跳转小课页面

parent dee252cd
......@@ -3,7 +3,7 @@ import './index.scss'
const VList = (props) => {
return (
<li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id)}>
<li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id, props.item)}>
<div className="content">
<div className="cover">
{props.status}
......@@ -16,4 +16,4 @@ const VList = (props) => {
);
};
export default VList;
\ No newline at end of file
export default VList;
......@@ -76,8 +76,14 @@ class MyCourses extends Component {
isLoading: true
}
handleClick = id => {
this.props.history.push(`/play/video?id=${id}`)
handleClick = (id, item) => {
const {history} = this.props
const {mode, course_id} = item
if(mode && mode == 6){
history.push(`/python?id=${course_id}`)
return
}
history.push(`/play/video?id=${id}`)
}
addCourseClick = () => {
this.props.history.push('/classify')
......@@ -164,6 +170,7 @@ class MyCourses extends Component {
info={Info}
status={status}
courseExpire={courseExpire}
item={item}
id={item['v_course_id']}
/>
)
......@@ -200,4 +207,4 @@ export default connect(
{
fetchCoursesListIfNeeded,
switchTab
})(MyCourses)
\ No newline at end of file
})(MyCourses)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment