接口调整

This commit is contained in:
chengxl
2025-10-14 16:20:39 +08:00
parent 1e8949007f
commit 6286bb0bdb

View File

@@ -580,7 +580,7 @@ class Proofread extends Base
$aWhere['state'] = 0;
$aWhere['am_id'] = $iAmId;
$aArticleMain = Db::table('t_article_main')->field('am_id,content,type,is_h1,is_h2,is_h3,ami_id,amt_id')->where($aWhere)->find();
if(empty($aArticleMain)){
if(empty($aArticleMain['content'])){
return json_encode(array('status' => 5,'msg' => 'The content of the article is empty'));
}
//写入校对行队列
@@ -635,9 +635,6 @@ class Proofread extends Base
return json_encode(array('status' => 6,'msg' => 'The proofreading content is empty'));
}
$aResult = $oProofReadService->proofread($aArticleMain['content']);
if(empty($aResult)){
return json_encode(array('status' => 7,'msg' => 'Failed to obtain proofreading content'));
}
//数据处理
$aError = empty($aResult['errors']) ? [] : $aResult['errors'];
if(empty($aError)){