作者 lyh

变更数据

@@ -58,6 +58,9 @@ class AiBlogLogic extends BaseLogic @@ -58,6 +58,9 @@ class AiBlogLogic extends BaseLogic
58 if(!empty($this->param['image'])){ 58 if(!empty($this->param['image'])){
59 $this->param['image'] = str_replace_url($this->param['image']); 59 $this->param['image'] = str_replace_url($this->param['image']);
60 } 60 }
  61 + if(!isset($this->param['seo_title']) || empty($this->param['seo_title'])){
  62 + $this->param['seo_title'] = truncate_text($this->param['new_title'],70);
  63 + }
61 $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_BLOG, $this->param['id'], $this->user['project_id']); 64 $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_BLOG, $this->param['id'], $this->user['project_id']);
62 $anchor = $this->param['anchor'] ?? []; 65 $anchor = $this->param['anchor'] ?? [];
63 $this->param['anchor'] = json_encode($anchor,true); 66 $this->param['anchor'] = json_encode($anchor,true);
@@ -27,7 +27,7 @@ class BlogCategoryRequest extends FormRequest @@ -27,7 +27,7 @@ class BlogCategoryRequest extends FormRequest
27 'name'=>'required|max:200', 27 'name'=>'required|max:200',
28 // 'seo_title'=>'max:70', 28 // 'seo_title'=>'max:70',
29 'seo_keywords'=>'max:300', 29 'seo_keywords'=>'max:300',
30 - 'seo_description'=>'max:200', 30 + 'seo_des'=>'max:200',
31 ]; 31 ];
32 } 32 }
33 33
@@ -38,7 +38,7 @@ class BlogCategoryRequest extends FormRequest @@ -38,7 +38,7 @@ class BlogCategoryRequest extends FormRequest
38 'name.max'=>'名称最大200字', 38 'name.max'=>'名称最大200字',
39 // 'seo_title.max' => 'SEO标题不能超过70个字符', 39 // 'seo_title.max' => 'SEO标题不能超过70个字符',
40 'seo_keywords.max' => 'SEO关键词不能超过300个字符', 40 'seo_keywords.max' => 'SEO关键词不能超过300个字符',
41 - 'seo_description.max' => 'SEO描述不能超过200个字符', 41 + 'seo_des.max' => 'SEO描述不能超过200个字符',
42 ]; 42 ];
43 } 43 }
44 } 44 }
@@ -27,7 +27,7 @@ class NewsCategoryRequest extends FormRequest @@ -27,7 +27,7 @@ class NewsCategoryRequest extends FormRequest
27 'name'=>'required|max:200', 27 'name'=>'required|max:200',
28 // 'seo_title'=>'max:70', 28 // 'seo_title'=>'max:70',
29 'seo_keywords'=>'max:300', 29 'seo_keywords'=>'max:300',
30 - 'seo_description'=>'max:200', 30 + 'seo_des'=>'max:200',
31 ]; 31 ];
32 } 32 }
33 33
@@ -38,7 +38,7 @@ class NewsCategoryRequest extends FormRequest @@ -38,7 +38,7 @@ class NewsCategoryRequest extends FormRequest
38 'name.max'=>'名称最大100字', 38 'name.max'=>'名称最大100字',
39 // 'seo_title.max' => 'SEO标题不能超过70个字符', 39 // 'seo_title.max' => 'SEO标题不能超过70个字符',
40 'seo_keywords.max' => 'SEO关键词不能超过300个字符', 40 'seo_keywords.max' => 'SEO关键词不能超过300个字符',
41 - 'seo_description.max' => 'SEO描述不能超过200个字符', 41 + 'seo_des.max' => 'SEO描述不能超过200个字符',
42 ]; 42 ];
43 } 43 }
44 } 44 }
@@ -33,7 +33,7 @@ class CategoryRequest extends FormRequest @@ -33,7 +33,7 @@ class CategoryRequest extends FormRequest
33 'title'=>'required|max:200', 33 'title'=>'required|max:200',
34 'route'=>'required', 34 'route'=>'required',
35 'seo_keywords'=>'max:300', 35 'seo_keywords'=>'max:300',
36 - 'seo_description'=>'max:200', 36 + 'seo_des'=>'max:200',
37 ]; 37 ];
38 } 38 }
39 39
@@ -44,7 +44,7 @@ class CategoryRequest extends FormRequest @@ -44,7 +44,7 @@ class CategoryRequest extends FormRequest
44 'title.max' => '分类名称不能超过200个字符', 44 'title.max' => '分类名称不能超过200个字符',
45 'route.required' => '路由不能为空', 45 'route.required' => '路由不能为空',
46 'seo_keywords.max' => 'SEO关键词不能超过300个字符', 46 'seo_keywords.max' => 'SEO关键词不能超过300个字符',
47 - 'seo_description.max' => 'SEO描述不能超过200个字符', 47 + 'seo_des.max' => 'SEO描述不能超过200个字符',
48 ]; 48 ];
49 } 49 }
50 50