正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -24,7 +24,7 @@ class PageSettingController extends BaseController | @@ -24,7 +24,7 @@ class PageSettingController extends BaseController | ||
| 24 | */ | 24 | */ |
| 25 | public function info(){ | 25 | public function info(){ |
| 26 | $pageSettingModel = new PageSetting(); | 26 | $pageSettingModel = new PageSetting(); |
| 27 | - $info = $pageSettingModel->read(['project_id'=>$this->user['project_id']]); | 27 | + $info = $pageSettingModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'] ?? 1]); |
| 28 | if($info === false){ | 28 | if($info === false){ |
| 29 | $info = [ | 29 | $info = [ |
| 30 | 'project_id'=>$this->user['project_id'], | 30 | 'project_id'=>$this->user['project_id'], |
| @@ -36,6 +36,7 @@ class PageSettingController extends BaseController | @@ -36,6 +36,7 @@ class PageSettingController extends BaseController | ||
| 36 | 'news_list'=>0, | 36 | 'news_list'=>0, |
| 37 | 'news_details'=>0, | 37 | 'news_details'=>0, |
| 38 | 'polymerization'=>0, | 38 | 'polymerization'=>0, |
| 39 | + 'type'=>$this->param['type'] ?? 1, | ||
| 39 | ]; | 40 | ]; |
| 40 | $pageSettingModel->add($info); | 41 | $pageSettingModel->add($info); |
| 41 | } | 42 | } |
| @@ -51,7 +52,7 @@ class PageSettingController extends BaseController | @@ -51,7 +52,7 @@ class PageSettingController extends BaseController | ||
| 51 | */ | 52 | */ |
| 52 | public function edit(){ | 53 | public function edit(){ |
| 53 | $pageSettingModel = new PageSetting(); | 54 | $pageSettingModel = new PageSetting(); |
| 54 | - $rs = $pageSettingModel->edit($this->param,['project_id'=>$this->user['project_id']]); | 55 | + $rs = $pageSettingModel->edit($this->param,['project_id'=>$this->user['project_id'],'type'=>$this->param['type'] ?? 1]); |
| 55 | if($rs === false){ | 56 | if($rs === false){ |
| 56 | $this->response('系统错误,请联系管理员',Code::SYSTEM_ERROR); | 57 | $this->response('系统错误,请联系管理员',Code::SYSTEM_ERROR); |
| 57 | } | 58 | } |
-
请 注册 或 登录 后发表评论