Commit 3eac0b7591078c1d8383e71d2553f54b07365bbb

Authored by liuqimichale
1 parent d3aa1e59

滚动播报

src/components/orderMessage/index.vue
@@ -54,12 +54,8 @@ @@ -54,12 +54,8 @@
54 this.list = data; 54 this.list = data;
55 var that = this 55 var that = this
56 this.intnum = setInterval(_ => { 56 this.intnum = setInterval(_ => {
57 - if (this.activeIndex < this.list.length) {  
58 - this.activeIndex += 1;  
59 - that.list.push(that.list[0]);  
60 - } else {  
61 - this.activeIndex = 0;  
62 - } 57 + that.list.push(that.list[this.activeIndex]);
  58 + this.activeIndex += 1;
63 }, 1000); 59 }, 1000);
64 }).catch((response)=>{ 60 }).catch((response)=>{
65 console.log(response); 61 console.log(response);