Explorar o código

问吧类型轮播 fixed

yuhang Fu hai 1 ano
pai
achega
94d8abf69e
Modificáronse 1 ficheiros con 3 adicións e 4 borrados
  1. 3 4
      pages/asking/asking.vue

+ 3 - 4
pages/asking/asking.vue

@@ -92,8 +92,7 @@ export default {
 				result = this.typeList.slice(0,6)
 			} else {
 				this.typeList.filter(e => {
-					if(this.typeList.length - pageNum * (idx +1) < pageNum){
-						console.log(this.typeList.slice(idx*6,this.typeList.length))
+					if(this.typeList.length - pageNum * (idx) < pageNum){
 						// 剩余信息不够6条 全部返回
 						result = this.typeList.slice(idx*6,this.typeList.length)
 					} else {
@@ -105,9 +104,9 @@ export default {
 		},
          //获取类型列表
         getTypeList(){
-            getTypeList(this.queryParams).then(res =>{
+            getTypeList().then(res =>{
                 this.typeList = res.rows
-				this.loopTimes = (this.typeList.length/6).toFixed(0) *1
+				this.loopTimes = (this.typeList.length/6).toFixed(0) *1 + 1
             })
         },
          //获取热门问题列表