From 408d93a7fed0403381400ce2fc028819bb203eec Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期一, 21 七月 2025 09:51:42 +0800 Subject: [PATCH] 解决主包过大问题 --- pages/video/home-page.vue | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/pages/video/home-page.vue b/pages/video/home-page.vue index b9a7b49..340c171 100644 --- a/pages/video/home-page.vue +++ b/pages/video/home-page.vue @@ -167,7 +167,7 @@ </template> <script> -import DropdownMenu from '@/components/dropdown-menu.vue' +import DropdownMenu from '@/pages/video/dropdown-menu.vue' import {getAuthorInfo, getAuthorVideoPage, getAuthorCollectVideoPage, getAuthorLikeVideoPage} from '@/api/user.js' import {subscribe, unSubscribe, delVideo, updateVideo, userDownVideo} from '@/api/video.js' @@ -222,22 +222,25 @@ } }, onShow() { - this.getAuthorInfo(); - if (this.currentTab === 'works') { - this.videoQuery.pageNumber = 1 - this.nomoreVideo = false - this.getAuthorVideoPage(); - } else if (this.currentTab === 'collect') { - this.collectVideoQuery.pageNumber = 1 - this.nomoreCollectVideo = false - this.getAuthorCollectVideoPage() - } else if (this.currentTab === 'likes') { - this.likeVideoQuery.pageNumber = 1 - this.nomoreLikeVideo = false - this.getAuthorLikeVideoPage() + if (this.authorId) { + this.getAuthorInfo(); + if (this.currentTab === 'works') { + this.videoQuery.pageNumber = 1 + this.nomoreVideo = false + this.getAuthorVideoPage(); + } else if (this.currentTab === 'collect') { + this.collectVideoQuery.pageNumber = 1 + this.nomoreCollectVideo = false + this.getAuthorCollectVideoPage() + } else if (this.currentTab === 'likes') { + this.likeVideoQuery.pageNumber = 1 + this.nomoreLikeVideo = false + this.getAuthorLikeVideoPage() + } } }, onLoad(option) { + console.log("鏀跺埌鍙傛暟", option); this.authorId = option.authorId; this.getAuthorInfo(); this.getAuthorVideoPage(); -- Gitblit v1.8.0