This commit is contained in:
wangjinlei
2022-07-15 09:53:07 +08:00
parent 809170fed6
commit 37ecfb7fc0
3 changed files with 148 additions and 3 deletions

View File

@@ -115,6 +115,29 @@ class Journal extends Controller {
$re['stages']=$list;
return jsonSuccess($re);
}
/**
* 获取期刊和分期信息
*/
public function getJournalsAndStage(){
$data = $this->request->post();
$journal_list = $this->journal_obj->where('state', 0)->select();
$frag = [];
foreach ($journal_list as $v) {
// $v['journal_stage_id'] = $v['journal_id'];
$cache_list = $this->journal_stage_obj->where('journal_id', $v['journal_id'])->where('state', 0)->select();
foreach ($cache_list as $k => $vv) {
$cache_list[$k]['title'] = $vv['stage_year'] . ' Vol.' . $vv['stage_vol'] . ' issue.' . $vv['stage_no'] . $vv['stage_pagename'] . $vv['stage_page'];
}
if (count($cache_list) > 0) {
$v['children'] = $cache_list;
} else {
$v['children'] = [];
}
$frag[] = $v;
}
return json(['code' => 0, 'msg' => 'success', 'data' => ['joutaglist' => $frag]]);
}
/**
* @title 获取所有期刊