作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !2858
... ... @@ -82,8 +82,8 @@ class AiBlogController extends BaseController
* @method :post
* @time :2023/7/5 14:33
*/
public function save(AiBlogLogic $aiBlogLogic){
// $aiBlogRequest->validated();
public function save(AiBlogRequest $aiBlogRequest,AiBlogLogic $aiBlogLogic){
$aiBlogRequest->validated();
$aiBlogLogic->blogSave();
$this->response('success');
}
... ...
... ... @@ -218,14 +218,15 @@ class BlogController extends BaseController
public function edit_seo(BlogLogic $blogLogic){
$this->request->validate([
'id'=>['required'],
'seo_title'=>['required'],
'seo_description'=>['required'],
'seo_keywords'=>['required'],
'seo_title'=>['required','max:70'],
'seo_description'=>['required','max:200'],
'seo_keywords'=>['required','max:200'],
],[
'id.required' => 'ID不能为空',
'seo_title.required' => 'seo_title不能为空',
'seo_description.required' => 'seo_description不能为空',
'seo_keywords.required' => 'seo_description不能为空',
'seo_title.max' => 'seo_title不能超过70个字符',
]);
$blogLogic->edit_seo();
$this->response('success');
... ...
... ... @@ -200,11 +200,17 @@ class CustomModuleContentController extends BaseController
$this->request->validate([
'name'=>['required'],
'route'=>['required'],
'module_id'=>['required']
'module_id'=>['required'],
'seo_title'=>['max:70'],
'seo_keywords'=>['max:200'],
'seo_description'=>['max:200'],
],[
'name.required' => '分类名称不能为空',
'route.required' => '分类路由不能为空',
'module_id.required' => '所选模块id不能为空'
'module_id.required' => '所选模块id不能为空',
'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过200个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
]);
$data = $logic->contentSave();
$this->response('success',Code::SUCCESS,$data);
... ...
... ... @@ -59,12 +59,12 @@ class TicketUploadDataLogic extends BaseLogic
if($v['type'] == 1){
if(!empty($v['text']['image'])){
foreach ($v['text']['image'] as $gallery_k => $gallery_v){
$gallery_v['url'] = getImageUrl($gallery_v['url'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
$gallery_v['url'] = getImageUrl($gallery_v['url']);
$info['text']['image'][$gallery_k] = $gallery_v;
}
}
}else{
$v['text']['image'] = getImageUrl($v['text']['image'],$this->user['storage_type'],$this->user['project_location']);
$v['text']['image'] = getImageUrl($v['text']['image']);
}
return $this->success($v);
}
... ...
... ... @@ -49,6 +49,7 @@ class GeoQuestionResLogic extends BaseLogic
public function getResultList($map = [],$page = 1,$row = 20,$order = 'created_at',$sort = 'desc'){
unset($map['sort']);
$map['project_id'] = $this->user['project_id'];
$map['is_match'] = ['!=',0];
$filed = ['id','project_id','question_id','platform','is_match','question','en_question','keywords','url','label','cosine','created_at','updated_at'];
if(!empty($map['created_at'])){
$map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].' 23:59:59']];
... ...
... ... @@ -25,6 +25,9 @@ class AiBlogRequest extends FormRequest
{
return [
'new_title'=>'required',
'seo_title'=>'max:70',
'seo_keywords'=>'max:200',
'seo_description'=>'max:200',
];
}
... ... @@ -32,6 +35,9 @@ class AiBlogRequest extends FormRequest
{
return [
'new_title.required' => '新标题不能为空',
'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过200个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
];
}
}
... ...
... ... @@ -24,7 +24,10 @@ class BlogCategoryRequest extends FormRequest
public function rules()
{
return [
'name'=>'required|max:100',
'name'=>'required|max:200',
'seo_title'=>'max:70',
'seo_keywords'=>'max:200',
'seo_description'=>'max:200',
];
}
... ... @@ -32,7 +35,10 @@ class BlogCategoryRequest extends FormRequest
{
return [
'name.required'=>'请填写名称',
'name.max'=>'名称最大100字',
'name.max'=>'名称最大200字',
'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过200个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
];
}
}
... ...
... ... @@ -25,9 +25,11 @@ class BlogRequest extends FormRequest
{
return [
'name'=>'required|max:200',
'seo_keywords'=>'max:500',
'remark'=>'max:1000',
'url'=>'required',
'seo_title'=>'max:70',
'seo_keywords'=>'max:200',
'seo_description'=>'max:200',
// 'text'=>'max:5000',
];
}
... ... @@ -38,7 +40,9 @@ class BlogRequest extends FormRequest
'name.required'=>'请填写名称',
'name.max'=>'名称超过最长长度200',
'url.required'=>'链接不能为空',
'seo_keywords.max'=>'seo_keywords太长,请重新编辑',
'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过200个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
'remark.max'=>'描述超过最长长度1000',
// 'text.max'=>'详情内容超过最大长度',
];
... ...
... ... @@ -24,7 +24,10 @@ class NewsCategoryRequest extends FormRequest
public function rules()
{
return [
'name'=>'required|max:100',
'name'=>'required|max:200',
'seo_title'=>'max:70',
'seo_keywords'=>'max:200',
'seo_description'=>'max:200',
];
}
... ... @@ -33,6 +36,9 @@ class NewsCategoryRequest extends FormRequest
return [
'name.required'=>'请填写名称',
'name.max'=>'名称最大100字',
'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过200个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
];
}
}
... ...
... ... @@ -27,6 +27,9 @@ class NewsRequest extends FormRequest
'name'=>'required|max:200',
// 'remark'=>'max:2000',
'url'=>'required',
'seo_title' => 'max:70',
'seo_keywords' => 'max:200',
'seo_description' => 'max:200',
];
}
... ... @@ -37,6 +40,9 @@ class NewsRequest extends FormRequest
'name.max'=>'名称超过最长长度200',
'url.required'=>'链接不能为空',
// 'remark.max'=>'描述超过最长长度2000'
'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过200个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
];
}
}
... ...
... ... @@ -31,9 +31,9 @@ class KeywordRequest extends FormRequest
{
return [
'title'=>'required|max:200',
'seo_title'=>'max:255',
'seo_keywords'=>'max:500',
'seo_description'=>'max:500',
'seo_title'=>'max:70',
'seo_keywords'=>'max:200',
'seo_description'=>'max:200',
'related_news_ids'=>'array|max:2',
'related_blog_ids'=>'array|max:2',
];
... ... @@ -44,9 +44,9 @@ class KeywordRequest extends FormRequest
return [
'title.required' => '请输入关键词',
'title.max' => '关键词不能超过200个字符',
'seo_title.max' => 'SEO标题不能超过255个字符',
'seo_keywords.max' => 'SEO关键词不能超过500个字符',
'seo_description.max' => 'SEO描述不能超过500个字符',
'seo_title.max' => 'SEO标题不能超过70个字符',
'seo_keywords.max' => 'SEO关键词不能超过200个字符',
'seo_description.max' => 'SEO描述不能超过200个字符',
'related_news_ids.max' => '关联新闻不能超过两条',
'related_blog_ids.max' => '关联博客不能超过两条',
];
... ...
... ... @@ -38,6 +38,9 @@ class ProductRequest extends FormRequest
return [
'title' => 'required|max:200',
'route' => 'required|max:200',
'seo_mate.title' => 'max:70',
'seo_mate.keyword' => 'max:200',
'seo_mate.description' => 'max:200',
'status' => ['required', Rule::in(array_keys(Product::statusMap()))],
];
}
... ... @@ -51,6 +54,10 @@ class ProductRequest extends FormRequest
'route.max' => '产品链接不能超过200个字符',
'status.required' => '请选择产品状态',
'status.in' => '产品状态值异常',
// 可选的 seo_mate 子字段的提示
'seo_mate.title.max' => 'SEO 标题不能超过70个字符',
'seo_mate.keyword.max' => 'SEO 关键字不能超过200个字符',
'seo_mate.description.max' => 'SEO 描述不能超过200个字符',
];
}
... ...