From 57ff0a36866c19a26b741614c5b2a51bfe5fc7fd Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Sun, 19 Feb 2023 22:35:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E4=BA=AB=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E9=94=99=E8=AF=AF=E3=80=82=E4=BF=AE=E5=A4=8D=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E9=A2=84=E8=A7=88=E6=8C=89=E9=92=AE=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=EF=BC=88=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=9B=B4=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 | 16 ++++++++++++---- src/components/Side.vue | 3 +-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue index 15a3ef7..de4c083 100644 --- a/src/components/DashBoard.vue +++ b/src/components/DashBoard.vue @@ -50,8 +50,9 @@ 下载 - 在线看 - 删除 + 在线预览 + 查看封面图 + 删除 @@ -256,14 +257,21 @@ function coverLink(rawLink){ function openPanel(){ store.commit("_openHistoryPanel") } -function onlineGalleryReader(name){ - window.open("http://zfile.lionwebsite.xyz/1/gallery/" + encodeURI(name)) +function onlineGalleryReader(gid){ + store.dispatch("queryOnlineLinks", gid) } function deleteAuthCode(){ localStorage.removeItem('auth') ElMessage("删除授权码完成") } + +//显示缩略图 +function showThumbnail(gallery){ + store.commit("_changeThumbnailGallery", gallery) + setTimeout(() => {document.querySelector(".preview > img").click()}, 1) +} + onMounted(() => { const auth = localStorage.getItem("auth") if(auth !== null){ diff --git a/src/components/Side.vue b/src/components/Side.vue index edce619..0223840 100644 --- a/src/components/Side.vue +++ b/src/components/Side.vue @@ -302,8 +302,7 @@ function shareGallery(data){ axios.post("http://downloader.lionwebsite.xyz/GalleryManage/share?userId=3&expireHour=3&gid=" + gid).then((res) => { if(res.data.result === "success"){ let data = JSON.parse(res.data.data) - link = 'http://lionwebsite.xyz/GetFile/{1}?ShareCode={2}'.replace("{1}", shortName).replace("{2}", data.shareCode) - console.log(data) + link = 'http://lionwebsite.xyz/GetFile/{0}?ShareCode={1}'.replace('{0}', encodeURIComponent(shortName)).replace('{1}', data.shareCode) ElMessage({dangerouslyUseHTMLString: true, message: "分享成功, 过期时间:" + data.expireTime + "
链接", duration: 0,