正在显示
1 个修改的文件
包含
29 行增加
和
7 行删除
| @@ -263,21 +263,17 @@ class BTemplateLogic extends BaseLogic | @@ -263,21 +263,17 @@ class BTemplateLogic extends BaseLogic | ||
| 263 | * @time :2023/6/29 11:05 | 263 | * @time :2023/6/29 11:05 |
| 264 | */ | 264 | */ |
| 265 | public function templateSave(){ | 265 | public function templateSave(){ |
| 266 | - //演示项目,不允许其他号码编辑 | ||
| 267 | - if(($this->user['project_id'] == 1) && (!in_array($this->user['mobile'],$this->model->mobile)) && ($this->param['source'] == 1)){ | ||
| 268 | - $this->fail('演示项目仅支持演示功能,无法更改首页'); | ||
| 269 | - } | ||
| 270 | - //查询当前模版是否已保存 | 266 | + //演示项目不允许修改 |
| 267 | + $this->showProjectNoEdit($this->param['source']); | ||
| 271 | DB::beginTransaction(); | 268 | DB::beginTransaction(); |
| 272 | try { | 269 | try { |
| 273 | //字符串截取 | 270 | //字符串截取 |
| 274 | $this->param = $this->stringProcessing($this->param); | 271 | $this->param = $this->stringProcessing($this->param); |
| 275 | //自定义模块单独处理 | 272 | //自定义模块单独处理 |
| 276 | if(isset($this->param['is_custom']) && ($this->param['is_custom'] == 1)){ | 273 | if(isset($this->param['is_custom']) && ($this->param['is_custom'] == 1)){ |
| 277 | - | 274 | + $this->customSaveTemplateHtml($this->param); |
| 278 | }else{ | 275 | }else{ |
| 279 | $this->saveTemplateHtml($this->param); | 276 | $this->saveTemplateHtml($this->param); |
| 280 | - //写入操作模版记录 | ||
| 281 | $this->setTemplateLog($this->param); | 277 | $this->setTemplateLog($this->param); |
| 282 | } | 278 | } |
| 283 | DB::commit(); | 279 | DB::commit(); |
| @@ -291,6 +287,32 @@ class BTemplateLogic extends BaseLogic | @@ -291,6 +287,32 @@ class BTemplateLogic extends BaseLogic | ||
| 291 | } | 287 | } |
| 292 | 288 | ||
| 293 | /** | 289 | /** |
| 290 | + * @remark :自定义模块保存 | ||
| 291 | + * @name :customSaveTemplateHtml | ||
| 292 | + * @author :lyh | ||
| 293 | + * @method :post | ||
| 294 | + * @time :2023/12/12 11:41 | ||
| 295 | + */ | ||
| 296 | + public function customSaveTemplateHtml(){ | ||
| 297 | + | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + /** | ||
| 301 | + * @remark :演示项目不允许修改首页 | ||
| 302 | + * @name :showProject | ||
| 303 | + * @author :lyh | ||
| 304 | + * @method :post | ||
| 305 | + * @time :2023/12/12 11:27 | ||
| 306 | + */ | ||
| 307 | + public function showProjectNoEdit($source){ | ||
| 308 | + //演示项目,不允许其他号码编辑 | ||
| 309 | + if(($this->user['project_id'] == 1) && (!in_array($this->user['mobile'],$this->model->mobile)) && ($source == BTemplate::SOURCE_HOME)){ | ||
| 310 | + $this->fail('演示项目仅支持演示功能,无法更改首页'); | ||
| 311 | + } | ||
| 312 | + return true; | ||
| 313 | + } | ||
| 314 | + | ||
| 315 | + /** | ||
| 294 | * @remark :保存可视化数据 | 316 | * @remark :保存可视化数据 |
| 295 | * @name :saveTemplateHtml | 317 | * @name :saveTemplateHtml |
| 296 | * @author :lyh | 318 | * @author :lyh |
-
请 注册 或 登录 后发表评论