Commit ee2358a8 by FE

Merge branch '00' of gitlab.julyedu.com:baiguangyao/mr-julyedu into 00

parents 6fa5ba5a b767a24d
...@@ -22,7 +22,6 @@ class SystemBulletScreen extends Component { ...@@ -22,7 +22,6 @@ class SystemBulletScreen extends Component {
this.swiper && this.swiper.destroy() this.swiper && this.swiper.destroy()
} }
initializeSwiper = () => { initializeSwiper = () => {
const _this = this const _this = this
this.swiper = new Swiper('.sys-bullet-screen-swiper-container', { this.swiper = new Swiper('.sys-bullet-screen-swiper-container', {
...@@ -62,18 +61,16 @@ class SystemBulletScreen extends Component { ...@@ -62,18 +61,16 @@ class SystemBulletScreen extends Component {
}, 1000) }, 1000)
} else { } else {
setTimeout(() => { setTimeout(() => {
++this.count;
swiper.slideNext() swiper.slideNext()
}, 3000) }, 3000)
} }
} }
transitionEnd = () => { transitionEnd = () => {
const { const {bullets} = this.props
bullets = []
} = this.props
const len = bullets.length * 3 const len = bullets.length * 3
if (++this.count === len) { if (++this.count === len) {
setTimeout(() => { setTimeout(() => {
this.sysNotice.style.height = `0px` this.sysNotice.style.height = `0px`
...@@ -87,7 +84,7 @@ class SystemBulletScreen extends Component { ...@@ -87,7 +84,7 @@ class SystemBulletScreen extends Component {
removeSystemNotices = e => { removeSystemNotices = e => {
e.persist() e.persist()
if(e.target === this.sysNotice){ if (e.target === this.sysNotice) {
this.setState({ this.setState({
showNotices: false showNotices: false
}) })
......
@import "../user-bullet-screen/bullet-screen"; @import "../user-bullet-screen/bullet-screen";
#system-bullet-screen { #system-bullet-screen {
@extend .bullet-screen;
overflow: hidden; overflow: hidden;
margin-top: 11px; margin-top: 11px;
margin-bottom: 16px; margin-bottom: 16px;
...@@ -25,9 +26,9 @@ ...@@ -25,9 +26,9 @@
span { span {
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
overflow: visible;
line-height: 30px; line-height: 30px;
} }
} }
@extend .bullet-screen;
} }
...@@ -16,7 +16,7 @@ class UserBulletScreen extends Component { ...@@ -16,7 +16,7 @@ class UserBulletScreen extends Component {
this.getBulletScreenData(true) this.getBulletScreenData(true)
} }
componentWillUpdate() { componentWillUnmount() {
this.swiper && this.swiper.destroy() this.swiper && this.swiper.destroy()
} }
......
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