1
This commit is contained in:
@@ -158,6 +158,9 @@ class Production extends Base
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$update['content'] = trim($data['content']);
|
||||
$this->production_article_main_obj->where('p_main_id',$data['p_main_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -261,23 +264,23 @@ class Production extends Base
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑文章主要内容
|
||||
*/
|
||||
public function editMainContent()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'p_article_id' => 'require|number',
|
||||
'main' => 'require'
|
||||
]);
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$update['main'] = $data['main'];
|
||||
$this->production_article_obj->where('p_article_id', $data['p_article_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
// /**
|
||||
// * 编辑文章主要内容
|
||||
// */
|
||||
// public function editMainContent()
|
||||
// {
|
||||
// $data = $this->request->post();
|
||||
// $rule = new Validate([
|
||||
// 'p_article_id' => 'require|number',
|
||||
// 'main' => 'require'
|
||||
// ]);
|
||||
// if (!$rule->check($data)) {
|
||||
// return jsonError($rule->getError());
|
||||
// }
|
||||
// $update['main'] = $data['main'];
|
||||
// $this->production_article_obj->where('p_article_id', $data['p_article_id'])->update($update);
|
||||
// return jsonSuccess([]);
|
||||
// }
|
||||
|
||||
|
||||
private function createdoi($year, $vol, $abbr)
|
||||
|
||||
Reference in New Issue
Block a user