This commit is contained in:
wangjinlei
2023-07-17 17:21:27 +08:00
parent 32ae12e5b3
commit 46771c6fb3
3 changed files with 51 additions and 5 deletions

View File

@@ -142,6 +142,43 @@ class Production extends Base
return jsonSuccess([]);
}
public function addWebMains(){
$data = $this->request->post();
$rule = new Validate([
"article_id"=>'require',
"pre_id"=>"require",
"contents"=>"require|array"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/addArticleMainsAddForSubmission";
$program['article_id'] = $data['article_id'];
$program['pre_id'] = $data['pre_id'];
$program['contents'] = json_encode($data['contents']);
$res = object_to_array(json_decode(myPost($url,$data)));
return jsonSuccess([]);
}
/**添加主题内容的空白行
* @return void
*/
public function addWebMainEmpty(){
$data = $this->request->post();
$rule = new Validate([
"article_id"=>"require",
"pre_id"=>"require",
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/addArticleMainAddEmptyForSubmission";
$res = object_to_array(json_decode(myPost($url,$data)));
return jsonSuccess([]);
}
public function delWebMain(){
$data = $this->request->post();
$rule = new Validate([