diff --git a/application/api/controller/Aiarticle.php b/application/api/controller/Aiarticle.php index 3d678b9..aae5c30 100644 --- a/application/api/controller/Aiarticle.php +++ b/application/api/controller/Aiarticle.php @@ -1022,6 +1022,13 @@ class Aiarticle extends Base return json_encode(['status' => 2, 'msg' => 'Please select an article']); } + //判断草稿箱是否上传 + $oMaterial = new Material; + $aLog = json_decode($oMaterial->getWechatLog(['article_id' => $iArticleId,'type' => 2,'status' =>1]),true); + if(!empty($aLog['data'])){ + return json_encode(['status' => 1,'msg' => 'Already uploaded to draft box','data' => []]); + } + //判断文章类型 $article_type = empty($aParam['article_type']) ? 'news' : $aParam['article_type']; if(!in_array($article_type, ['news','newspic'])){