From fc68f6006949a91fced69951778a7c88859cbb6c Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Wed, 06 May 2020 10:49:07 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/huge/frontEnd/hugeOA --- src/components/common/NotifyList/index.jsx | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/common/NotifyList/index.jsx b/src/components/common/NotifyList/index.jsx index a2e651a..1b707bc 100644 --- a/src/components/common/NotifyList/index.jsx +++ b/src/components/common/NotifyList/index.jsx @@ -25,20 +25,25 @@ fetch({ url: `api/document/getNewNotice` }).then(res => { - console.log('res', res); - this.setState({ - content: res.documentContent || '' - }) + if( res ) { + this.setState({ + content: res.documentTitle || '' + }) + } }) } componentDidMount() { } + onClick = () => { + this.props.history.push({ pathname: "/index/workbench/announcement" }); + } + renderDom = () => { let { content } = this.state; return <div className="notify-list-main-dom"> <span className="notify-list-main-dom-msg">最新通知:{content}</span> - <span className="notify-list-main-dom-fuc">[查看全部]</span> + <span className="notify-list-main-dom-fuc" onClick={this.onClick}>[查看全部]</span> </div> } -- Gitblit v1.8.0