From ad383e03c1677538b5d8c74eb842d022a1c81455 Mon Sep 17 00:00:00 2001 From: gao1021514 <1328969651@qq.com> Date: Sat, 2 Jul 2022 18:41:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=AF=A6=E6=83=85=E3=80=81?= =?UTF-8?q?=E5=88=9B=E4=BD=9C=E8=80=85=E8=AF=A6=E6=83=85=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E3=80=81=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + pages/creator/creator.vue | 14 ++++- pages/creator/creatorDetail.vue | 4 +- pages/creator/imgDetail.vue | 18 ++++-- pages/index/choiceness.vue | 61 +++++++++++++++++--- pages/index/index.vue | 3 +- pages/userInfo/myCollection/myCollection.vue | 2 +- 7 files changed, 83 insertions(+), 21 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..44fbeba --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/unpackage/ \ No newline at end of file diff --git a/pages/creator/creator.vue b/pages/creator/creator.vue index 05585c1..eb060d5 100644 --- a/pages/creator/creator.vue +++ b/pages/creator/creator.vue @@ -63,7 +63,7 @@ duration: 1000, indicatorDots: true, pageNum: 1, - pageSize: 10 + pageSize: 2 } }, onLoad() { @@ -73,9 +73,19 @@ // 下拉刷新 onPullDownRefresh(){ this.getBanner(); + this.pageNum = 1 + this.creatorImgList = [] this.getCreatorImgsPage(); uni.stopPullDownRefresh() }, + + // 上划加载更多 + onReachBottom() { + if (this.creatorImgList.length > 1) { + this.pageNum += 1 + this.getCreatorImgsPage() + } + }, methods: { // 跳转艺术家详情页 toCreatorDetail(item){ @@ -131,7 +141,7 @@ pageSize: this.pageSize }) if (res.data.code === 200) { - this.creatorImgList = res.data.rows + this.creatorImgList.push(...res.data.rows) console.log('creatorImgList', this.creatorImgList) } else { uni.showModal({ diff --git a/pages/creator/creatorDetail.vue b/pages/creator/creatorDetail.vue index ddb9fce..d704f5c 100644 --- a/pages/creator/creatorDetail.vue +++ b/pages/creator/creatorDetail.vue @@ -86,7 +86,7 @@ data: item.id, success() { console.log(111111) - uni.redirectTo({ + uni.navigateTo({ url: './imgDetail' }) } @@ -180,7 +180,7 @@ justify-content: flex-start; align-items: center; flex-wrap: wrap; - + padding-bottom: 20px; image { margin-top: 40rpx; margin-left: 40rpx; diff --git a/pages/creator/imgDetail.vue b/pages/creator/imgDetail.vue index e266191..329c4f5 100644 --- a/pages/creator/imgDetail.vue +++ b/pages/creator/imgDetail.vue @@ -65,8 +65,13 @@ } return { title: '自定义分享标题', - path: `/pages/creator/imgDetail?id=${this.userInfo.id}` + path: `/pages/creator/imgDetail?id=${this.userInfo.id}`, + bgImgUrl: `${this.detailMsg.imgUrl}` } + uni.showToast({ + title: '分享成功', + icon: 'none' + }) }, methods: { // 图片详情 @@ -339,15 +344,16 @@ border-radius: 60px; padding-top: 40rpx; .share-box{ - outline: none; - background: none; - border: none; + >button{ - line-height: auto!important; + line-height: 0!important; padding: 0; + outline: none; + background: none; + border: none; } - >button ::after{ + >button::after{ border: none; } } diff --git a/pages/index/choiceness.vue b/pages/index/choiceness.vue index 5e62657..5ec8b4c 100644 --- a/pages/index/choiceness.vue +++ b/pages/index/choiceness.vue @@ -3,7 +3,6 @@ - @@ -13,14 +12,14 @@ -