From 295214e39a7747093ba449fc9fe6da6f8462e951 Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Thu, 22 Sep 2022 21:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=9F=9F=E5=90=8D(=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Side.vue | 4 ++-- src/store/index.js | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/components/Side.vue b/src/components/Side.vue index 0e6035c..2de943b 100644 --- a/src/components/Side.vue +++ b/src/components/Side.vue @@ -200,11 +200,11 @@ export default { } function onlineGalleryReader(name){ - window.open("http://100.42.234.138:8080/1/gallery/" + encodeURI(name)) + window.open("http://zfile.lionwebsite.xyz/1/gallery/" + encodeURI(name)) } function onlineVideoViewer(name){ - window.open("http://100.42.234.138:8080/1/video/" + encodeURI(name + ".mp4")) + window.open("http://zfile.lionwebsite.xyz/1/video/" + encodeURI(name + ".mp4")) } function changeShowType(){ diff --git a/src/store/index.js b/src/store/index.js index bee78fa..da729f5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2,7 +2,7 @@ import vuex from "vuex" import axios from "axios" import {ElMessage} from "element-plus" import qs from "qs" -const BaseUrl = "http://100.42.234.138:8888/" +const BaseUrl = "http://downloader.lionwebsite.xyz/" const GalleryTaskHandlerUrl = BaseUrl + "GalleryTaskHandler/" const VideoTaskHandlerUrl = BaseUrl + "VideoTaskHandler/" @@ -190,7 +190,7 @@ const mutations = { state.totalVideoTask.splice(0) }, _updateGalleryTasks(state, tasks){ - const download_url = GalleryTaskHandlerUrl + "file?link=" + const downloadUrl = GalleryTaskHandlerUrl + "file?link=" tasks.forEach((task) => { if(task.status === "已提交"){ task.progress = "已提交" @@ -200,7 +200,14 @@ const mutations = { } else if(task.status === "下载完成"){ task.progress = "下载完成" - task.download = download_url + task.link + "&AuthCode=" + state.AuthCode + let tempLink + let url = new URL(task.link) + + state.maskDomain.forEach((mask) => { + if(url.host === mask['raw']) + tempLink = task.link.replace(mask['raw'], mask['mask']) + }) + task.download = downloadUrl + tempLink + "&AuthCode=" + state.AuthCode } state.totalGalleryTask.push(task) }) @@ -215,12 +222,12 @@ const mutations = { task.progress = task.status if(task.status === "下载完成"){ let tempLink - if(task.link.includes("xvideos.com")) - tempLink = task.link.replace("xvideos", "xiaomi") - else if(task.link.includes("cn.pornhub")) - tempLink = task.link.replace("cn.pornhub", "pixiv") - else - tempLink = task.link.replace("pornhub", "pixiv") + let url = new URL(task.link) + + state.maskDomain.forEach((mask) => { + if(url.host === mask['raw']) + tempLink = task.link.replace(mask['raw'], mask['mask']) + }) task.download = downloadUrl + tempLink + "&AuthCode=" + state.AuthCode } state.totalVideoTask.push(task)