1
This commit is contained in:
@@ -90,6 +90,54 @@ class Journal extends Base {
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
public function creatJournalStage(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"issn"=>"require",
|
||||
"stage_year"=>"require",
|
||||
"stage_vol"=>"require",
|
||||
"stage_no"=>"require",
|
||||
"stage_page"=>"require",
|
||||
"issue_date"=>"require",
|
||||
"stage_icon"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Journal/addStageForTG";
|
||||
$program['issn'] = $data['issn'];
|
||||
$program['stage_year'] = $data['stage_year'];
|
||||
$program['stage_vol'] = $data['stage_vol'];
|
||||
$program['stage_no'] = $data['stage_no'];
|
||||
$program['stage_pagename'] = "No.";
|
||||
$program['stage_page'] = $data['stage_page'];
|
||||
$program['issue_date'] = $data['issue_date'];
|
||||
$program['stage_icon'] = $data['stage_icon'];
|
||||
object_to_array(json_decode(myPost($url,$program)));
|
||||
return jsonSuccess($program);
|
||||
}
|
||||
|
||||
public function delJournalStage(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"journal_stage_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Journal/delStage";
|
||||
$program['journal_stage_id'] = $data['journal_stage_id'];
|
||||
$res = object_to_array(json_decode(myPost($url,$program)));
|
||||
if($res['code']==0){
|
||||
return jsonSuccess($res);
|
||||
}else{
|
||||
return jsonError($res['msg']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getJournalStageArticles(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
@@ -193,17 +241,22 @@ class Journal extends Base {
|
||||
'level'=>'require',
|
||||
'email'=>'require',
|
||||
'epassword'=>'require',
|
||||
"kfen"=>"require",
|
||||
"scope"=>"require"
|
||||
"kfen"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$journal_info = $this->journal_obj->where("journal_id",$data['journal_id'])->find();
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Journal/editJournalEmailPasswordForSubmission";
|
||||
$program['issn'] = $journal_info['issn'];
|
||||
$program['epassword'] = $data['epassword'];
|
||||
$res = object_to_array(json_decode(myPost($url,$program)));
|
||||
|
||||
$update['level'] = $data['level'];
|
||||
$update['email'] = $data['email'];
|
||||
$update['epassword'] = $data['epassword'];
|
||||
$update['kfen'] = $data['kfen'];
|
||||
$update['scope'] = trim($data['scope']);
|
||||
$update['scope'] = isset($data['scope'])?trim($data['scope']):"";
|
||||
$this->journal_obj->where('journal_id',$data['journal_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user