This commit is contained in:
wangjinlei
2021-04-15 09:34:47 +08:00
parent 5f7f50fe82
commit 90077baf99
3 changed files with 306 additions and 40 deletions

View File

@@ -31,6 +31,8 @@ class Journal extends Controller {
protected $journal_paper_art_obj = '';
protected $subscribe_journal_obj = '';
protected $subscribe_topic_obj = '';
protected $board_obj = '';
protected $board_group_obj = '';
public function __construct(\think\Request $request = null) {
parent::__construct($request);
@@ -51,6 +53,8 @@ class Journal extends Controller {
$this->journal_paper_art_obj = Db::name('journal_paper_art');
$this->subscribe_journal_obj = Db::name('subscribe_journal');
$this->subscribe_topic_obj = Db::name('subscribe_topic');
$this->board_obj = Db::name('board');
$this->board_group_obj = Db::name('board_group');
}
/**
@@ -648,6 +652,43 @@ class Journal extends Controller {
$re['article'] = $article;
return jsonSuccess($re);
}
/**
* @title 获取期刊编委信息
* @description 获取期刊编委信息
* @author wangjinlei
* @url /api/Journal/getBoard
* @method POST
*
* @param name:journal_id type:int require:1 desc:期刊id
*
* @return boards:编委array#
*/
public function getBoard(){
$data = $this->request->post();
$list = $this->board_obj
->field('j_board.*,j_board_group.group_name')
->join('j_board_group','j_board.board_group_id = j_board_group.board_group_id','left')
->where('j_board.journal_id',$data['journal_id'])
->where('j_board.state',0)
->select();
$frag = [];
foreach ($list as $k => $v){
if($v['type']==0){
$frag['main'][] = $v;
}elseif($v['type']==1){
$frag['remain'][] = $v;
}else{
if($v['board_group_id']==0){
$frag['member'][] = $v;
}else{
$frag['member'][$v['group_name']][] = $v;
}
}
}
$re['boards'] = $frag;
return jsonSuccess($re);
}
/**
* @title 获取期刊话题列表
@@ -693,7 +734,9 @@ class Journal extends Controller {
$insert['email'] = $data['email'];
$id = $this->subscribe_journal_obj->insertGetId($insert);
//发送邮件感谢
$tt = 'Dear Researcher,<br><br>';
$tt = 'Dear Researcher,<br>';
$tt .= 'Aims & Scope<br>Traditional Medicine Research (TMR) (ISSN 2413-3973 CODEN TMRRCP) is a peer-reviewed open access journal managed by TMR Publishing Group. TMR is dedicated to protecting and developing all types of traditional medicines, including traditional Chinese medicine, Persian medicine, Ayurveda, Siddha, minority medicine, etc., using the latest achievements in modern science. TMR emphasizes the historical origin and developmental pipeline of the research objective and encourages authors to analyze the theoretical significance underlying a study and the application of traditional medicine in clinical practice. In addition to editorial, review, article and letter, the following topics are welcome. News column follows important current medical, policy, and archaeological events in the field of traditional medicine, and the comment column discusses the progress of latest and salient research.<br>';
$tt .= 'Abstracting and Indexing<br>Traditional Medicine Research has been included in Emerging Sources Citation Index (ESCI), Embase, DOAJ, ProQuest, J-Gate, EuroPub, WHO-COVID-19 Database, Google Scholar, EBSCO, ISC, ICI, MIAR, MIT Barton Catalog, OAJI, BASE, Cosmos, ESJI, Universiteitsbibliotheek Gent, ResearchBib, Argentina.gob.ar, GoOA Database, Research4Life (AGORA), National Science Library-Chinese Academy of Sciences, Ingenta Connect, CNKI Scholar, Baidu Scholar, CSTJ, VIP, Superstar Journals Database and Wanfang Data.<br>';
$tt .= 'Welcome you to the email alert for the latest research and more. Thank you for your interest in our publications and topics.<br>';
$tt .= '<a href="http://journalapi.tmrjournals.com/public/index.php/api/Journal/UnsubscribeJournal/snum/'.$id.'">Unsubscribe</a><br>';
$tt .= 'This service is provided by TMR Publishing Group | New Zealand<br>';
@@ -701,7 +744,7 @@ class Journal extends Controller {
$tt .= 'Email: publisher@tmrjournals.com';
$tt .= 'www.tmrjournals.com';
$maidata['email'] = $data['email'];
$maidata['title'] = 'Thank you for subscribing.';
$maidata['title'] = 'Traditional Medicine Research ISSN 2413-3973';
$maidata['content'] = $tt;
$maidata['tmail'] = 'publicrelations@tmrjournals.com';
$maidata['tpassword'] = 'pRWU999999';