1
This commit is contained in:
@@ -167,32 +167,5 @@ class Submision extends Controller {
|
||||
return $frag;
|
||||
}
|
||||
|
||||
public function getArticleMains(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$mains = $this->article_main_obj->where('article_id',$data['article_id'])->where('state',0)->select();
|
||||
$re['mains'] = $mains;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function delArticleMain(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_main_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$this->article_main_obj->where('article_main_id',$data['article_main_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user