From 9a01d3904e72dec72a4a54589389bd8284b1df8b Mon Sep 17 00:00:00 2001 From: szdot Date: Wed, 25 Jun 2025 03:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9A=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91=EF=BC=9A?= =?UTF-8?q?=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B=E3=80=91=EF=BC=9A=20?= =?UTF-8?q?=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/AdminController.class.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/FlyCube/MpApi/Controller/AdminController.class.php b/FlyCube/MpApi/Controller/AdminController.class.php index a2fa2ed..b331bf8 100644 --- a/FlyCube/MpApi/Controller/AdminController.class.php +++ b/FlyCube/MpApi/Controller/AdminController.class.php @@ -427,6 +427,30 @@ class AdminController extends PublicController ]); } + /** + * @description 删除公告 + */ + public function deleteMessage() + { + + // 权限判断 + if ($this->tokenShop_id != C('powerId')) { + $where['shop_id'] = $this->tokenShop_id; + } + + if ($_REQUEST['delIdArr']) { + $where['id'] = array("in", $_REQUEST['delIdArr']); + + $messageDb = D('message'); // 表名为 message + if ($messageDb->where($where)->delete()) { + echo json_encode(array('status' => 1, 'msg' => '删除成功')); + } else { + echo json_encode(array('status' => 0, 'msg' => '删除失败')); + } + } else { + echo json_encode(array('status' => 0, 'msg' => '参数有误')); + } + } /** * @description: 分类列表