|
...
|
...
|
@@ -46,21 +46,24 @@ class NavLogic extends BaseLogic |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $ids
|
|
|
|
* @return array
|
|
|
|
* @throws \App\Exceptions\AsideGlobalException
|
|
|
|
* @throws \App\Exceptions\BsideGlobalException
|
|
|
|
* @author:dc
|
|
|
|
* @time 2023/5/11 16:59
|
|
|
|
* @remark :删除菜单
|
|
|
|
* @name :navDelete
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/23 11:12
|
|
|
|
*/
|
|
|
|
public function delete($ids,$map = [])
|
|
|
|
public function navDelete()
|
|
|
|
{
|
|
|
|
if(BNav::isChild($ids,$this->user['project_id'])){
|
|
|
|
$this->fail('存在下级无法删除');
|
|
|
|
//判断当前菜单是否拥有下级
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
if($info !== false){
|
|
|
|
$this->fail('当前菜单存在下级,不允许删除');
|
|
|
|
}
|
|
|
|
|
|
|
|
return parent::delete($ids,$map); // TODO: Change the autogenerated stub
|
|
|
|
|
|
|
|
$rs = $this->model->del($this->param);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
...
|
...
|
|