main bug 修复
This commit is contained in:
@@ -2316,17 +2316,17 @@ class Article extends Base
|
||||
}
|
||||
|
||||
|
||||
public function testArticleImageEx(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$this->addArticleMainEx($data['article_id']);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
// public function testArticleImageEx(){
|
||||
// $data = $this->request->post();
|
||||
// $rule = new Validate([
|
||||
// "article_id"=>"require"
|
||||
// ]);
|
||||
// if(!$rule->check($data)){
|
||||
// return jsonError($rule->getError());
|
||||
// }
|
||||
// $this->addArticleMainEx($data['article_id']);
|
||||
// return jsonSuccess([]);
|
||||
// }
|
||||
|
||||
|
||||
public function getArticleImages(){
|
||||
|
||||
@@ -414,13 +414,13 @@ class Base extends Controller
|
||||
|
||||
|
||||
//将主体内容写入数据库
|
||||
foreach ($frag['main'] as $v) {
|
||||
$ca['p_article_id'] = $p_article_id;
|
||||
$ca['content'] = $v;
|
||||
$ca['content_g'] = '';
|
||||
$ca['ctime'] = time();
|
||||
$this->production_article_main_obj->insert($ca);
|
||||
}
|
||||
// foreach ($frag['main'] as $v) {
|
||||
// $ca['p_article_id'] = $p_article_id;
|
||||
// $ca['content'] = $v;
|
||||
// $ca['content_g'] = '';
|
||||
// $ca['ctime'] = time();
|
||||
// $this->production_article_main_obj->insert($ca);
|
||||
// }
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
@@ -428,6 +428,13 @@ class Base extends Controller
|
||||
|
||||
public function addArticleMainEx($article_id){
|
||||
$article_info = $this->article_obj->where('article_id', $article_id)->find();
|
||||
|
||||
$check = $this->article_main_obj->where("article_id",$article_id)->whereIn("state",[0,2])->find();
|
||||
if($check){
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
$files = $this->article_file_obj
|
||||
->where('article_id', $article_info['article_id'])
|
||||
->where('type_name', 'manuscirpt')
|
||||
|
||||
Reference in New Issue
Block a user