From 502cb1663516cace1ed447e3873d7c3f8f7c6b8c Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Wed, 7 Dec 2022 11:18:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E7=BC=A9=E7=95=A5=E5=9B=BE?= =?UTF-8?q?=E9=A2=84=E8=A7=88(=E7=82=B9=E5=87=BB=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=88=87=E6=8D=A2=E4=BB=A5=E5=8F=8A=E6=94=BE?= =?UTF-8?q?=E5=A4=A7)=E3=80=82=EF=BC=88=E5=90=8C=E6=AD=A5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DashBoard.vue | 25 ++++++++++++++----------- src/components/Side.vue | 14 +++++++++++--- src/store/index.js | 5 +++++ 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue index cad588e..d8a119c 100644 --- a/src/components/DashBoard.vue +++ b/src/components/DashBoard.vue @@ -16,7 +16,14 @@
打开面板
- 新增特性 +
+ + {{thumbnailGallery.shortName}} +
+ + + +
@@ -56,15 +63,7 @@ 下载 删除 - - - 1.查询远程任务的意思是前端直接提交链接给服务器,查询这个链接所对应的任务状态,平常创建任务点这个。而查找当前页任务是指将右边的页面跳转到包含这个任务的页面里
- 2.查找所有任务跟查询远程任务类似,把关键字提交给服务器查询,但是只会对应一个任务。(对应多个没写,一定不是因为我懒)。第二个查找当前页任务则是在前端查询到的任务里筛选包含这个关键字的任务
- 3.左下新增切换排列顺序的功能,可以选择按名称/任务创建时间排序(只有正序,倒序懒得写了)

- 本来可以不用这么麻烦的,但是之前一直都是把所有任务加载到前端,浪费带宽,所以现在选择部分加载了,按照任务创建时间排序选择最新的40条任务,在这之前的任务可以通过查询远程任务/查找所有任务来访问到,或者直接去zfile页面找
- 然后移动端我是真的不会适配,现在这样已经尽力了,如果觉得不好用的话还是尽量从电脑下载吧 -
-
+
@@ -108,6 +107,10 @@ export default { return store.state.weekUsed }) + let thumbnailGallery = computed(() => { + return store.state.thumbnailGallery + }) + function queryWeekUsedAmount(){ store.dispatch("loadWeekUsedAmount") } @@ -225,7 +228,7 @@ export default { return {postTask, queryTask, validate, searchByLink, searchLocalByKeyword, searchRemoteByKeyword, openPanel, onlineGalleryReader, queryWeekUsedAmount, deleteVideo, deleteGallery, - link, loadComplete, AuthCode, keyword, isRemember, chosenGallery, chosenVideo, targetResolution, weekUsed, showTips, + link, loadComplete, AuthCode, keyword, isRemember, chosenGallery, chosenVideo, targetResolution, weekUsed, showTips, thumbnailGallery, store } } diff --git a/src/components/Side.vue b/src/components/Side.vue index d259fac..67c637a 100644 --- a/src/components/Side.vue +++ b/src/components/Side.vue @@ -16,12 +16,15 @@ 下载 删除 在线看 + 预览封面 - + @@ -245,10 +248,15 @@ export default { window.open("http://zfile.lionwebsite.xyz/1/video/") } + function showThumbnail(gallery){ + store.commit("_changeThumbnailGallery", gallery) + setTimeout(() => {document.querySelector(".preview > img").click()}, 1) + } + return {galleryTasks, videoTasks, min, max, targetPage, loadComplete, page, isEditing, inputNode, isShowVideoHistory, isShowGalleryHistory, showType, showNameType, sortType, isOpenHistoryPanel, reverseEditMode, changePage, changeShowType, changeShowNameType, changeSortType, toMax, toMin, previous, next, downloadTask, deleteGallery, - deleteVideo, onlineGalleryReader, onlineVideoViewer, closeHistoryPanel, + deleteVideo, onlineGalleryReader, onlineVideoViewer, closeHistoryPanel, showThumbnail, store } } diff --git a/src/store/index.js b/src/store/index.js index 85ba143..8fd91e7 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -440,12 +440,17 @@ const mutations = { }, _closeHistoryPanel(state){ state.isShowHistory = false + }, + _changeThumbnailGallery(state, gallery){ + state.thumbnailGallery = gallery + state.thumbnailGallery.url = GalleryManageUrl + "thumbnail/" + encodeURIComponent(gallery.name) + ".webp?AuthCode="+state.AuthCode } } const state = { totalGalleryTask:[], //存放本子数据的数组 chosenGallery:false, //准备下载的本子 + thumbnailGallery:{}, //预览本子 totalVideoTask:[], //存放视频数据的数组 chosenVideo:false, //准备下载的视频