reghao hace 2 años
padre
commit
edc5cd4f23
Se han modificado 3 ficheros con 6 adiciones y 10 borrados
  1. 1 1
      src/views/home/Audio.vue
  2. 3 5
      src/views/home/Image.vue
  3. 2 4
      src/views/home/Video.vue

+ 1 - 1
src/views/home/Audio.vue

@@ -75,7 +75,7 @@ export default {
         if (resp.code === 0) {
           this.dataList = resp.data.list
           this.totalPages = resp.totalPages
-          this.totalSize = resp.totalSize
+          this.totalSize = resp.data.totalSize
         }
       })
     }

+ 3 - 5
src/views/home/Image.vue

@@ -86,10 +86,8 @@ export default {
       // 屏幕宽度, 为了控制分页条的大小
       screenWidth: document.body.clientWidth,
       currentPage: 1,
-      pageSize: 12,
-      totalPages: 0,
+      pageSize: 24,
       totalSize: 0,
-      showEmpty: true,
       dataList: [],
     }
   },
@@ -118,8 +116,7 @@ export default {
       getImages(page).then(resp => {
         if (resp.code === 0) {
           this.dataList = resp.data.list
-          this.totalPages = resp.totalPages
-          this.totalSize = resp.totalSize
+          this.totalSize = resp.data.totalSize
         } else {
           this.$notify({
             title: '获取数据失败',
@@ -154,6 +151,7 @@ export default {
       })
     },
     collectItem(image) {
+      console.log(image)
       const jsonData = {}
       jsonData.contentType = 1001
       jsonData.contentId = image.imageFileId

+ 2 - 4
src/views/home/Video.vue

@@ -87,8 +87,7 @@ export default {
       totalPages: 0,
       totalSize: 0,
       dataList: [],
-      categoryId: 19,
-      currentIndex: 0,
+      categoryId: 20,
       currentCategory: 0,
       currentChildCategory: 0,
       categoryMap: {
@@ -107,7 +106,6 @@ export default {
     videoCategory().then(resp => {
       if (resp.code === 0) {
         for (let i = 0; i < resp.data.length; i++) {
-          const name = resp.data[i].name
           this.category.push(resp.data[i])
           this.categoryMap.Set(resp.data[i].id, resp.data[i])
         }
@@ -182,7 +180,7 @@ export default {
       this.categoryId = categoryId;
       this.currentPage = 1
       this.dataList = []
-      this.videoPageWrapper(this.categoryId, this.nextId)
+      this.videoPageWrapper(this.categoryId, this.currentPage)
     }
   }
 }