Commit 87e0d8cc by zhanghaozhe

替换系统通知头像

parent 784ef1fe
...@@ -86,7 +86,7 @@ class Prizes extends Component { ...@@ -86,7 +86,7 @@ class Prizes extends Component {
const {notices} = this.state const {notices} = this.state
return ( return (
<> <>
{showSystemNotices && notices && notices.length && <SystemBulletScreen bullets={notices}/>} {(showSystemNotices && notices && notices.length) ? <SystemBulletScreen bullets={notices}/> : null}
<div className={'prizes-box'} ref={el => this.prizeBox = el}> <div className={'prizes-box'} ref={el => this.prizeBox = el}>
<a href="javascript:;" className='rule-btn' onClick={this.showRules}>活动规则 > </a> <a href="javascript:;" className='rule-btn' onClick={this.showRules}>活动规则 > </a>
<div className={`bg`} ref={el => this.bg = el}/> <div className={`bg`} ref={el => this.bg = el}/>
......
...@@ -61,8 +61,8 @@ class SystemBulletScreen extends Component { ...@@ -61,8 +61,8 @@ class SystemBulletScreen extends Component {
}, 1000) }, 1000)
} else { } else {
setTimeout(() => { setTimeout(() => {
++this.count ++this.count;
swiper.slideNext() (swiper && !swiper.destroyed) && swiper.slideNext()
}, 3000) }, 3000)
} }
} }
...@@ -99,17 +99,18 @@ class SystemBulletScreen extends Component { ...@@ -99,17 +99,18 @@ class SystemBulletScreen extends Component {
this.state.showNotices && this.state.showNotices &&
<div id="system-bullet-screen" onTransitionEnd={this.removeSystemNotices} ref={el => this.sysNotice = el}> <div id="system-bullet-screen" onTransitionEnd={this.removeSystemNotices} ref={el => this.sysNotice = el}>
<img className='avatar' <img className='avatar'
src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-avatar.png' alt=""/> src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-notice-icon.png' alt=""/>
<div className='sys-bullet-screen-swiper-container'> <div className='sys-bullet-screen-swiper-container'>
<ul className="swiper-wrapper"> <ul className="swiper-wrapper">
{ {
bullets && bullets.length && bullets.map((item, index) => { (bullets && bullets.length) ? bullets.map((item, index) => {
return ( return (
<li className="swiper-slide" key={index}> <li className="swiper-slide" key={index}>
<span>{item}</span> <span>{item}</span>
</li> </li>
) )
}) })
: null
} }
</ul> </ul>
</div> </div>
......
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