20201112
This commit is contained in:
@@ -69,13 +69,17 @@ class Article extends Controller{
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no']==0?':':'('.$stage_info['stage_no'].'):';
|
||||
$cite = $article_info['abbr'].' '.$article_info['title'].' '.$journal_info['jabbr'].' '.$stage_info['stage_year'].';'.$stage_info['stage_vol'].$no.$article_info['npp'].'. doi:'.$article_info['doi'];
|
||||
|
||||
//修改keywords
|
||||
$article_info['keywords'] = str_replace(',',' ', $article_info['keywords']);
|
||||
|
||||
//返回数据
|
||||
$re['articleInfo'] = $article_info;
|
||||
$re['journalInfo'] = $journal_info;
|
||||
$re['stageInfo'] = $stage_info;
|
||||
$re['author'] = $author;
|
||||
$re['cite'] = $cite;
|
||||
return jsonSuccess($re);
|
||||
|
||||
}
|
||||
private function sys_author($authors,$organs,$atto){
|
||||
$cache = [];
|
||||
@@ -134,4 +138,37 @@ class Article extends Controller{
|
||||
return substr($frag,0, -1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取stage文章列表
|
||||
* @description 获取stage文章列表
|
||||
* @author wangjinlei
|
||||
* @url /api/Article/getStageArticles
|
||||
* @method POST
|
||||
*
|
||||
* @param name:stage_id type:int require:1 desc:分期id
|
||||
*
|
||||
* @return stageInfo:分期#
|
||||
* @return articleList:文章信息#
|
||||
*
|
||||
*/
|
||||
public function getStageArticles(){
|
||||
$data = $this->request->post();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$data['stage_id'])->find();
|
||||
$list = $this->article_obj->where('journal_stage_id',$data['stage_id'])->where('state',0)->select();
|
||||
// $topic_info = $this->journal_topic_obj->where('journal_topic_id',$data['topic_id'])->find();
|
||||
// $list = $this->article_to_topic_obj->field('j_article.*,j_journal_stage.*')
|
||||
// ->join(array(['j_article','j_article_to_topic.article_id = j_article.article_id','LEFT'],['j_journal_stage','j_article.journal_stage_id = j_journal_stage.journal_stage_id','LEFT']))
|
||||
// ->where('j_article_to_topic.topic_id',$data['topic_id'])
|
||||
// ->where('j_article_to_topic.state',0)
|
||||
// ->select();
|
||||
//获取作者
|
||||
foreach($list as $k=>$v){
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
$re['stageInfo'] = $stage_info;
|
||||
$re['articleList'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user