From 6652c6574f9b39377cfbe45acc2929603e23bd71 Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Thu, 29 Jun 2023 18:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=8F=96=E9=87=8C=E7=AB=99=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E4=B8=BA=E5=8D=95=E7=8B=AC=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E7=BF=BB=E9=A1=B5=E6=97=B6=E5=9B=9E=E5=88=B0=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=EF=BC=88=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DashBoard.vue | 78 +------------------ src/components/HentaiSearch.vue | 134 ++++++++++++++++++++++++++++++++ src/components/OnlineReader.vue | 1 + 3 files changed, 139 insertions(+), 74 deletions(-) create mode 100644 src/components/HentaiSearch.vue diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue index 1cb07d1..3aafb4c 100644 --- a/src/components/DashBoard.vue +++ b/src/components/DashBoard.vue @@ -80,36 +80,7 @@ - - -
- 查询
-
- -
- -
- {{gallery.name}}
- 上传时间:{{gallery.uploadTime}}
- 页数:{{gallery.page}}
- 类型:{{gallery.type}}
- 链接
- 下载 -
-

-
-
- 首页 - 上一页 - 下一页 - 尾页 -
- + @@ -198,6 +169,7 @@ import store from "../store"; import {computed, ref, onMounted} from "vue"; import {ElMessage} from "element-plus" import axios from "axios"; +import HentaiSearch from "./HentaiSearch.vue"; //授权码相关 let AuthCode = ref("") @@ -211,8 +183,6 @@ let isViewingTag = ref(false) let isConfig = ref(false) let isDark = ref(false) let keyword = ref("furry yaoi") -let galleries = ref([]) -let queryPage = ref({}) let darkConfig = ref({}) let lengthPerPage = ref(0) @@ -415,35 +385,8 @@ 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(" ", "+") - document.getElementById("loading").style.display = "inline-block"; - - axios.get("http://downloader.lionwebsite.xyz/query?keyword=" + tempParam) - .then((res) => { - document.getElementById("loading").style.display = "none"; - if (res.data.result === "success") { - 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) - }) - }else { - ElMessage({message: res.data.data, type: "error"}) - } - }) +function closeQueryPanel(){ + isQuerying.value = false } //删除任务 @@ -627,17 +570,4 @@ function saveConfig(){ padding-left: 0; padding-right: 0; } - #loading { - width: 25px; - height: 25px; - border: 2px solid #ccc; - border-top-color: #3498db; - border-radius: 50%; - animation: spin 1s linear infinite; - display: none; - } - - @keyframes spin { - to { transform: rotate(360deg); } - } \ No newline at end of file diff --git a/src/components/HentaiSearch.vue b/src/components/HentaiSearch.vue new file mode 100644 index 0000000..cce53b6 --- /dev/null +++ b/src/components/HentaiSearch.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/src/components/OnlineReader.vue b/src/components/OnlineReader.vue index 4ee543c..5d9edb6 100644 --- a/src/components/OnlineReader.vue +++ b/src/components/OnlineReader.vue @@ -35,6 +35,7 @@ function jump(targetIndex){ links.value = props.currentLinks.slice(targetIndex * lengthPerPage.value, (targetIndex + 1) * lengthPerPage.value) index.value = targetIndex temp_index.value = targetIndex + 1 + onlineReadingScrollbar.value.setScrollTop(0) } function closeDialog(){