From 4f448e44b0b40de0ac9a145ee47c271774a33d97 Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Sun, 31 Aug 2025 20:44:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BD=91=E7=BB=9C=E5=85=AC=E5=BC=80?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=BA=90=E6=94=AF=E6=8C=81=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E6=88=96=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/run.py | 11 +++++++---- app/templates/index.html | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/app/run.py b/app/run.py index c1fa4c8..2518a21 100644 --- a/app/run.py +++ b/app/run.py @@ -235,14 +235,17 @@ def get_task_suggestions(): return jsonify({"success": False, "message": "未登录"}) query = request.args.get("q", "").lower() deep = request.args.get("d", "").lower() + net_data = config_data.get("source", {}).get("net", {}) cs_data = config_data.get("source", {}).get("cloudsaver", {}) ps_data = config_data.get("source", {}).get("pansou", {}) def net_search(): - base_url = base64.b64decode("aHR0cHM6Ly9zLjkxNzc4OC54eXo=").decode() - url = f"{base_url}/task_suggestions?q={query}&d={deep}" - response = requests.get(url) - return response.json() + if net_data.get("enable").lower() != "false": + base_url = base64.b64decode("aHR0cHM6Ly9zLjkxNzc4OC54eXo=").decode() + url = f"{base_url}/task_suggestions?q={query}&d={deep}" + response = requests.get(url) + return response.json() + return [] def cs_search(): if ( diff --git a/app/templates/index.html b/app/templates/index.html index a735fcd..498a555 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -196,6 +196,18 @@ +
+
+

网络公开

+
+
+
+ +
+ +
+
+

CloudSaver

@@ -555,6 +567,9 @@ tasklist: [], magic_regex: {}, source: { + net: { + enable: "" + }, cloudsaver: { server: "", username: "", @@ -702,6 +717,11 @@ server: "" }; } + if (!config_data.source.net) { + config_data.source.net = { + enable: "" + }; + } this.formData = config_data; setTimeout(() => { this.configModified = false;