20201112
This commit is contained in:
@@ -127,6 +127,7 @@ class Article extends Controller {
|
||||
public function getTopicArticles() {
|
||||
$data = $this->request->post();
|
||||
$topic_info = $this->journal_topic_obj->where('journal_topic_id', $data['topic_id'])->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$topic_info['journal_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'])
|
||||
@@ -134,6 +135,11 @@ class Article extends Controller {
|
||||
->select();
|
||||
//获取作者
|
||||
foreach ($list as $k => $v) {
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$v['journal_stage_id'])->find();
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
|
||||
$cite = $v['abbr'] . '. ' . $v['title'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
|
||||
$list[$k]['cite'] = $cite;
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
//标题斜体
|
||||
@@ -189,9 +195,15 @@ class Article extends Controller {
|
||||
public function getStageArticles() {
|
||||
$data = $this->request->post();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id', $data['stage_id'])->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$stage_info['journal_id'])->find();
|
||||
$list = $this->article_obj->field('j_article.*,j_journal_stage.*')->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')->where('j_article.journal_stage_id', $data['stage_id'])->where('j_article.state', 0)->select();
|
||||
//获取作者
|
||||
foreach ($list as $k => $v) {
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$v['journal_stage_id'])->find();
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
|
||||
$cite = $v['abbr'] . '. ' . $v['title'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
|
||||
$list[$k]['cite'] = $cite;
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
//标题斜体
|
||||
@@ -219,11 +231,16 @@ class Article extends Controller {
|
||||
* @param name:article_id type:int require:1 desc:期刊id
|
||||
* @param name:type type:string require:1 desc:类型(abs/html/pdf)
|
||||
*
|
||||
* @return article:文章详情
|
||||
*
|
||||
*/
|
||||
public function addArticleNum(){
|
||||
$data = $this->request->post();
|
||||
$this->article_obj->where('article_id',$data['article_id'])->setInc($data['type'].'_num');
|
||||
return jsonSuccess([]);
|
||||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
||||
|
||||
$re['article'] = $article_info;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user