This commit is contained in:
wangjinlei
2022-07-13 12:03:08 +08:00
parent 4e0f62fab5
commit 809170fed6
7 changed files with 286 additions and 47 deletions

View File

@@ -34,7 +34,7 @@ class Journal extends Controller {
protected $board_group_obj = '';
protected $base_topic_obj = '';
protected $subscribe_base_topic_obj = '';
protected $journal_for_author;
protected $journal_for_author='';
public function __construct(\think\Request $request = null) {
parent::__construct($request);
@@ -87,6 +87,34 @@ class Journal extends Controller {
->select();
return json(['code'=>0,'msg'=>'success','data'=>['journalList'=>$res]]);
}
/**
* 获取全部期刊
*/
public function getJournals(){
$jouranls = $this->journal_obj->where('state',0)->select();
$re['journals'] = $jouranls;
return jsonSuccess($re);
}
/**
* 获取分期通过期刊
*/
public function getStagesByJournal(){
$data = $this->request->post();
$rule = new Validate([
'journal_id'=>'require|number'
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$list = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('state',0)->select();
foreach ($list as $k => $vv) {
$list[$k]['title'] = $vv['stage_year'] . ' Vol.' . $vv['stage_vol'] . ' issue.' . $vv['stage_no'] . $vv['stage_pagename'] . $vv['stage_page'];
}
$re['stages']=$list;
return jsonSuccess($re);
}
/**
* @title 获取所有期刊