This commit is contained in:
wangjinlei
2025-01-16 14:17:24 +08:00
parent 35048be7b1
commit 4c8331ee91
2 changed files with 89 additions and 42 deletions

View File

@@ -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文章列表
*/