1
This commit is contained in:
@@ -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 获取所有期刊
|
||||
|
||||
Reference in New Issue
Block a user