1
This commit is contained in:
@@ -650,6 +650,37 @@ class Article extends Controller
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getArticleDetail(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$detail = $this->article_obj->where("article_id",$data['article_id'])->find();
|
||||
|
||||
$detail['has_html'] = hasHtml($data['article_id']);
|
||||
|
||||
$re['detail'] = $detail;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function changeArticleType2(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$this->article_obj->where("article_id",$data['article_id'])->update(['html_type'=>2]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取online文章列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user