Authored by 王涛

Merge branch 'master-v32-xwx' into 'master'

杭州-大屏-业务轮播



See merge request !188
@@ -53,7 +53,7 @@ export default { @@ -53,7 +53,7 @@ export default {
53 } 53 }
54 proxy.timer=setInterval(function (){ 54 proxy.timer=setInterval(function (){
55 proxy.preOrNext(0); 55 proxy.preOrNext(0);
56 - },10000) 56 + },20000)
57 } 57 }
58 const preOrNext=(val)=>{ 58 const preOrNext=(val)=>{
59 console.log("click",val) 59 console.log("click",val)
@@ -66,6 +66,7 @@ export default { @@ -66,6 +66,7 @@ export default {
66 if(index+1==listArray.length){ 66 if(index+1==listArray.length){
67 proxy.checkId=listArray[0] 67 proxy.checkId=listArray[0]
68 if(val==0){ 68 if(val==0){
  69 +
69 proxy.preNext() 70 proxy.preNext()
70 71
71 }else{ 72 }else{
@@ -77,7 +78,7 @@ export default { @@ -77,7 +78,7 @@ export default {
77 }else{ 78 }else{
78 79
79 // proxy.checkId=listArray[index+1] 80 // proxy.checkId=listArray[index+1]
80 - proxy.preNext() 81 + proxy.clickNext()
81 } 82 }
82 } 83 }
83 84
@@ -86,25 +87,23 @@ export default { @@ -86,25 +87,23 @@ export default {
86 if(val=='left'){ 87 if(val=='left'){
87 if(index==0){ 88 if(index==0){
88 proxy.checkId=listArray[listArray.length-1] 89 proxy.checkId=listArray[listArray.length-1]
89 - proxy.clickNext() 90 + proxy.preNext()
90 }else{ 91 }else{
91 proxy.checkId=listArray[index-1] 92 proxy.checkId=listArray[index-1]
92 if(index%5==0){ 93 if(index%5==0){
93 proxy.preNext() 94 proxy.preNext()
94 } 95 }
  96 +
95 } 97 }
96 }else{ 98 }else{
97 if(index>=4){ 99 if(index>=4){
  100 + if ((index+1)%5==0){
98 proxy.clickNext() 101 proxy.clickNext()
  102 + }
99 103
100 } 104 }
101 proxy.checkId=listArray[index+1] 105 proxy.checkId=listArray[index+1]
102 -  
103 } 106 }
104 -  
105 -  
106 -  
107 -  
108 } 107 }
109 108
110 proxy.clickTabs(proxy.checkId) 109 proxy.clickTabs(proxy.checkId)
@@ -142,14 +141,24 @@ export default { @@ -142,14 +141,24 @@ export default {
142 proxy.prePage(); 141 proxy.prePage();
143 } 142 }
144 const nextPage= ()=>{ 143 const nextPage= ()=>{
145 - if (proxy.currentPage == proxy.pageNum - 1) return; 144 + if (proxy.currentPage == proxy.pageNum ){
  145 + return;
  146 + }else if (proxy.currentPage == 2){
  147 + proxy.currentPage=0;
  148 + }else{
146 proxy.currentPage++; 149 proxy.currentPage++;
  150 + }
  151 +
147 152
148 } 153 }
149 const prePage=()=>{ 154 const prePage=()=>{
150 - if (proxy.currentPage == 0) return; 155 + if(proxy.currentPage==0){
  156 + proxy.currentPage=2;
  157 + }else {
151 proxy.currentPage--; 158 proxy.currentPage--;
152 } 159 }
  160 +
  161 + }
153 const clickTabs=(val)=>{ 162 const clickTabs=(val)=>{
154 proxy.checkId=val; 163 proxy.checkId=val;
155 busId.value=val 164 busId.value=val
@@ -170,7 +179,7 @@ export default { @@ -170,7 +179,7 @@ export default {
170 dataShow: function(){ 179 dataShow: function(){
171 let start = this.currentPage*this.pageSize; 180 let start = this.currentPage*this.pageSize;
172 let end = Math.min((this.currentPage+1)*this.pageSize, this.listArray.length) 181 let end = Math.min((this.currentPage+1)*this.pageSize, this.listArray.length)
173 - return this.listArray.slice(start, end) 182 + return this.listArray.slice(start, end);
174 }, 183 },
175 isDiv:function (){ 184 isDiv:function (){
176 let length=this.dataShow.length; 185 let length=this.dataShow.length;