From c34bf753f658469ee33c0aa8db2265643fa99693 Mon Sep 17 00:00:00 2001 From: 1099438829 <1099438829@qq.com> Date: Fri, 2 Apr 2021 15:11:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Category.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/admin/controller/Category.php b/app/admin/controller/Category.php index 2022e10..cd04a64 100644 --- a/app/admin/controller/Category.php +++ b/app/admin/controller/Category.php @@ -152,4 +152,22 @@ class Category extends AuthController $this->assign("template_list",$themeList); return $this->fetch(); } + + /** + * 删除分类 + * @param Request $request + * @return mixed|void + * @author 李玉坤 + * @date 2021-04-01 21:56 + */ + public function del(Request $request) + { + $where = Util::postMore([ + ['id',''], + ]); + $model = new aModel(); + $model->where('id',$where['id'])->delete(); + $res = DocumentCategoryContent::where('id',$where['id'])->delete(); + return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); + } } \ No newline at end of file