作者 lyh

gx

@@ -46,12 +46,12 @@ class ReplaceHtmlController extends BaseController @@ -46,12 +46,12 @@ class ReplaceHtmlController extends BaseController
46 public function replaceTemplateMainHtml(ReplaceHtmlLogic $logic){ 46 public function replaceTemplateMainHtml(ReplaceHtmlLogic $logic){
47 $this->request->validate([ 47 $this->request->validate([
48 'name'=>'required', 48 'name'=>'required',
49 - 'html'=>'required', 49 +// 'html'=>'required',
50 'old_html'=>'required', 50 'old_html'=>'required',
51 'project_id'=>'required', 51 'project_id'=>'required',
52 ],[ 52 ],[
53 'name.required' => '需替换页面标识不能为空', 53 'name.required' => '需替换页面标识不能为空',
54 - 'html.required' => 'html不能为空', 54 +// 'html.required' => 'html不能为空',
55 'old_html.required' => '替换前的html不能为空', 55 'old_html.required' => '替换前的html不能为空',
56 'project_id.required' => 'project_id不能为空', 56 'project_id.required' => 'project_id不能为空',
57 ]); 57 ]);
@@ -156,7 +156,7 @@ class ReplaceHtmlLogic extends BaseLogic @@ -156,7 +156,7 @@ class ReplaceHtmlLogic extends BaseLogic
156 'template_id'=>$template_id, 156 'template_id'=>$template_id,
157 'status'=>$this->model::STATUS, 157 'status'=>$this->model::STATUS,
158 'old_html'=>$param['old_html'], 158 'old_html'=>$param['old_html'],
159 - 'html'=>$param['html'], 159 + 'html'=>$param['html'] ?? '',
160 'project_id'=>$param['project_id'], 160 'project_id'=>$param['project_id'],
161 'total_num'=>0, 161 'total_num'=>0,
162 'operator_id'=>$this->manager['id'] 162 'operator_id'=>$this->manager['id']