From d3549ce3247d724319561ae81eb683766f9ebc05 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Mon, 7 Jul 2025 12:35:54 +0800 Subject: [PATCH] no message --- app/Services/TG/Hook/Mod/Article.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/app/Services/TG/Hook/Mod/Article.php b/app/Services/TG/Hook/Mod/Article.php index 8c38249..17ff140 100644 --- a/app/Services/TG/Hook/Mod/Article.php +++ b/app/Services/TG/Hook/Mod/Article.php @@ -128,20 +128,25 @@ class Article extends Base { } - public function JsonSet($aParam, $sType = "set") + public function Json($aParam) { $iId = $aParam["aOption"][1] ?? false; $sJson = $aParam["aArg"] ?? false; + if (empty($aParam["aOption"]) && empty($aParam["aArg"])) { + return "json__id? json | 有id为set,无id为add"; + } + + +// if (!$iId) { +// return "需要id"; +// } +// +// if (!$sJson) { +// return "需要json"; +// } + if (!$iId) { - return "需要id"; - } - - if (!$sJson) { - return "需要json"; - } - - if ($sType == "add") { $oArticle = new ModelArticle();