...
|
...
|
@@ -269,19 +269,19 @@ tpl; |
|
|
$findCategory = $portalCategoryModel->where('id', $id)->find();
|
|
|
|
|
|
if (empty($findCategory)) {
|
|
|
$this->error('分类不存在!');
|
|
|
//$this->error('分类不存在!');
|
|
|
}
|
|
|
|
|
|
$categoryChildrenCount = $portalCategoryModel->where('parent_id', $id)->count();
|
|
|
|
|
|
if ($categoryChildrenCount > 0) {
|
|
|
$this->error('此分类有子类无法删除!');
|
|
|
// $this->error('此分类有子类无法删除!');
|
|
|
}
|
|
|
|
|
|
$categoryPostCount = Db::name('portal_category_post')->where('category_id', $id)->count();
|
|
|
|
|
|
if ($categoryPostCount > 0) {
|
|
|
$this->error('此分类有文章无法删除!');
|
|
|
// $this->error('此分类有文章无法删除!');
|
|
|
}
|
|
|
|
|
|
$data = [
|
...
|
...
|
|