This commit is contained in:
wangjinlei
2023-06-09 08:59:33 +08:00
parent 09a2f3231f
commit f2fcabbaa5
8 changed files with 148 additions and 36 deletions

View File

@@ -74,6 +74,26 @@ function choiseJabbr($article_id,$jabbr){
return $jabbr;
}
function getArticleMains($article_id){
$article_main_obj = Db::name("article_main");
$list = $article_main_obj->where('article_id',$article_id)->where('state',0)->where('is_add',0)->select();
$frag = [];
foreach ($list as $v){
$frag[] = $v;
$pre = $v['article_main_id'];
while ($pre!=0){
$ca = $article_main_obj->where("pre_id",$pre)->where('state',0)->find();
if($ca){
$frag[] = $ca;
$pre = $ca['article_main_id'];
}else{
$pre = 0;
}
}
}
return $frag;
}
function choiseJtitle($list){
foreach ($list as $k => $v){
$list[$k]['journal_title'] = choiseti($v);