|
...
|
...
|
@@ -263,20 +263,15 @@ class BTemplateLogic extends BaseLogic |
|
|
|
// try {
|
|
|
|
$info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']);
|
|
|
|
//字符串截取
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(11111, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->param = $this->stringProcessing($this->param);
|
|
|
|
//保存头部信息
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(22222, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->saveCommonTemplate($this->param);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(33333, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->param = $this->templateSaveParam($this->param);//组装数据
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(44444, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
if($info === false){
|
|
|
|
$this->model->add($this->param);
|
|
|
|
}else{
|
|
|
|
$this->model->edit($this->param,['id'=>$info['id']]);
|
|
|
|
}
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(5555, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
//写入操作模版记录
|
|
|
|
$this->setTemplateLog($this->param);
|
|
|
|
// DB::commit();
|
|
...
|
...
|
@@ -380,11 +375,6 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$route = '';
|
|
|
|
//路由映射
|
|
|
|
RouteMap::setRoute('index', RouteMap::SOURCE_PAGE, 0, $this->user['project_id']);
|
|
|
|
}elseif($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
$type = RouteMap::SOURCE_PRODUCT;
|
|
|
|
$productModel = new Product();
|
|
|
|
$info = $productModel->read(['id'=>$source_id]);
|
|
|
|
$route = $info['route'];
|
|
|
|
}
|
|
|
|
return $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>$type, 'route'=>$route]);
|
|
|
|
}
|
...
|
...
|
|