Authored by 叶弯弯

修复切换店铺后消息页的刷新问题(临时方案)。

@@ -56,9 +56,17 @@ class MessageContainer extends Component { @@ -56,9 +56,17 @@ class MessageContainer extends Component {
56 } 56 }
57 57
58 componentDidMount() { 58 componentDidMount() {
  59 + // console.log('yeww componentDidMount');
59 this.props.actions.getMsgList(this.props.home.brandId); 60 this.props.actions.getMsgList(this.props.home.brandId);
60 } 61 }
61 62
  63 + componentWillReceiveProps() {
  64 + if (!this.props.message.isFetching && this.props.message.messageList.size == 0) {
  65 + // console.log('yeww componentWillReceiveProps');
  66 + this.props.actions.getMsgList(this.props.home.brandId);
  67 + }
  68 + }
  69 +
62 pressRow(rowID){ 70 pressRow(rowID){
63 this.props.actions.checkMessageDetail(rowID); 71 this.props.actions.checkMessageDetail(rowID);
64 } 72 }