正在显示
1 个修改的文件
包含
9 行增加
和
9 行删除
| @@ -260,9 +260,9 @@ class BTemplateLogic extends BaseLogic | @@ -260,9 +260,9 @@ class BTemplateLogic extends BaseLogic | ||
| 260 | if(($this->user['project_id'] == 1) && (!in_array($this->user['mobile'],$this->model->mobile)) && ($this->param['source'] == 1)){ | 260 | if(($this->user['project_id'] == 1) && (!in_array($this->user['mobile'],$this->model->mobile)) && ($this->param['source'] == 1)){ |
| 261 | $this->fail('演示项目仅支持演示功能,无法更改首页'); | 261 | $this->fail('演示项目仅支持演示功能,无法更改首页'); |
| 262 | } | 262 | } |
| 263 | -// //查询当前模版是否已保存 | ||
| 264 | -// DB::beginTransaction(); | ||
| 265 | -// try { | 263 | + //查询当前模版是否已保存 |
| 264 | + DB::beginTransaction(); | ||
| 265 | + try { | ||
| 266 | $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']); | 266 | $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']); |
| 267 | //字符串截取 | 267 | //字符串截取 |
| 268 | $this->param = $this->stringProcessing($this->param); | 268 | $this->param = $this->stringProcessing($this->param); |
| @@ -276,11 +276,11 @@ class BTemplateLogic extends BaseLogic | @@ -276,11 +276,11 @@ class BTemplateLogic extends BaseLogic | ||
| 276 | } | 276 | } |
| 277 | //写入操作模版记录 | 277 | //写入操作模版记录 |
| 278 | $this->setTemplateLog($this->param); | 278 | $this->setTemplateLog($this->param); |
| 279 | -// DB::commit(); | ||
| 280 | -// }catch (\Exception $e){ | ||
| 281 | -// DB::rollBack(); | ||
| 282 | -// $this->fail('系统错误,请联系管理员'); | ||
| 283 | -// } | 279 | + DB::commit(); |
| 280 | + }catch (\Exception $e){ | ||
| 281 | + DB::rollBack(); | ||
| 282 | + $this->fail('系统错误,请联系管理员'); | ||
| 283 | + } | ||
| 284 | //通知更新 | 284 | //通知更新 |
| 285 | $this->homeOrProduct($this->param['source'],$this->param['source_id']); | 285 | $this->homeOrProduct($this->param['source'],$this->param['source_id']); |
| 286 | return $this->success(); | 286 | return $this->success(); |
| @@ -413,7 +413,7 @@ class BTemplateLogic extends BaseLogic | @@ -413,7 +413,7 @@ class BTemplateLogic extends BaseLogic | ||
| 413 | public function templateSaveParam($param){ | 413 | public function templateSaveParam($param){ |
| 414 | $param['project_id'] = $this->user['project_id']; | 414 | $param['project_id'] = $this->user['project_id']; |
| 415 | $param['html'] = $param['main_html']; | 415 | $param['html'] = $param['main_html']; |
| 416 | - unset($param['head_html'],$param['head_css'],$param['footer_html'],$param['footer_css']); | 416 | +// unset($param['head_html'],$param['head_css'],$param['footer_html'],$param['footer_css']); |
| 417 | return $this->success($param); | 417 | return $this->success($param); |
| 418 | } | 418 | } |
| 419 | 419 |
-
请 注册 或 登录 后发表评论