diff --git a/src/components/Side.vue b/src/components/Side.vue index bb78b5b..c46ff2c 100644 --- a/src/components/Side.vue +++ b/src/components/Side.vue @@ -196,11 +196,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/") + 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 811d43a..47e47eb 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)