|
...
|
...
|
@@ -36,7 +36,6 @@ class ComController extends BaseController |
|
|
|
}
|
|
|
|
$lists = $projectMenuModel->list($this->map,'sort');
|
|
|
|
foreach ($lists as $k => $v){
|
|
|
|
$v = (array)$v;
|
|
|
|
if(empty($this->user['is_upload_manage'])){
|
|
|
|
if($v['rules'] == '/fileUpload'){
|
|
|
|
unset($lists[$k]);
|
|
...
|
...
|
@@ -94,15 +93,20 @@ class ComController extends BaseController |
|
|
|
* @time :2023/9/6 11:47
|
|
|
|
*/
|
|
|
|
public function getNoAdminMenuCondition(){
|
|
|
|
$code = $this->getIsHome();
|
|
|
|
$projectRoleModel = new ProjectRoleModel();
|
|
|
|
$info = $projectRoleModel->read(['id'=>$this->user['role_id']]);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前登录角色不存在');
|
|
|
|
}else{
|
|
|
|
$code = $this->getIsHome();
|
|
|
|
if($code != 1){
|
|
|
|
$info['role_menu'] = trim(str_replace(',11,',',',','.$info['role_menu'].','),',');
|
|
|
|
}
|
|
|
|
$blogCode = $this->getIsBlog();
|
|
|
|
if($blogCode != 1){
|
|
|
|
$info['role_menu'] = trim(str_replace(',16,',',',','.$info['role_menu'].','),',');
|
|
|
|
$info['role_menu'] = trim(str_replace(',17,',',',','.$info['role_menu'].','),',');
|
|
|
|
}
|
|
|
|
$this->map = [
|
|
|
|
'status'=>0,
|
|
|
|
'is_role'=>0,
|
|
...
|
...
|
@@ -120,10 +124,19 @@ class ComController extends BaseController |
|
|
|
* @time :2023/9/6 13:53
|
|
|
|
*/
|
|
|
|
public function getAdminMenuCondition(){
|
|
|
|
$data = [];
|
|
|
|
$this->map['status'] = 0;
|
|
|
|
$code = $this->getIsHome();
|
|
|
|
if($code != 1){
|
|
|
|
$this->map['id'] = ['!=',11];//排除菜单网站装修
|
|
|
|
$data[] = 11;
|
|
|
|
}
|
|
|
|
$blogCode = $this->getIsBlog();
|
|
|
|
if($blogCode != 1){
|
|
|
|
$data[] = 16;
|
|
|
|
$data[] = 17;
|
|
|
|
}
|
|
|
|
if(!empty($data)){
|
|
|
|
$this->map['id'] = ['not in',$data];
|
|
|
|
}
|
|
|
|
return $this->map;
|
|
|
|
}
|
|
...
|
...
|
@@ -152,6 +165,22 @@ class ComController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :是否显示博客
|
|
|
|
* @name :getIsBlog
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/19 16:44
|
|
|
|
*/
|
|
|
|
public function getIsBlog(){
|
|
|
|
$projectModel = new Project();
|
|
|
|
$info = $projectModel->read(['id'=>$this->user['project_id']]);
|
|
|
|
if($info['is_show_blog'] == 0){
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :登录用户编辑资料/修改密码
|
|
|
|
* @author :liyuhang
|
|
|
|
* @method
|
...
|
...
|
|