forked from Gitlink/forgeplus-react
头部通知-跳转
This commit is contained in:
parent
9ae3c0e786
commit
bbca3d51e1
|
@ -510,20 +510,11 @@ class NewHeader extends Component {
|
|||
}
|
||||
|
||||
{ (settings && settings.common && settings.common.notice) && (current_user && current_user.login)?
|
||||
<Popover
|
||||
overlayClassName="notice-popover"
|
||||
placement={`bottomRight`}
|
||||
content={<NoticeContent visible={visible} current_user={current_user} showNotification={showNotification} resetUserInfo={resetUserInfo}/>}
|
||||
visible={visible}
|
||||
onVisibleChange={this.handleVisibleChange}
|
||||
destroyTooltipOnHide
|
||||
>
|
||||
<Link to={"/settings/notice"} className="message-icon">
|
||||
{current_user && <Badge count={current_user.message_unread_total}>
|
||||
<i className="iconfont icon-xiaoxilingdang color-grey-6 ml15 mr15"></i>
|
||||
</Badge>}
|
||||
</Link>
|
||||
</Popover>
|
||||
<a href={settings.common.notice} className="message-icon">
|
||||
{current_user &&
|
||||
<i className="iconfont icon-xiaoxilingdang color-grey-6 ml15 mr15"></i>
|
||||
}
|
||||
</a>
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -184,11 +184,11 @@ function NoticeContent({ visible, showNotification, resetUserInfo, current_user:
|
|||
className='hoverNotice-body' // 外部添加className加以区分
|
||||
onPullRefresh={() => { setNoticePage(noticePage + 1); }} //触发加载ajax的function
|
||||
// type={2} // 传送加载组件的状态
|
||||
count={noticeUnreadList.length} // 数据当前的总数量
|
||||
count={noticeUnreadList && noticeUnreadList.length} // 数据当前的总数量
|
||||
pageSize={10} //
|
||||
>
|
||||
{
|
||||
noticeUnreadList.map(item => {
|
||||
noticeUnreadList && noticeUnreadList.length>0 && noticeUnreadList.map(item => {
|
||||
return (
|
||||
<div key={item.id + Math.random()} className="noticeCont-back" onClick={() => { readItem(item) }}>
|
||||
<div className={`noticeCont ${item.notification_url?'pointer':''}`}>
|
||||
|
|
|
@ -295,7 +295,7 @@ class Index extends Component {
|
|||
return (
|
||||
<div>
|
||||
<div class="subjectBanner">
|
||||
<img src={banner} width="100%" alt=""/>
|
||||
<img src={banner} width="100%" height="100%" alt=""/>
|
||||
<div class="bannerBox">
|
||||
<div class="subjectleft">
|
||||
<span>头歌开源</span>
|
||||
|
|
Loading…
Reference in New Issue