作者 lyh

变更数据

... ... @@ -58,6 +58,9 @@ class AiBlogLogic extends BaseLogic
if(!empty($this->param['image'])){
$this->param['image'] = str_replace_url($this->param['image']);
}
if(!isset($this->param['seo_title']) || empty($this->param['seo_title'])){
$this->param['seo_title'] = truncate_text($this->param['new_title'],70);
}
$this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_BLOG, $this->param['id'], $this->user['project_id']);
$anchor = $this->param['anchor'] ?? [];
$this->param['anchor'] = json_encode($anchor,true);
... ...
... ... @@ -27,7 +27,7 @@ class BlogCategoryRequest extends FormRequest
'name'=>'required|max:200',
// 'seo_title'=>'max:70',
'seo_keywords'=>'max:300',
'seo_description'=>'max:200',
'seo_des'=>'max:200',
];
}
... ... @@ -38,7 +38,7 @@ class BlogCategoryRequest extends FormRequest
'name.max'=>'名称最大200字',
// 'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过300个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
'seo_des.max' => 'SEO描述不能超过200个字符',
];
}
}
... ...
... ... @@ -27,7 +27,7 @@ class NewsCategoryRequest extends FormRequest
'name'=>'required|max:200',
// 'seo_title'=>'max:70',
'seo_keywords'=>'max:300',
'seo_description'=>'max:200',
'seo_des'=>'max:200',
];
}
... ... @@ -38,7 +38,7 @@ class NewsCategoryRequest extends FormRequest
'name.max'=>'名称最大100字',
// 'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过300个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
'seo_des.max' => 'SEO描述不能超过200个字符',
];
}
}
... ...
... ... @@ -33,7 +33,7 @@ class CategoryRequest extends FormRequest
'title'=>'required|max:200',
'route'=>'required',
'seo_keywords'=>'max:300',
'seo_description'=>'max:200',
'seo_des'=>'max:200',
];
}
... ... @@ -44,7 +44,7 @@ class CategoryRequest extends FormRequest
'title.max' => '分类名称不能超过200个字符',
'route.required' => '路由不能为空',
'seo_keywords.max' => 'SEO关键词不能超过300个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
'seo_des.max' => 'SEO描述不能超过200个字符',
];
}
... ...