Browse Source

feature-tiktok-1.0:我的收藏图片展示优化

feature-1.0
chengkun 4 years ago
parent
commit
3a1988fe82
  1. 14
      pages/creator/creator.vue
  2. 9
      pages/userInfo/myCollection/myCollection.vue

14
pages/creator/creator.vue

@ -119,20 +119,13 @@
});
}
},
//
// banner
linkTo(item) {
console.log(item)
if (item.id) {
uni.setStorage({
key: 'detailId',
data: item.id,
success() {
console.log(111111)
uni.navigateTo({
url: '../creator/imgDetail'
})
}
})
url: 'pages/index'
});
}
},
@ -160,7 +153,6 @@
})
if (res.data.code === 200) {
this.creatorImgList.push(...res.data.rows)
console.log('creatorImgList', this.creatorImgList)
} else {
uni.showModal({
content: '用户图片列表加载失败!',

9
pages/userInfo/myCollection/myCollection.vue

@ -38,9 +38,6 @@
}
})
},
onLoad() {
this.getImgList();
},
//
onPullDownRefresh() {
//TODO
@ -52,7 +49,6 @@
},
//
onReachBottom() {
console.log(2222)
if (this.imgList.length > 3) {
this.pageNum += 1
this.getImgList()
@ -67,10 +63,7 @@
pageSize: this.pageSize
})
if (res.data.code === 200) {
console.log('res',res)
for (let i = 0; i < res.data.rows.length; i++) {
this.imgList = res.data.rows
}
this.imgList.push(...res.data.rows)
} else {
uni.showToast({
title: res.data.msg,

Loading…
Cancel
Save