作者 lyh

变更数据

@@ -24,8 +24,8 @@ use Illuminate\Http\Request; @@ -24,8 +24,8 @@ use Illuminate\Http\Request;
24 */ 24 */
25 class GeoController extends BaseController 25 class GeoController extends BaseController
26 { 26 {
27 - public function __construct(){  
28 - parent::__construct(); 27 + public function __construct(Request $request){
  28 + parent::__construct($request);
29 $this->logic = new GeoLogic(); 29 $this->logic = new GeoLogic();
30 } 30 }
31 31
@@ -21,13 +21,13 @@ use App\Http\Controllers\Aside\BaseController; @@ -21,13 +21,13 @@ use App\Http\Controllers\Aside\BaseController;
21 class GeoWritingTaskController extends BaseController 21 class GeoWritingTaskController extends BaseController
22 { 22 {
23 /** 23 /**
24 - * @remark :文章任务列表 24 + * @remark :保存geoAi文章数据
25 * @name :lists 25 * @name :lists
26 * @author :lyh 26 * @author :lyh
27 * @method :post 27 * @method :post
28 * @time :2025/10/25 10:41 28 * @time :2025/10/25 10:41
29 */ 29 */
30 - public function lists(){ 30 + public function saveWritingTask(){
31 31
32 } 32 }
33 } 33 }
@@ -35,6 +35,9 @@ class WebSettingReceivingLogic extends BaseLogic @@ -35,6 +35,9 @@ class WebSettingReceivingLogic extends BaseLogic
35 */ 35 */
36 public function setting_receiving_save(){ 36 public function setting_receiving_save(){
37 $data = []; 37 $data = [];
  38 + if(!isset($this->param['data']) || empty($this->param['data'])){
  39 + $this->fail('参数错误,请联系管理员');
  40 + }
38 foreach ($this->param['data'] as $v){ 41 foreach ($this->param['data'] as $v){
39 if($v['type'] == 1){ 42 if($v['type'] == 1){
40 // 使用正则表达式匹配中国大陆手机号 43 // 使用正则表达式匹配中国大陆手机号
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :GeoWritingsTaskRequest.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/10/25 14:21
  8 + */
  9 +
  10 +namespace App\Http\Requests\Aside\Geo;
  11 +
  12 +use Illuminate\Foundation\Http\FormRequest;
  13 +
  14 +class GeoWritingsTaskRequest extends FormRequest
  15 +{
  16 + /**
  17 + * Determine if the user is authorized to make this request.
  18 + *
  19 + * @return bool
  20 + */
  21 + public function authorize()
  22 + {
  23 + return true;
  24 + }
  25 +
  26 + /**
  27 + * Get the validation rules that apply to the request.
  28 + *
  29 + * @return array
  30 + */
  31 + public function rules()
  32 + {
  33 + return [
  34 + 'project_id' => 'required',
  35 + 'company' => 'required|string',
  36 + 'brand' => 'required|string',
  37 + 'keyword' => 'required|string',
  38 + 'prefix' => 'required|string',
  39 + 'suffix' => 'required|string',
  40 + 'event_title' => 'required|string',
  41 + 'event_content' => 'required|string',
  42 + 'title' => 'required|string',
  43 + 'description' => 'required|string',
  44 + 'footer' => 'required|string',
  45 + 'img' => 'required|string',
  46 + 'ai_model' => 'required|string',
  47 + ];
  48 + }
  49 +}
@@ -26,7 +26,7 @@ class NewsRequest extends FormRequest @@ -26,7 +26,7 @@ class NewsRequest extends FormRequest
26 return [ 26 return [
27 'name'=>'required|max:200', 27 'name'=>'required|max:200',
28 'url'=>'required', 28 'url'=>'required',
29 -// 'seo_title' => 'max:70', 29 + 'seo_title' => 'max:70',
30 'seo_keywords' => 'max:300', 30 'seo_keywords' => 'max:300',
31 'seo_description' => 'max:200', 31 'seo_description' => 'max:200',
32 ]; 32 ];
@@ -38,7 +38,7 @@ class NewsRequest extends FormRequest @@ -38,7 +38,7 @@ class NewsRequest extends FormRequest
38 'name.required'=>'请填写名称', 38 'name.required'=>'请填写名称',
39 'name.max'=>'名称超过最长长度200', 39 'name.max'=>'名称超过最长长度200',
40 'url.required'=>'链接不能为空', 40 'url.required'=>'链接不能为空',
41 -// 'seo_title.max' => 'SEO标题不能超过70个字符', 41 + 'seo_title.max' => 'SEO标题不能超过70个字符',
42 'seo_keywords.max' => 'SEO关键词不能超过300个字符', 42 'seo_keywords.max' => 'SEO关键词不能超过300个字符',
43 'seo_description.max' => 'SEO描述不能超过200个字符', 43 'seo_description.max' => 'SEO描述不能超过200个字符',
44 ]; 44 ];