作者 lyh

gx

... ... @@ -114,6 +114,9 @@ class ComController extends BaseController
* @time :2023/9/6 11:30
*/
public function getIsHome(){
if(isset($this->user['manager_id'])){
return 1;
}
$deployBuild = new DeployBuild();
$info = $deployBuild->read(['project_id'=>$this->user['project_id']]);
if(!empty($info['configuration'])){
... ...
... ... @@ -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');
... ...