From 4636de7dcbd3bd4eba7597536b9bdebb1c33900c Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期一, 11 八月 2025 14:19:14 +0800 Subject: [PATCH] 收藏页面调整 --- pages/video/myCollect.vue | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/pages/mine/myCollect/myCollect.vue b/pages/video/myCollect.vue similarity index 93% rename from pages/mine/myCollect/myCollect.vue rename to pages/video/myCollect.vue index 55bf028..40ed744 100644 --- a/pages/mine/myCollect/myCollect.vue +++ b/pages/video/myCollect.vue @@ -10,7 +10,7 @@ <!-- 瑙嗛鏀惰棌鍒楄〃 --> <view v-if="currentTab === 0" class="list-container"> - <scroll-view scroll-y class="scroll-view" @scrolltolower="loadMore" :lower-threshold="100"> + <scroll-view scroll-y :lower-threshold="100" class="scroll-view-container" @scrolltolower="loadMore" > <view v-if="videoCollects.length > 0"> <view v-for="(item, idx) in videoCollects" :key="item.id" class="collect-item"> <!-- 瑙嗛灏侀潰 --> @@ -24,10 +24,6 @@ :controls="false" :show-center-play-btn="false" object-fit="cover"></video> - <!-- <image :src="getVideoCover()" mode="aspectFill" class="cover-image" /> --> - <!-- <view v-if="item.duration" class="duration"> - {{ formatDuration(item.duration) }} - </view> --> </view> <!-- 瑙嗛淇℃伅 --> @@ -55,7 +51,7 @@ </view> </view> <view v-else class="empty-tip"> - <image src="/static/empty.png" mode="aspectFit" /> + <text>鏆傛棤鏀惰棌瑙嗛</text> </view> <view class="load-more"> @@ -70,7 +66,7 @@ <!-- 鍟嗗搧鏀惰棌鍒楄〃 --> <view v-if="currentTab === 1" class="list-container"> - <scroll-view scroll-y class="scroll-view" @scrolltolower="loadMore" :lower-threshold="100"> + <scroll-view scroll-y class="scroll-view-container" @scrolltolower="loadMore" :lower-threshold="100"> <view v-if="goodsCollects.length > 0"> <view v-for="(item, idx) in goodsCollects" :key="item.id" class="collect-item"> <!-- 鍟嗗搧灏侀潰 --> @@ -103,7 +99,6 @@ </view> </view> <view v-else class="empty-tip"> - <image src="/static/empty.png" mode="aspectFit" /> <text>鏆傛棤鏀惰棌鍟嗗搧</text> </view> <view class="load-more"> @@ -118,7 +113,7 @@ <!-- 娲诲姩鏀惰棌鍒楄〃 --> <view v-if="currentTab === 2" class="list-container"> - <scroll-view scroll-y class="scroll-view" @scrolltolower="loadMore" :lower-threshold="100"> + <scroll-view scroll-y class="scroll-view-container" @scrolltolower="loadMore" :lower-threshold="100"> <view v-if="activityCollects.length > 0"> <view v-for="(item, idx) in activityCollects" :key="item.id" class="collect-item"> <!-- 娲诲姩灏侀潰 --> @@ -155,7 +150,6 @@ </view> </view> <view v-else class="empty-tip"> - <image src="/static/empty.png" mode="aspectFit" /> <text>鏆傛棤鏀惰棌娲诲姩</text> </view> <view class="load-more"> @@ -171,13 +165,15 @@ </template> <script> - import { + import { onMounted } from "vue" +import { getMyCollectList, changeCollect } from '@/api/collect.js' import storage from '@/utils/storage' export default { + name:'myCollect', data() { return { currentTab: 0, @@ -201,9 +197,9 @@ return this.loading ? 'loading' : this.noMore ? 'nomore' : 'loadmore' } }, - onLoad() { - this.query.authorId = storage.getUserInfo().id - this.loadData() + mounted() { + this.query.authorId = storage.getUserInfo().id; + this.loadData(); }, onPullDownRefresh() { this.query.pageNumber = 1 @@ -342,7 +338,6 @@ .page-container { padding: 20rpx; background-color: #f5f5f5; - min-height: 100vh; } .tab-nav { @@ -384,12 +379,18 @@ border-radius: 12rpx; padding: 20rpx; box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); - - .scroll-view { - height: calc(100vh - 200rpx); - } + height: 70vh; + } - + /* 鍐呭鍖哄煙浼樺寲 */ + .scroll-view-container { + width: 100%; + padding: 0 10rpx; + height: calc(100vh - 554rpx); + background-color: #fff; + overflow: hidden; + padding: 0 10rpx; + } .collect-item { display: flex; padding: 24rpx 0; -- Gitblit v1.8.0