链接混淆字符串改为动态加载
This commit is contained in:
parent
6920aecf15
commit
1f462b98d2
@ -74,6 +74,10 @@ export default {
|
||||
return store.getters.preDownloadVideo
|
||||
})
|
||||
|
||||
let maskDomain = computed(() => {
|
||||
return store.getters.maskDomain
|
||||
})
|
||||
|
||||
const loadComplete = computed(() => {
|
||||
return store.getters.loadComplete
|
||||
})
|
||||
@ -147,19 +151,10 @@ export default {
|
||||
}
|
||||
|
||||
function coverLink(rawLink){
|
||||
let tempLink = ""
|
||||
if(rawLink.includes("hentai")) {
|
||||
if (rawLink.includes("exhentai.org"))
|
||||
tempLink = rawLink.replace("exhentai.org", "element-plus.org")
|
||||
else if (rawLink.includes("e-hentai.org"))
|
||||
tempLink = rawLink.replace("e-hentai.org", "element.org")
|
||||
}
|
||||
else if(rawLink.includes("xvideos.com") || rawLink.includes("pornhub.com")){
|
||||
tempLink = rawLink.replace("xvideos.com", "xiaomi.com").
|
||||
replace("cn.pornhub.com", "pixiv.com").
|
||||
replace("pornhub.com", "pixiv.com")
|
||||
}
|
||||
return tempLink;
|
||||
maskDomain.value.forEach((mask) => {
|
||||
rawLink = rawLink.replace(mask['raw'], mask['mask'])
|
||||
})
|
||||
return rawLink;
|
||||
}
|
||||
|
||||
function validateLink(rawLink){
|
||||
|
||||
@ -120,6 +120,7 @@ const actions = {
|
||||
context.commit("_authed", AuthCode, context)
|
||||
context.dispatch("updateGalleryTasks").then()
|
||||
context.dispatch("updateVideoTasks").then()
|
||||
context.dispatch("loadMaskDomain").then()
|
||||
setInterval(() => {
|
||||
context.dispatch("update").then()
|
||||
}, 30000)
|
||||
@ -135,6 +136,13 @@ const actions = {
|
||||
else
|
||||
context.dispatch("updateGalleryTasks").then()
|
||||
},
|
||||
loadMaskDomain(context){
|
||||
axios.get(BaseUrl + "maskDomain").then((res) => {
|
||||
if(res.data.result === "success"){
|
||||
context.commit("_setMaskDomain", JSON.parse(res.data.data))
|
||||
}
|
||||
})
|
||||
},
|
||||
searchByLink(context, link){
|
||||
context.commit("_searchByLink", link)
|
||||
},
|
||||
@ -304,6 +312,9 @@ const mutations = {
|
||||
_setShowType(state, showType){
|
||||
state.showType = showType
|
||||
},
|
||||
_setMaskDomain(state, maskDomain){
|
||||
state.maskDomain = maskDomain
|
||||
},
|
||||
_openHistoryPanel(state){
|
||||
state.showHistory = true
|
||||
},
|
||||
@ -329,7 +340,9 @@ const state = {
|
||||
isInclude:false, //是否搜索到任务
|
||||
searchTask:[], //搜索到的任务
|
||||
showHistory:'', //是否打开面板
|
||||
showType:"gallery"
|
||||
showType:"gallery",
|
||||
|
||||
maskDomain:[]
|
||||
}
|
||||
|
||||
const getters = {
|
||||
@ -390,6 +403,9 @@ const getters = {
|
||||
},
|
||||
showType(state){
|
||||
return state.showType
|
||||
},
|
||||
maskDomain(state){
|
||||
return state.maskDomain
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user