测试问题修改

This commit is contained in:
chengxl
2025-11-07 16:51:56 +08:00
parent 667beda16b
commit c244d9805c

View File

@@ -91,11 +91,11 @@ class Contribute extends Base
return json_encode(['status' => 6,'msg' => 'The article title is empty']);
}
//查询标题是否存在
// $aWhere += ['title' => trim($aData['title']),'state' => ['<>',3]];
// $aArticle = Db::name('article')->field('article_id')->where($aWhere)->find();
// if(!empty($aArticle)){
// return json_encode(['code' => 7, 'msg' => 'Warning: you are re-submitting the article!']);
// }
$aWhere += ['title' => trim($aData['title']),'state' => ['<>',3]];
$aArticle = Db::name('article')->field('article_id')->where($aWhere)->find();
if(!empty($aArticle)){
return json_encode(['code' => 7, 'msg' => 'Warning: you are re-submitting the article!']);
}
//数据入库
$aData += $aParam;
$result = $this->_addData($aData);