From 44351cefb5f7b18ada2761f905ba7d389abdb82b Mon Sep 17 00:00:00 2001 From: knowpia <9812993@qq.com> Date: Wed, 14 Sep 2022 15:42:14 +0800 Subject: [PATCH] fix bug --- app/controller/About.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controller/About.php b/app/controller/About.php index e3c08c8..47235b8 100644 --- a/app/controller/About.php +++ b/app/controller/About.php @@ -21,4 +21,12 @@ class About } return show("获取成功", SUCCESS_CODE, ["content" => $info["value"]]); } + public function act_rule() + { + $info = Db::name("config")->where("name", "act_rule")->find(); + if (empty($info) || empty($info['value'])) { + return show("活动规则未设置"); + } + return show("获取成功", SUCCESS_CODE, ["content" => $info["value"]]); + } } \ No newline at end of file