From 2f49cde11dd4440d8e465b3a1489163226b5f179 Mon Sep 17 00:00:00 2001
From: gao1021514 <1328969651@qq.com>
Date: Sun, 3 Jul 2022 21:00:32 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=91=E6=9C=9F=E7=B2=BE=E9=80=89=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=E5=AD=90=E7=BB=84=E4=BB=B6=E5=BC=95=E5=85=A5=EF=BC=8C?=
=?UTF-8?q?=E5=88=9B=E4=BD=9C=E8=80=85=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 4 +--
pages/creator/creatorDetail.vue | 40 ++++++++++++++++++------
pages/index/index.vue | 54 +++++++++++++++++++++------------
3 files changed, 67 insertions(+), 31 deletions(-)
diff --git a/pages.json b/pages.json
index b4a59d6..2bb715f 100644
--- a/pages.json
+++ b/pages.json
@@ -4,7 +4,7 @@
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
},
{
@@ -25,7 +25,7 @@
"path": "pages/creator/creatorDetail",
"style": {
"navigationBarTitleText": "",
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": false
}
},
{
diff --git a/pages/creator/creatorDetail.vue b/pages/creator/creatorDetail.vue
index d569716..fb46376 100644
--- a/pages/creator/creatorDetail.vue
+++ b/pages/creator/creatorDetail.vue
@@ -38,10 +38,18 @@
-
-
-
+
+
+
+
+
+
+
+
+
@@ -70,10 +78,12 @@
uni.getStorage({
key: 'creatorDetail',
success: res => {
- console.log('getStorage', res)
this.creatorInfo = res.data
- this.current = res.data.typeImgList[0].typeId
- this.arrList = res.data.typeImgList[0].typeName
+ console.log('getStorage', this.creatorInfo)
+ this.creatorInfo.typeImgList.forEach(item => {
+ this.arrList.push(item.typeName)
+ })
+ console.log('arrList', this.arrList)
}
})
},
@@ -82,7 +92,7 @@
console.log(res)
}
return {
- title: '来看看艺术家['+this.creatorInfo.scanCode+']精心准备的图片吧~',
+ title: `来看看艺术家${this.creatorInfo.scanCode}精心准备的图片吧~`,
path: `/pages/creator/imgDetail?id=${this.creatorInfo.id}`
}
uni.showToast({
@@ -91,12 +101,19 @@
})
},
methods: {
+ // 标签栏点击
onClickItem(e) {
console.log('点击', e)
+ this.current = e.currentIndex
+ },
+ // 内容滑动
+ changeItem(e) {
+ console.log('点击', e.detail)
+ this.current = e.detail.current
},
// 前往详情页
targetDetail(item) {
- console.log('item',item)
+ console.log('item', item)
if (item.id) {
uni.setStorage({
key: 'detailId',
@@ -148,6 +165,10 @@
width: 40rpx;
height: 40rpx;
}
+
+ button::after {
+ border: none;
+ }
}
}
@@ -197,6 +218,7 @@
align-items: center;
flex-wrap: wrap;
padding-bottom: 20px;
+
image {
margin-top: 40rpx;
margin-left: 40rpx;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 81c992b..8eea613 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,24 +1,27 @@
-
-
-
-
-
- 热门艺术家
-
-
-
- {{item.scanCode}}
+
+
+
+
+
+
+ 热门艺术家
+
+
+
+ {{item.scanCode}}
+
+
+ 近期精选
+
+
-
- 近期精选
-
-
+
@@ -28,13 +31,23 @@
creatorImgsDetails,
loginTiktok
} from '@/api/index.js'
+ import Choiceness from './choiceness.vue'
export default {
data() {
return {
hotCreatorList: [],
- isTarget: true
+ isTarget: true,
+ showChoiceness:false
}
},
+ components:{
+ Choiceness,
+ },
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.showChoiceness = false
+ uni.stopPullDownRefresh()
+ },
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
@@ -49,9 +62,10 @@
// 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
if (e.scrollTop > 160) {
- uni.redirectTo({
- url: '../index/choiceness'
- })
+ this.showChoiceness = true
+ // uni.redirectTo({
+ // url: '../index/choiceness'
+ // })
}
},
methods: {