Commit caa42759 by FE

solve question that not show kanjian info in course detial

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