|
@@ -423,7 +423,9 @@ const TopTab = React.createClass({
|
|
|
});
|
|
|
},
|
|
|
componentWillMount() {
|
|
|
- this.loadData();
|
|
|
+ if (this.props.active) {
|
|
|
+ this.loadData();
|
|
|
+ };
|
|
|
},
|
|
|
loadData() {
|
|
|
this.setState({
|
|
@@ -474,14 +476,14 @@ const TopTab = React.createClass({
|
|
|
this.setState({ userModalShow: true });
|
|
|
}}> {adminData.name || adminData.mobile} </a> : <a onClick={this.logOut}>{this.state.username}</a>} <a onClick={this.logOut}>[ 退出 ]</a></span>
|
|
|
<span className="acc-top-user-toindex"><a href={globalConfig.context + "/portal/index.html"}>返回首页</a></span>
|
|
|
- <a onClick={() => { this.setState({ messageModalShow: true }); }} className="user-badge">
|
|
|
+ {this.props.active ? <a onClick={() => { this.setState({ messageModalShow: true }); }} className="user-badge">
|
|
|
<Icon type="mail" />
|
|
|
{(() => {
|
|
|
if (!window.showSystem && this.state.badge) {
|
|
|
return <Badge status="processing" />
|
|
|
}
|
|
|
})()}
|
|
|
- </a>
|
|
|
+ </a> : <div></div>}
|
|
|
</div>
|
|
|
<div className="acc-index">
|
|
|
<div className="acc-index-imgbox">
|