测试问题修改
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user