Commit caa42759 by FE

solve question that not show kanjian info in course detial

parent 207a67c8
...@@ -228,17 +228,11 @@ class BtnStatus extends Component { ...@@ -228,17 +228,11 @@ class BtnStatus extends Component {
} }
render() { render() {
let info = '' // data 课程信息;barInfo 砍价信息
if (this.props.data && this.props.data.course_info) { const { data: info = {}, barInfo = {}, user = {} } = this.props;
info = this.props.data.course_info const { countdown } = this.state;
} const uid = user.data && user.data.uid;
const {countdown} = this.state;
const {user} = this.props
const uid = user && user.data && user.data.uid
const { barInfo = {} } = this.props;
console.log(this.props);
return ( return (
<div> <div>
{/*正常购买*/} {/*正常购买*/}
{ {
......
...@@ -38,7 +38,6 @@ class Detail extends Component { ...@@ -38,7 +38,6 @@ class Detail extends Component {
this.props.getCourses(); this.props.getCourses();
} }
const { courseInfo } = this.props; const { courseInfo } = this.props;
console.log(this.props);
if(courseInfo.course_info.is_bargain) { if(courseInfo.course_info.is_bargain) {
this.getBargainInfo(); this.getBargainInfo();
} }
...@@ -268,7 +267,7 @@ class Detail extends Component { ...@@ -268,7 +267,7 @@ class Detail extends Component {
{/*砍价*/} {/*砍价*/}
{ {
(!courseInfo.is_aist) && this.props.courseInfo && this.props.courseInfo.is_bargain && (!courseInfo.is_aist) && this.props.courseInfo.course_info && this.props.courseInfo.course_info.is_bargain &&
<Bargain/> <Bargain/>
} }
...@@ -277,7 +276,7 @@ class Detail extends Component { ...@@ -277,7 +276,7 @@ class Detail extends Component {
{/*课程按钮*/} {/*课程按钮*/}
<BtnStatus countdown={countdown} <BtnStatus countdown={countdown}
data={this.props.courseInfo} data={this.props.courseInfo.course_info}
user={this.props.user} user={this.props.user}
barInfo={this.state.barInfo} barInfo={this.state.barInfo}
invitedFriends={this.invitedFriends} invitedFriends={this.invitedFriends}
......
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