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'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
- $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic','j_journal_topic.journal_topic_id = j_article_to_topic.topic_id','left')->where('j_article_to_topic.article_id',$v['article_id'])->where('j_article_to_topic.state',0)->select();
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
$list[$k]['cite'] = $cite;
$list[$k]['authortitle'] = $this->getAuthor($v);
}
+
+ //连续出版判断,决定是否显示出版时间
+ foreach ($list as $k => $v) {
+ $ca_stage = $this->journal_stage_obj->where('journal_stage_id', $v['journal_stage_id'])->find();
+ if (($v['journal_id'] == 2 && $ca_stage['stage_year'] >= 2022) || ($v['journal_id'] == 18 && $ca_stage['stage_year'] >= 2022) || ($v['journal_id'] == 17 && $ca_stage['stage_year'] >= 2019)) {
+ $list[$k]['isShowOtime'] = 1;
+ } else {
+ $list[$k]['isShowOtime'] = 0;
+ }
+ }
return json(['code' => 0, 'msg' => 'success', 'data' => ['articlelist' => $list, 'count' => $count]]);
}
@@ -698,8 +725,8 @@ class Journal extends Controller {
$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'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
- $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic','j_journal_topic.journal_topic_id = j_article_to_topic.topic_id','left')->where('j_article_to_topic.article_id',$v['article_id'])->where('j_article_to_topic.state',0)->select();
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
$list[$k]['cite'] = $cite;
@@ -715,6 +742,16 @@ class Journal extends Controller {
$list[$k]['title'] = $cache_title;
}
+ //连续出版判断,决定是否显示出版时间
+ foreach ($list as $k => $v) {
+ $ca_stage = $this->journal_stage_obj->where('journal_stage_id', $v['journal_stage_id'])->find();
+ if (($v['journal_id'] == 2 && $ca_stage['stage_year'] >= 2022) || ($v['journal_id'] == 18 && $ca_stage['stage_year'] >= 2022) || ($v['journal_id'] == 17 && $ca_stage['stage_year'] >= 2019)) {
+ $list[$k]['isShowOtime'] = 1;
+ } else {
+ $list[$k]['isShowOtime'] = 0;
+ }
+ }
+
return json(['code' => 0, 'msg' => 'success', 'data' => ['articlelist' => $list]]);
}
@@ -757,13 +794,22 @@ class Journal extends Controller {
$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'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
- $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic','j_journal_topic.journal_topic_id = j_article_to_topic.topic_id','left')->where('j_article_to_topic.article_id',$v['article_id'])->where('j_article_to_topic.state',0)->select();
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
$list[$k]['cite'] = $cite;
$list[$k]['authortitle'] = $this->getAuthor($v);
}
+ //连续出版判断,决定是否显示出版时间
+ foreach ($list as $k => $v){
+ $ca_stage = $this->journal_stage_obj->where('journal_stage_id',$v['journal_stage_id'])->find();
+ if(($v['journal_id']==2&&$ca_stage['stage_year']>=2022)||($v['journal_id']==18&&$ca_stage['stage_year']>=2022)||($v['journal_id']==17&&$ca_stage['stage_year']>=2019)){
+ $list[$k]['isShowOtime'] = 1;
+ }else{
+ $list[$k]['isShowOtime'] = 0;
+ }
+ }
//标题斜体
foreach ($list as $k => $v) {
@@ -843,8 +889,8 @@ class Journal extends Controller {
$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'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
- $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic','j_journal_topic.journal_topic_id = j_article_to_topic.topic_id','left')->where('j_article_to_topic.article_id',$v['article_id'])->where('j_article_to_topic.state',0)->select();
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
$list[$k]['cite'] = $cite;
@@ -859,6 +905,15 @@ class Journal extends Controller {
}
$list[$k]['title'] = $cache_title;
}
+ //连续出版判断,决定是否显示出版时间
+ foreach ($list as $k => $v) {
+ $ca_stage = $this->journal_stage_obj->where('journal_stage_id', $v['journal_stage_id'])->find();
+ if (($v['journal_id'] == 2 && $ca_stage['stage_year'] >= 2022) || ($v['journal_id'] == 18 && $ca_stage['stage_year'] >= 2022) || ($v['journal_id'] == 17 && $ca_stage['stage_year'] >= 2019)) {
+ $list[$k]['isShowOtime'] = 1;
+ } else {
+ $list[$k]['isShowOtime'] = 0;
+ }
+ }
return jsonSuccess(['topic_info' => $topic_info, 'articlelist' => $list]);
} else {
@@ -1024,34 +1079,32 @@ class Journal extends Controller {
$re['topics'] = $list;
return jsonSuccess($re);
}
-
- public function tttt(){
- $host="localhost";//mysql服务器地址
- $user='root';
- $pass='root';
- $dbName='journal';//数据可名称
- $charSet='utf8';
- $port='3306';
- $conn=mysql_connect($host,$user,$padd);
- if(!$conn){
- echo 'unable to connect to DB '.mysql_error();
- exit();
- }
- query('use '.$db);
+
+ public function tttt() {
+ $host = "localhost"; //mysql服务器地址
+ $user = 'root';
+ $pass = 'root';
+ $dbName = 'journal'; //数据可名称
+ $charSet = 'utf8';
+ $port = '3306';
+ $conn = mysql_connect($host, $user, $padd);
+ if (!$conn) {
+ echo 'unable to connect to DB ' . mysql_error();
+ exit();
+ }
+ query('use ' . $db);
- $sql = "select * from j_user limit 1";//这里是sql语句
+ $sql = "select * from j_user limit 1"; //这里是sql语句
- $res = getAll($sql);
+ $res = getAll($sql);
- echo '';
- var_dump($res);
- echo '
';
+ echo '';
+ var_dump($res);
+ echo '
';
}
-
-
/**
* @title 添加期刊订阅
@@ -1077,7 +1130,7 @@ class Journal extends Controller {
$insert['journal_id'] = $data['journal_id'];
$insert['email'] = $data['email'];
$id = $this->subscribe_journal_obj->insertGetId($insert);
- $journal_info = $this->journal_obj->where("journal_id",$data['journal_id'])->find();
+ $journal_info = $this->journal_obj->where("journal_id", $data['journal_id'])->find();
//发送邮件感谢
$tt = 'Dear Researcher,
';
$tt .= 'Welcome you to the email alert for the latest research and more. Thank you for your interest in our publications and topics.
';
@@ -1087,7 +1140,7 @@ class Journal extends Controller {
$tt .= 'Email: publisher@tmrjournals.com';
$tt .= 'www.tmrjournals.com';
$maidata['email'] = $data['email'];
- $maidata['title'] = $journal_info['title']." ISSN ".$journal_info['issn'];//'Traditional Medicine Research ISSN 2413-3973';
+ $maidata['title'] = $journal_info['title'] . " ISSN " . $journal_info['issn']; //'Traditional Medicine Research ISSN 2413-3973';
$maidata['content'] = $tt;
$maidata['tmail'] = 'publicrelations@tmrjournals.com';
$maidata['tpassword'] = 'pRWU999999';
@@ -1095,7 +1148,7 @@ class Journal extends Controller {
return jsonSuccess([]);
}
-
+
/**
* @title 添加期刊订阅通过issn
* @description 添加期刊订阅通过issn
@@ -1106,9 +1159,9 @@ class Journal extends Controller {
* @param name:issn type:string require:1 desc:issn号
* @param name:email type:string require:1 desc:邮件地址
*/
- public function addSubscribeByIssn(){
+ public function addSubscribeByIssn() {
$data = $this->request->post();
- $journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
+ $journal_info = $this->journal_obj->where('issn', $data['issn'])->find();
//去重
$repeat = $this->subscribe_journal_obj
->where('journal_id', $journal_info['journal_id'])
@@ -1130,7 +1183,7 @@ class Journal extends Controller {
$tt .= 'Email: publisher@tmrjournals.com';
$tt .= 'www.tmrjournals.com';
$maidata['email'] = $data['email'];
- $maidata['title'] = $journal_info['title']." ISSN ".$journal_info['issn'];//'Traditional Medicine Research ISSN 2413-3973';
+ $maidata['title'] = $journal_info['title'] . " ISSN " . $journal_info['issn']; //'Traditional Medicine Research ISSN 2413-3973';
$maidata['content'] = $tt;
$maidata['tmail'] = 'publicrelations@tmrjournals.com';
$maidata['tpassword'] = 'pRWU999999';
@@ -1138,15 +1191,15 @@ class Journal extends Controller {
return jsonSuccess([]);
}
-
- public function pushEmail(){
+
+ public function pushEmail() {
die;
- $list = $this->subscribe_journal_obj->where('journal_id',1)->select();
-
+ $list = $this->subscribe_journal_obj->where('journal_id', 1)->select();
+
// $a = [];
// $a[] = ['email'=>'751475802@qq.com'];
// $a[] = ['email'=>'13662001490@126.com'];
- foreach ($list as $v){
+ foreach ($list as $v) {
$tt = 'Dear Researcher,
';
$tt .= 'We are so kindly to bring you a notice that we are glad to invite eminent people as the Reviewer for Traditional Medicine Research (ISSN 2413-3973).
';
$tt .= '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, ect.
';
@@ -1165,7 +1218,7 @@ class Journal extends Controller {
Queue::push('app\api\job\mail@fire', $maidata, "mail");
}
}
-
+
/**
* @title 获取期刊主页分期信息
* @description 获取期刊主页分期信息
@@ -1177,16 +1230,16 @@ class Journal extends Controller {
*
* @return stages:分期信息#
*/
- public function getMainPageStages(){
+ public function getMainPageStages() {
$data = $this->request->post();
- $frag=[];
- $list = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('stage_year', date("Y"))->where('is_publish',1)->where('state',0)->order("stage_no desc")->select();
- if(count($list)==0){
- $frag = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('stage_year', date("Y",strtotime("-1 year")))->where('is_publish',1)->where('state',0)->order("stage_no desc")->select();
- }else{
+ $frag = [];
+ $list = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('stage_year', date("Y"))->where('is_publish', 1)->where('state', 0)->order("stage_no desc")->select();
+ if (count($list) == 0) {
+ $frag = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('stage_year', date("Y", strtotime("-1 year")))->where('is_publish', 1)->where('state', 0)->order("stage_no desc")->select();
+ } else {
$frag = $list;
}
-
+
$re['stages'] = $frag;
return jsonSuccess($re);
}
@@ -1219,10 +1272,10 @@ class Journal extends Controller {
$insert['topic_id'] = $v;
$insert['email'] = $data['email'];
$id = $this->subscribe_topic_obj->insertGetId($insert);
- $cache_info = $this->journal_topic_obj->where('journal_topic_id',$v)->find();
- $str .= 'Unsubscribe topic->'.$cache_info['title'].'
';
+ $cache_info = $this->journal_topic_obj->where('journal_topic_id', $v)->find();
+ $str .= 'Unsubscribe topic->' . $cache_info['title'] . '
';
}
- if($str==''){
+ if ($str == '') {
return jsonError('repeat subscribe!');
}
//发送邮件感谢
@@ -1282,7 +1335,7 @@ class Journal extends Controller {
$res = Queue::push('app\api\job\mail@fire', $maidata, "mail");
return jsonSuccess([]);
}
-
+
/**
* @title 添加通用话题订阅
* @description 添加通用话题订阅
@@ -1293,7 +1346,7 @@ class Journal extends Controller {
* @param name:base_topic_id type:int require:1 desc:期刊话题id
* @param name:email type:string require:1 desc:邮箱地址
*/
- public function addSubscribeBaseTopic(){
+ public function addSubscribeBaseTopic() {
$data = $this->request->post();
//去重
$repeat = $this->subscribe_base_topic_obj
@@ -1323,14 +1376,14 @@ class Journal extends Controller {
Queue::push('app\api\job\mail@fire', $maidata, "mail");
return jsonSuccess([]);
}
-
+
public function UnsubscribeTopic($snum) {
$this->subscribe_topic_obj->where('subscribe_topic_id', $snum)->update(['state' => 1]);
echo 'Unsubscribe successfully!';
}
-
- public function UnsubscribeBaseTopic($snum){
- $this->subscribe_base_topic_obj->where('subscribe_base_topic_id',$snum)->update(['state'=>1]);
+
+ public function UnsubscribeBaseTopic($snum) {
+ $this->subscribe_base_topic_obj->where('subscribe_base_topic_id', $snum)->update(['state' => 1]);
echo 'Unsubscribe successfully!';
}
@@ -1373,7 +1426,7 @@ class Journal extends Controller {
public function searchArticle() {
$data = $this->request->post();
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
- $arts = $this->article_author_obj->where('state', 0)->where("author_name like '%" . str_replace("'","''",trim($data['keyword'])) . "%'")->column('article_id');
+ $arts = $this->article_author_obj->where('state', 0)->where("author_name like '%" . str_replace("'", "''", trim($data['keyword'])) . "%'")->column('article_id');
$list = $this->article_obj
->where('journal_id', $data['journal_id'])
->where('state', 0)
@@ -1381,9 +1434,9 @@ class Journal extends Controller {
// ->where('title like "%' . str_replace("'","''",trim($data['keyword'])) . '%" or abstract like "%' . str_replace("'","''",trim($data['keyword'])) . '%" or keywords like "%' . str_replace("'","''",trim($data['keyword'])) . '%"')
->where(function($query)use($arts, $data) {
$query->where('article_id', 'in', $arts)
- ->whereOr("`title` like '%" . str_replace("'","''",trim($data['keyword'])) . "%' or `abstract` like '%" . str_replace("'","''",trim($data['keyword'])) . "%' or `keywords` like '%" . str_replace("'","''",trim($data['keyword'])) . "%'");
+ ->whereOr("`title` like '%" . str_replace("'", "''", trim($data['keyword'])) . "%' or `abstract` like '%" . str_replace("'", "''", trim($data['keyword'])) . "%' or `keywords` like '%" . str_replace("'", "''", trim($data['keyword'])) . "%'");
})
- ->orderRaw("(CASE WHEN title LIKE '%" . str_replace("'","''",trim($data['keyword'])) . "%' THEN 1 ELSE 0 END) desc")
+ ->orderRaw("(CASE WHEN title LIKE '%" . str_replace("'", "''", trim($data['keyword'])) . "%' THEN 1 ELSE 0 END) desc")
->limit($limit_start, $data['pageSize'])
->select();
$count = $this->article_obj
@@ -1391,7 +1444,7 @@ class Journal extends Controller {
->where('state', 0)
->where(function($query)use($arts, $data) {
$query->where('article_id', 'in', $arts)
- ->whereOr('title|abstract|keywords', 'like', '%' . str_replace("'","''",trim($data['keyword'])) . '%');
+ ->whereOr('title|abstract|keywords', 'like', '%' . str_replace("'", "''", trim($data['keyword'])) . '%');
})
->count();
@@ -1404,8 +1457,8 @@ class Journal extends Controller {
$list[$k]['stage'] = $stage_info;
//组合cite信息
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
- $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
- $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic','j_journal_topic.journal_topic_id = j_article_to_topic.topic_id','left')->where('j_article_to_topic.article_id',$v['article_id'])->where('j_article_to_topic.state',0)->select();
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
$list[$k]['cite'] = $cite;
@@ -1466,8 +1519,8 @@ class Journal extends Controller {
$list[$k]['journal'] = $journal_info;
//组合cite信息
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
- $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
- $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic','j_journal_topic.journal_topic_id = j_article_to_topic.topic_id','left')->where('j_article_to_topic.article_id',$v['article_id'])->where('j_article_to_topic.state',0)->select();
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
$list[$k]['cite'] = $cite;
@@ -1485,7 +1538,7 @@ class Journal extends Controller {
$re['count'] = $count;
return jsonSuccess($re);
}
-
+
/**
* @title 编委国际化
* @description 编委国际化
@@ -1513,7 +1566,6 @@ class Journal extends Controller {
$re['country'] = $frag;
return jsonSuccess($re);
}
-
/**
* @title 查找文章精确查找
@@ -1601,7 +1653,7 @@ class Journal extends Controller {
$list[$k]['journal'] = $journal_info;
//组合cite信息
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
- $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
$list[$k]['cite'] = $cite;
$list[$k]['authortitle'] = $this->getAuthor($v);
//斜体变红
@@ -1700,8 +1752,8 @@ class Journal extends Controller {
$list[$k]['journal'] = $journal_info;
//组合cite信息
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
- $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
- $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic','j_journal_topic.journal_topic_id = j_article_to_topic.topic_id','left')->where('j_article_to_topic.article_id',$v['article_id'])->where('j_article_to_topic.state',0)->select();
+ $cite = $v['abbr'] . '. ' . $v['title'] . '. ' . choiseJabbr($v['article_id'], $journal_info['jabbr']) . '. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
+ $cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
$list[$k]['cite'] = $cite;
diff --git a/application/api/controller/Main.php b/application/api/controller/Main.php
index 59b53b5..7f4d2af 100644
--- a/application/api/controller/Main.php
+++ b/application/api/controller/Main.php
@@ -193,6 +193,17 @@ class Main extends Controller {
}
$list[$k]['title'] = $cache_title;
}
+
+ //连续出版判断,决定是否显示出版时间
+ foreach ($list as $k => $v){
+ $ca_stage = $this->journal_stage_obj->where('journal_stage_id',$v['journal_stage_id'])->find();
+ if(($v['journal_id']==2&&$ca_stage['stage_year']>=2022)||($v['journal_id']==18&&$ca_stage['stage_year']>=2022)||($v['journal_id']==17&&$ca_stage['stage_year']>=2019)){
+ $list[$k]['isShowOtime'] = 1;
+ }else{
+ $list[$k]['isShowOtime'] = 0;
+ }
+ }
+
// foreach ($list as $k => $v) {
// $list[$k]['authortitle'] = $this->getAuthor($v);
// }
@@ -286,6 +297,15 @@ class Main extends Controller {
}
$list[$k]['title'] = $cache_title;
}
+ //连续出版判断,决定是否显示出版时间
+ foreach ($list as $k => $v){
+ $ca_stage = $this->journal_stage_obj->where('journal_stage_id',$v['journal_stage_id'])->find();
+ if(($v['journal_id']==2&&$ca_stage['stage_year']>=2022)||($v['journal_id']==18&&$ca_stage['stage_year']>=2022)||($v['journal_id']==17&&$ca_stage['stage_year']>=2019)){
+ $list[$k]['isShowOtime'] = 1;
+ }else{
+ $list[$k]['isShowOtime'] = 0;
+ }
+ }
$re['articles'] = $list;
return jsonSuccess($re);
}
From c337259d25b91d2a3fc9e2b2b6c85bbb7218ccbb Mon Sep 17 00:00:00 2001
From: wangjinlei <751475802@qq.com>
Date: Sun, 20 Mar 2022 17:26:46 +0800
Subject: [PATCH 3/4] 20201112
---
application/api/controller/Journal.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/application/api/controller/Journal.php b/application/api/controller/Journal.php
index f003465..dc5b563 100644
--- a/application/api/controller/Journal.php
+++ b/application/api/controller/Journal.php
@@ -788,6 +788,10 @@ class Journal extends Controller {
->where('j_article.state', 0)
->where('j_journal_stage.is_publish', 1)
->count();
+
+ if($count>50){//只显示前50片
+ $count = 50;
+ }
//获取作者
foreach ($list as $k => $v) {
From 2a23e905e503be8da5ca6d4d111712113ceacadc Mon Sep 17 00:00:00 2001
From: "DESKTOP-B7F3Q04\\admin" <18722597581>
Date: Mon, 21 Mar 2022 13:43:16 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=96=E5=A7=94?=
=?UTF-8?q?=E4=BC=9A=E5=9C=B0=E5=9D=80editor=5Fid?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/master/controller/Journal.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/application/master/controller/Journal.php b/application/master/controller/Journal.php
index d81d569..cf3c20b 100644
--- a/application/master/controller/Journal.php
+++ b/application/master/controller/Journal.php
@@ -148,6 +148,7 @@ class Journal extends Controller {
$insert_data['editor_id'] = $data['editor_id'];
$insert_data['system_color'] = $data['system_color'];
$insert_data['submission_url'] = $data['submission_url'];
+ $insert_data['board_url'] = $data['board_url'];
$res = $this->journal_obj->insert($insert_data);
if($res){
return json(['code'=>0,'msg'=>'success']);
@@ -225,6 +226,7 @@ class Journal extends Controller {
$insert_data['editor_id'] = $data['editor_id'];
$insert_data['system_color'] = $data['system_color'];
$insert_data['submission_url'] = $data['submission_url'];
+ $insert_data['board_url'] = $data['board_url'];
$res = $this->journal_obj->where('journal_id',$data['journal_id'])->update($insert_data);
// if($res){
return json(['code'=>0,'msg'=>'success']);