作者 lyh

gx

@@ -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