From 0f68bfb937d8f1d14e76f529aa9571244dfe3e5b Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 28 Mar 2025 17:42:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0api=5Fkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Open.php | 3 +++ public/install/data.sql | 1 + 2 files changed, 4 insertions(+) diff --git a/app/api/controller/Open.php b/app/api/controller/Open.php index 02d2d4c..af52ef3 100644 --- a/app/api/controller/Open.php +++ b/app/api/controller/Open.php @@ -14,6 +14,9 @@ class Open extends QfShop */ public function transfer() { + if(Config('qfshop.api_key') != input('api_key')){ + return jerr('api_key错误'); + } $urlData = [ 'expired_type' => input('expired_type')??1, // 1正式资源 2临时资源 'url' => input("url")?? '', diff --git a/public/install/data.sql b/public/install/data.sql index ca23435..7f99b9a 100644 --- a/public/install/data.sql +++ b/public/install/data.sql @@ -168,6 +168,7 @@ INSERT INTO `qf_conf` VALUES ('62', 'uc_file_time', '', 'UC临时资源目录', INSERT INTO `qf_conf` VALUES ('63', 'xunlei_cookie', '', '迅雷Cookie', '', '0', '0', NULL, '4', '1', '59', '1', '1743149794', '1743149794'); INSERT INTO `qf_conf` VALUES ('64', 'xunlei_file', '', '迅雷默认转存目录', '', '0', '0', NULL, '4', '1', '58', '1', '1743149819', '1743149819'); INSERT INTO `qf_conf` VALUES ('65', 'xunlei_file_time', '', '迅雷临时资源目录', '', '0', '0', NULL, '4', '1', '57', '1', '1743149860', '1743149860'); +INSERT INTO `qf_conf` VALUES ('66', 'api_key', '', '接口api_key', '个别接口需要此参数方可调用', '0', '0', NULL, '1', '1', '0', '1', '1743154753', '1743154753');