正在显示
1 个修改的文件
包含
12 行增加
和
7 行删除
| @@ -259,26 +259,31 @@ class BTemplateLogic extends BaseLogic | @@ -259,26 +259,31 @@ class BTemplateLogic extends BaseLogic | ||
| 259 | $this->fail('演示项目仅支持演示功能,无法更改首页'); | 259 | $this->fail('演示项目仅支持演示功能,无法更改首页'); |
| 260 | } | 260 | } |
| 261 | //查询当前模版是否已保存 | 261 | //查询当前模版是否已保存 |
| 262 | - DB::beginTransaction(); | ||
| 263 | - try { | 262 | +// DB::beginTransaction(); |
| 263 | +// try { | ||
| 264 | $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']); | 264 | $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']); |
| 265 | //字符串截取 | 265 | //字符串截取 |
| 266 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(11111, true) . PHP_EOL, FILE_APPEND); | ||
| 266 | $this->param = $this->stringProcessing($this->param); | 267 | $this->param = $this->stringProcessing($this->param); |
| 267 | //保存头部信息 | 268 | //保存头部信息 |
| 269 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(22222, true) . PHP_EOL, FILE_APPEND); | ||
| 268 | $this->saveCommonTemplate($this->param); | 270 | $this->saveCommonTemplate($this->param); |
| 271 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(33333, true) . PHP_EOL, FILE_APPEND); | ||
| 269 | $this->param = $this->templateSaveParam($this->param);//组装数据 | 272 | $this->param = $this->templateSaveParam($this->param);//组装数据 |
| 273 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(44444, true) . PHP_EOL, FILE_APPEND); | ||
| 270 | if($info === false){ | 274 | if($info === false){ |
| 271 | $this->model->add($this->param); | 275 | $this->model->add($this->param); |
| 272 | }else{ | 276 | }else{ |
| 273 | $this->model->edit($this->param,['id'=>$info['id']]); | 277 | $this->model->edit($this->param,['id'=>$info['id']]); |
| 274 | } | 278 | } |
| 279 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(5555, true) . PHP_EOL, FILE_APPEND); | ||
| 275 | //写入操作模版记录 | 280 | //写入操作模版记录 |
| 276 | $this->setTemplateLog($this->param); | 281 | $this->setTemplateLog($this->param); |
| 277 | - DB::commit(); | ||
| 278 | - }catch (\Exception $e){ | ||
| 279 | - DB::rollBack(); | ||
| 280 | - $this->fail('系统错误,请联系管理员'); | ||
| 281 | - } | 282 | +// DB::commit(); |
| 283 | +// }catch (\Exception $e){ | ||
| 284 | +// DB::rollBack(); | ||
| 285 | +// $this->fail('系统错误,请联系管理员'); | ||
| 286 | +// } | ||
| 282 | //通知更新 | 287 | //通知更新 |
| 283 | $this->homeOrProduct($this->param['source'],$this->param['source_id']); | 288 | $this->homeOrProduct($this->param['source'],$this->param['source_id']); |
| 284 | return $this->success(); | 289 | return $this->success(); |
-
请 注册 或 登录 后发表评论