作者 liyuhang

gx

@@ -92,10 +92,31 @@ class NewsController extends BaseController @@ -92,10 +92,31 @@ class NewsController extends BaseController
92 'id.required' => 'ID不能为空', 92 'id.required' => 'ID不能为空',
93 ]); 93 ]);
94 $newsLogic->news_edit(); 94 $newsLogic->news_edit();
95 - $this->response('success',Code::SUCCESS); 95 + $this->response('success');
96 } 96 }
97 97
98 /** 98 /**
  99 + * @name :编辑seo
  100 + * @return void
  101 + * @author :liyuhang
  102 + * @method
  103 + */
  104 + public function edit_seo(Request $request,NewsLogic $newsLogic){
  105 + $request->validate([
  106 + 'id'=>['required'],
  107 + 'seo_title'=>['required'],
  108 + 'seo_description'=>['required'],
  109 + 'seo_keywords'=>['required'],
  110 + ],[
  111 + 'id.required' => 'ID不能为空',
  112 + 'seo_title.required' => 'seo_title不能为空',
  113 + 'seo_description.required' => 'seo_description不能为空',
  114 + 'seo_keywords.required' => 'seo_description不能为空',
  115 + ]);
  116 + $newsLogic->edit_seo();
  117 + $this->response('success');
  118 + }
  119 + /**
99 * @name :编辑状态/与排序 120 * @name :编辑状态/与排序
100 * @return void 121 * @return void
101 * @author :liyuhang 122 * @author :liyuhang
@@ -122,6 +122,21 @@ class NewsLogic extends BaseLogic @@ -122,6 +122,21 @@ class NewsLogic extends BaseLogic
122 } 122 }
123 123
124 /** 124 /**
  125 + * @name :编辑seo
  126 + * @return void
  127 + * @author :liyuhang
  128 + * @method
  129 + */
  130 + public function edit_seo(){
  131 + $this->param['operator_id'] = $this->user['id'];
  132 + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
  133 + if($rs === false){
  134 + $this->fail('error');
  135 + }
  136 + $this->success();
  137 + }
  138 +
  139 + /**
125 * @name :修改状态 140 * @name :修改状态
126 * @return void 141 * @return void
127 * @throws \App\Exceptions\BsideGlobalException 142 * @throws \App\Exceptions\BsideGlobalException