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