From bb9b247abaa0a6b7244af58e17bc94a1efc851a0 Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Sat, 18 Mar 2023 12:59:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E9=87=8C=E7=AB=99=E6=90=9C?= =?UTF-8?q?=E7=B4=A2,=E4=BF=AE=E5=A4=8D=E6=8F=90=E4=BA=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=90=8E=E7=9C=8B=E4=B8=8D=E5=88=B0downloader?= =?UTF-8?q?=E7=9A=84bug=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=90=8E=E5=86=8D=E6=AC=A1=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E7=9B=B4=E6=8E=A5=E6=93=8D=E4=BD=9C=E7=9A=84?= =?UTF-8?q?bug=EF=BC=88=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0=EF=BC=89?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=E4=B8=8D=E8=83=BD=E9=93=BA=E6=BB=A1=E7=9A=84bug?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E6=8E=88=E6=9D=83=E7=A0=81=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DashBoard.vue | 91 +++++++++++++++++++++++++++++++----- src/components/Side.vue | 2 +- src/store/index.js | 2 + 3 files changed, 82 insertions(+), 13 deletions(-) diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue index 674cf60..9e78764 100644 --- a/src/components/DashBoard.vue +++ b/src/components/DashBoard.vue @@ -18,8 +18,9 @@ 当前页查询 -
+
打开面板 + 里站搜索

修改授权码 删除本地授权码
@@ -33,7 +34,7 @@ - + 本子名字:{{chosenGallery.name}}本子页数:{{chosenGallery.pages}} @@ -49,15 +50,45 @@
下载 - + 在线预览 查看封面图 删除 -
- + + +
+ 查询 +
+ +
+ +
+ {{gallery.name}}
+ 上传时间:{{gallery.uploadTime}}
+ 页数:{{gallery.page}}
+ 类型:{{gallery.type}}
+ 链接
+ 下载 +
+

+
+
+ 首页 + 上一页 + 下一页 + 尾页 +
+
+ + @@ -83,10 +114,11 @@
- - - 是否记住授权码
+
+ + 是否记住授权码
验证 +
@@ -94,6 +126,7 @@ import store from "../store"; import {computed, ref, onMounted} from "vue"; import {ElMessage} from "element-plus" +import axios from "axios"; //授权码相关 let AuthCode = ref("") @@ -102,6 +135,11 @@ let isAlterAuthCode = ref(false) let newAuthCode = ref("") let tempAuthCode = ref("") +let isQuerying = ref(false) +let keyword = ref("furry yaoi") +let galleries = ref([]) +let queryPage = ref({}) + //查询相关 let type = ref("link") let param = ref("") @@ -186,6 +224,30 @@ function resetLocalQuery(){ store.commit("_searchLocalByTag", ['']) param.value = "" } +function queryGalleries(link){ + let tempParam + if(link !== null) { + let url = new URL(link) + tempParam = url.search.replace("?f_search=", "") + }else{ + tempParam = keyword.value + } + tempParam = tempParam.replace(" ", "+") + + axios.get("http://downloader.lionwebsite.xyz/query?keyword=" + tempParam) + .then((res) => { + let tempGalleries = JSON.parse(res.data.data) + queryPage.value.first = 'first' in res.data? res.data.first: undefined + queryPage.value.previous = 'previous' in res.data? res.data.previous: undefined + queryPage.value.next = 'next' in res.data? res.data.next: undefined + queryPage.value.last = 'last' in res.data? res.data.last: undefined + + galleries.value.splice(0) + tempGalleries.forEach((gallery) => { + galleries.value.push(gallery) + }) + }) +} //删除任务 function deleteGallery(){ @@ -244,7 +306,7 @@ onMounted(() => { }) - \ No newline at end of file diff --git a/src/components/Side.vue b/src/components/Side.vue index c88be41..2066612 100644 --- a/src/components/Side.vue +++ b/src/components/Side.vue @@ -104,7 +104,7 @@
- + diff --git a/src/store/index.js b/src/store/index.js index 6ac7793..a019778 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -417,6 +417,8 @@ const mutations = { state.chosenGallery.fileSize = "等待下载完成后再查看" state.chosenGallery.createTimeDisplay = "等待下载完成后再查看" state.chosenGallery.progress = "已提交" + state.chosenGallery.tag = "" + state.chosenGallery.downloader = state.userId state.totalGalleryTask.push(state.chosenGallery) state.downloadGallery.push(state.chosenGallery) }