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,