diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue
index b8994af..018e188 100644
--- a/src/components/DashBoard.vue
+++ b/src/components/DashBoard.vue
@@ -47,12 +47,15 @@
+ style="width: 300px; height: 250px" fit="contain"/>
+
本子名字:{{chosenGallery.name}}
本子页数:{{chosenGallery.pages}}
@@ -67,9 +70,16 @@
+ 下载模式:
+
+
+
+
+
+
标签:
- {{store.state.tags.get(tid).tag}}
-
+ {{store.state.tags.get(tid).tag}}
+
@@ -194,6 +204,7 @@ let param = ref("")
let paramForTags = ref([]) //tidS
let targetResolution = ref("")
+let targetDownloadMode = ref("")
let tag = ref("")
let tagKeyWord = ref("") //查询tag的关键字
@@ -278,10 +289,14 @@ function postTask(){
ElMessage("请选择分辨率再提交")
return
}
- let tempLink = coverLink(chosenGallery.value.link)
+ if(targetDownloadMode.value === ''){
+ ElMessage("请选择下载模式再提交")
+ return
+ }
store.dispatch("postGalleryTask",
- {link: tempLink,
+ {link: chosenGallery.value.link,
targetResolution: targetResolution.value,
+ mode: targetDownloadMode.value,
tags:paramForTags.value})
targetResolution.value = ""
}
@@ -292,8 +307,9 @@ function queryRemoteTask(){
ElMessage("链接错误")
return
}
- let tempLink = coverLink(param.value)
- store.dispatch("queryGalleryTask", tempLink)
+ if(param.value.includes("e-hentai"))
+ param.value = param.value.replace("e-hentai", "exhentai")
+ store.dispatch("queryGalleryTask", param.value)
}
function queryLocalTask(){
switch (type.value){
@@ -417,9 +433,6 @@ function validateLink(rawLink){
else
return false
}
-function coverLink(rawLink){
- return rawLink.replace("exhentai.org", "element-plus.org").replace("e-hentai.org", "element.org");
-}
//在线阅读以及展示缩略图
function onlineGalleryReader(gid){
diff --git a/src/components/HentaiSearch.vue b/src/components/HentaiSearch.vue
index 30b849f..fc14aef 100644
--- a/src/components/HentaiSearch.vue
+++ b/src/components/HentaiSearch.vue
@@ -56,8 +56,7 @@ function queryRemoteTask(){
ElMessage("链接错误")
return
}
- let tempLink = coverLink(param.value)
- store.dispatch("queryGalleryTask", tempLink)
+ store.dispatch("queryGalleryTask", param.value)
}
function validateLink(rawLink){
@@ -69,10 +68,6 @@ function validateLink(rawLink){
return false
}
-function coverLink(rawLink){
- return rawLink.replace("exhentai.org", "element-plus.org").replace("e-hentai.org", "element.org");
-}
-
function close(){
emit("close")
}
@@ -85,8 +80,8 @@ function close(){
-
页数:{{gallery.page}}
类型:{{gallery.type}}
链接
- 下载
+ 查看
diff --git a/src/components/Side.vue b/src/components/Side.vue
index 65cf957..ed3e0c7 100644
--- a/src/components/Side.vue
+++ b/src/components/Side.vue
@@ -23,10 +23,10 @@
downloader:{{props.row.downloader}}
- 删除
+ 删除
编辑标签
- 更新
- 分享
+ 更新
+ 分享
@@ -39,9 +39,9 @@
- 下载
+ 下载
{{scoped.row.isCollect ? '取消收藏' : '收藏'}}
- 在线看
+ 在线看
diff --git a/src/store/index.js b/src/store/index.js
index 1df6713..b93815e 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -37,9 +37,7 @@ const actions = {
postGalleryTask(context, data){
axios.post(GalleryManageUrl + '?' + qs.stringify({
AuthCode: state.AuthCode,
- link: data.link,
- targetResolution: data.targetResolution,
- tags: data.tags
+ ...data
}, {indices:false})).then((res) => {
if(res.data.result === "success") {
ElMessage("提交成功")
@@ -293,12 +291,15 @@ const mutations = {
break;
case "下载完成":
task.progress = "下载完成"
- task.download = GalleryManageUrl + "/file/" + encodeURI(task.name) + ".zip?AuthCode=" + state.AuthCode + "&gid=" + task.gid
- let links = []
- for(let i=1; i<=task.pages; i++)
- links.push(GalleryManageUrl + "/onlineImage/" + i + "?gid=" + task.gid);
+ if(task.mode === 1 || task.mode === 3)
+ task.download = GalleryManageUrl + "/file/" + encodeURI(task.name) + ".zip?AuthCode=" + state.AuthCode + "&gid=" + task.gid
- task.images = links
+ if(task.mode === 2 || task.mode === 3) {
+ let links = []
+ for (let i = 1; i <= task.pages; i++)
+ links.push(GalleryManageUrl + "/onlineImage/" + i + "?gid=" + task.gid);
+ task.images = links
+ }
break;
case "压缩中":
task.progress = "压缩中"
@@ -559,8 +560,14 @@ const mutations = {
state.length = state.defaultLength
},
_changeThumbnailGallery(state, gallery){
- state.thumbnailGallery = gallery
- state.thumbnailGallery.url = GalleryManageUrl + "/onlineImage/1?gid="+gallery.gid
+ if(gallery.mode === 2 || gallery.mode === 3) {
+ state.thumbnailGallery = gallery
+ state.thumbnailGallery.url = GalleryManageUrl + "/onlineImage/1?gid=" + gallery.gid
+ } else if(gallery.thumb_link !== undefined){
+ state.thumbnailGallery = gallery
+ state.thumbnailGallery.url = GalleryManageUrl + "/ehThumbnail?path=" + gallery.thumb_link
+ state.thumbnailGallery.images = [GalleryManageUrl + "/ehThumbnail?path=" + gallery.thumb_link,]
+ }
}
}