diff --git a/application/api/controller/Aiarticle.php b/application/api/controller/Aiarticle.php index c273f46..3585b9c 100644 --- a/application/api/controller/Aiarticle.php +++ b/application/api/controller/Aiarticle.php @@ -651,17 +651,22 @@ class Aiarticle extends Base //获取文章内容 $aResult = json_decode($this->getArticle($iArticleId),true); - if($aResult['status'] != 1){ - return json_encode($aResult); - } //获取数据 $aArticleContent = empty($aResult['data']) ? [] : $aResult['data']; + if(empty($aArticleContent)){ + return json_encode($aResult); + } //文章数据 $aArticle = empty($aArticleContent['article']) ? [] : $aArticleContent['article']; - + if(empty($aArticle)){ + return json_encode(['status' => 4,'msg' => 'Article data is empty']); + } //期刊数据 $aJournal = empty($aArticleContent['journal']) ? [] : $aArticleContent['journal']; + if(empty($aJournal)){ + return json_encode(['status' => 4,'msg' => 'Journal data is empty']); + } //子期刊数据 $aJournalStage = empty($aArticleContent['journal_stage']) ? [] : $aArticleContent['journal_stage'];