|
...
|
...
|
@@ -133,14 +133,11 @@ class NavLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function navDelete()
|
|
|
|
{
|
|
|
|
//判断当前菜单是否拥有下级
|
|
|
|
$info = $this->model->read(['pid'=>$this->param['id']]);
|
|
|
|
if($info !== false){
|
|
|
|
$this->fail('当前菜单存在下级,不允许删除');
|
|
|
|
}
|
|
|
|
$rs = $this->model->del($this->param);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('error');
|
|
|
|
$str = [];
|
|
|
|
//排序掉当前id下所有子集
|
|
|
|
$str = $this->getAllSub($this->param['id'], $str);
|
|
|
|
foreach ($str as $v){
|
|
|
|
$this->model->del(['id'=>$v]);
|
|
|
|
}
|
|
|
|
//编辑菜单后,通知更新
|
|
|
|
$this->addUpdateNotify(RouteMap::SOURCE_NAV, 'all');
|
...
|
...
|
|