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 @@ @@ -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: {