Commit 87a76062 by FE

未登陆时,课程详情页提示未登陆问题修改

parent 14f6bd88
...@@ -29,7 +29,10 @@ class Bargain extends Component { ...@@ -29,7 +29,10 @@ class Bargain extends Component {
} }
componentDidMount() { componentDidMount() {
this.getBargainInfo() const { user= {} } = this.props;
if(user.code === 200) {
this.getBargainInfo();
}
} }
// 获取助理好友 // 获取助理好友
......
...@@ -39,8 +39,8 @@ class BtnStatus extends Component { ...@@ -39,8 +39,8 @@ class BtnStatus extends Component {
// } // }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
const { data = {}} = nextProps; const { data = {}, user = {}} = nextProps;
if(data.is_bargain) { if(data.is_bargain && user.code !== 4030) {
this.getBargainInfo(); this.getBargainInfo();
} }
// if(nextProps.data && nextProps.data.is_bargain) { // if(nextProps.data && nextProps.data.is_bargain) {
......
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