Commit 67718390 by xuzhenghua

pull

parents f61f8135 9d9cc01d
......@@ -8,7 +8,7 @@ import ListHeader from './../listHeader';
import './index.scss';
@connect(({user})=> ({
uid: user.data.uid || ''
uid: user && user.data && user.data.uid ? user.data.uid :''
}))
class CollectBlessing extends Component {
......
......@@ -81,7 +81,8 @@ class BlessingPreheat extends Component {
},
],
index: 0,
userHasError: props.user.hasError
userHasError: props.user.hasError,
isApp: false
}
}
......@@ -110,7 +111,6 @@ class BlessingPreheat extends Component {
this.handleToAddBlessing(result);
}
}
......@@ -138,6 +138,9 @@ class BlessingPreheat extends Component {
if (cookie.get("token") && cookie.get("uid")) {
this.fetchUserBlessing();
this.setState({
isApp: true
})
}
this.props.setCurrentUser(this.transformUser(this.state.userInfoList))
......@@ -419,11 +422,11 @@ class BlessingPreheat extends Component {
isSign,
showRecordList,
shareMark,
index
index,
isApp
} = this.state;
const {history} = this.props;
const isLogin = !this.props.user.hasError
const uid = this.props.user.data.uid
return (
<div id={'blessing-preheat'}>
<Banner
......@@ -473,9 +476,9 @@ class BlessingPreheat extends Component {
{/* 精品课程特惠专区 */}
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
<CourseList
isApp={isApp}
isFormal={isFormal}
isLogin={isLogin}
uid={uid}
history={this.props.history}
toLogin={this.toLogin}
/>
......
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