This commit is contained in:
wangjinlei
2020-12-30 13:56:18 +08:00
parent 9c3e2cb210
commit ce4b7def5c
2 changed files with 91 additions and 1 deletions

View File

@@ -102,15 +102,18 @@ class Journal extends Controller {
* @param name:journal_id type:int require:1 desc:期刊id
*
* @return journal:期刊基础信息array#
* @return relats:关联数组#
* @return journalAbs:期刊外链信息array#
* @return journalstage:期刊分期信息array#
*/
public function getJournal() {
$data = $this->request->post();
$journal_info = $this->journal_obj->where('journal_id', $data['journal_id'])->find();
$rearr = $journal_info['relate']==''?[]:explode(',',$journal_info['relate']);
$relatelist = $this->journal_obj->where('journal_id','in',$rearr)->where('state',0)->select();
$absList = $this->journal_abs_obj->where('journal_id', $data['journal_id'])->where('state', 0)->order('sort')->select();
$stageList = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('is_publish', 1)->where('state', 0)->order('journal_stage_id desc')->select();
return json(['code' => 0, 'msg' => 'success', 'data' => ['journal' => $journal_info, 'journalAbs' => $absList, 'journalStage' => $stageList]]);
return json(['code' => 0, 'msg' => 'success', 'data' => ['journal' => $journal_info,'relats'=>$relatelist ,'journalAbs' => $absList, 'journalStage' => $stageList]]);
}
/**