diff --git a/app/admin/controller/LabelController.php b/app/admin/controller/LabelController.php index 6400cd2..40b232a 100644 --- a/app/admin/controller/LabelController.php +++ b/app/admin/controller/LabelController.php @@ -66,6 +66,7 @@ class LabelController extends AdminBaseController{ $id = $_POST['id']; $del = Db::name('classification') -> delete($id); + Db::name('goods') -> where("type = 1 and classify_id = ".$id) -> delete(); if($del){ return true; }else{ diff --git a/public/themes/admin_simpleboot3/admin/label/classify_list.html b/public/themes/admin_simpleboot3/admin/label/classify_list.html index 3c9fd90..e6fee12 100644 --- a/public/themes/admin_simpleboot3/admin/label/classify_list.html +++ b/public/themes/admin_simpleboot3/admin/label/classify_list.html @@ -35,7 +35,7 @@ <script> //删除 function del(id){ - ccc = window.confirm('是否删除这条分类?'); + ccc = window.confirm('这条分类下的所有商品也会删除,是否删除这条分类?'); if(ccc){ $.post("{:url('Label/classify_del')}",{id:id},function(data){ if(data){