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: 分类列表