方法新增

This commit is contained in:
chengxl
2026-02-12 13:28:24 +08:00
parent f14e8f1fa9
commit 39409b3bde

View File

@@ -198,5 +198,36 @@ class Supplementary extends Controller
$aJournal = Db::name('journal')->where($aWhere)->find();
return json(['status' => 1,'msg' => 'success','data' => $aJournal]);
}
/**
* @title 获取文章底部信息
* @description 获取期刊编辑接口
*/
public function getProductiArticleFooter(){
$aParam = $this->request->post();
//官网文章ID
$iWarticleId = empty($aParam['w_article_id']) ? 0 : $aParam['w_article_id'];
if(empty($iWarticleId)){
return json(['status' => 2,'msg' => 'Please select an article']);
}
//查询文章信息
$aWhere = ['article_id' => $iWarticleId,'state' => ['<>',1]];
$aArticle = Db::name('article')->field('article_id,journal_id,journal_stage_id')->where($aWhere)->find();
if(empty($aArticle)){
return json(['status' => 3,'msg' => 'No production article information found']);
}
//查询分期信息
$iJournalStageId = empty($aArticle['journal_stage_id']) ? 0 : $aArticle['journal_stage_id'];
$aWhere = ['state' => 0,'journal_stage_id' => $iJournalStageId];
$aJournalStage = Db::name('journal_stage')->where($aWhere)->find();
//查询文章生产信息
$sUrl = "http://api.tmrjournals.com/public/index.php/api/Supplementary/getProductiArticleFooter";//http://zmzm.tougao.dev.com
$aResult = json_decode(myPost($sUrl, ['w_article_id' => $iWarticleId,'journal_stage' => $aJournalStage]), true);
return json($aResult);
}
}
?>