From 933884e6ca44a3f586c73c85acb238986a7400d2 Mon Sep 17 00:00:00 2001 From: Ftbom Date: Fri, 7 Nov 2025 18:46:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=BC=AB=E7=94=BB=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=AF=8F=E6=97=A5=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ehentai.js | 3 ++- index.json | 4 ++-- zaimanhua.js | 36 ++++++++++++++++++++++++++++++++++-- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/ehentai.js b/ehentai.js index 9ceec99..0260fd6 100644 --- a/ehentai.js +++ b/ehentai.js @@ -7,7 +7,7 @@ class Ehentai extends ComicSource { // unique id of the source key = "ehentai" - version = "1.1.6" + version = "1.1.7" minAppVersion = "1.5.3" @@ -554,6 +554,7 @@ class Ehentai extends ComicSource { favorites = { // whether support multi folders multiFolder: true, + singleFolderForSingleComic: true, /** * add or delete favorite. * throw `Login expired` to indicate login expired, App will automatically re-login and re-add/delete favorite diff --git a/index.json b/index.json index 2ac2959..ca153c4 100644 --- a/index.json +++ b/index.json @@ -40,7 +40,7 @@ "name": "ehentai", "fileName": "ehentai.js", "key": "ehentai", - "version": "1.1.6" + "version": "1.1.7" }, { "name": "禁漫天堂", @@ -90,7 +90,7 @@ "name": "再漫画", "fileName": "zaimanhua.js", "key": "zaimanhua", - "version": "1.0.1" + "version": "1.0.2" }, { "name": "漫画柜", diff --git a/zaimanhua.js b/zaimanhua.js index c0c0508..cbab76c 100644 --- a/zaimanhua.js +++ b/zaimanhua.js @@ -2,7 +2,7 @@ class Zaimanhua extends ComicSource { // 基础信息 name = "再漫画"; key = "zaimanhua"; - version = "1.0.1"; + version = "1.0.2"; minAppVersion = "1.0.0"; url = "https://git.nyne.dev/nyne/venera-configs/raw/branch/main/zaimanhua.js"; @@ -16,8 +16,31 @@ class Zaimanhua extends ComicSource { } // 构建 URL buildUrl(path) { + this.signTask(); return `https://v4api.zaimanhua.com/app/v1/${path}`; } + // 每日签到 + async signTask() { + if (!this.isLogged) { + return; + } + if (!this.loadSetting("signTask")) { + return; + } + const lastSign = this.loadData("lastSign"); + const newTime = new Date().toISOString().split("T")[0]; + if (lastSign == newTime) { + return; + } + const res = await Network.post("https://i.zaimanhua.com/lpi/v1/task/sign_in", this.headers); + if (res.status !== 200) { + return; + } + this.saveData("lastSign", newTime); + if (JSON.parse(res.body)["errno"] == 0) { + UI.showMessage("签到成功"); + } + } //账户管理 account = { @@ -368,7 +391,8 @@ class Zaimanhua extends ComicSource { }, loadEp: async (comicId, epId) => { const res = await Network.get( - this.buildUrl(`comic/chapter/${comicId}/${epId}`) + this.buildUrl(`comic/chapter/${comicId}/${epId}`), + this.headers ); const data = JSON.parse(res.body).data.data; return { images: data.page_url_hd || data.page_url }; @@ -487,4 +511,12 @@ class Zaimanhua extends ComicSource { return "ok"; }, }; + + settings = { + signTask: { + title: "每日签到", + type: "switch", + default: false + } + }; }