reghao преди 1 година
родител
ревизия
f0178a133e
променени са 1 файла, в които са добавени 5 реда и са изтрити 9 реда
  1. 5 9
      src/views/home/ImagePage.vue

+ 5 - 9
src/views/home/ImagePage.vue

@@ -132,17 +132,13 @@ export default {
     getAlbumItemsWrapper() {
       getImageItems(this.albumId, this.currentPage).then(resp => {
         if (resp.code === 0) {
-          const respData = resp.data
-          document.title = '相册 - ' + respData.albumName
-
           this.data = resp.data
-          const images = resp.data.images
+          document.title = '相册 - ' + this.data.albumName
+
+          const images = this.data.images
           this.dataList = images.list
           this.totalSize = images.totalSize
-          this.imageCount = images.length
-          this.limit = 40 - images.length
-          this.data = respData
-          this.userId = respData.userId
+          this.userId = this.data.userId
           getUserInfo(this.userId).then(resp => {
             if (resp.code === 0) {
               this.user = resp.data
@@ -189,7 +185,7 @@ export default {
     },
     showImages(index) {
       const imageUrls = []
-      for (const i of this.data.images) {
+      for (const i of this.dataList) {
         imageUrls.push(i.originalUrl)
       }