This commit is contained in:
wangjinlei
2020-11-30 09:21:34 +08:00
parent 7cc88ab176
commit 446bc20fff
2 changed files with 21 additions and 1 deletions

View File

@@ -95,6 +95,21 @@ class Article extends Controller {
}
}
/**
* @title 删除文章
* @description 删除文章
* @author wangjinleichang
* @url /master/Article/delArticle
* @method POST
*
* @param name:article_id type:int require:1 desc:文章id
*/
public function delArticle(){
$data = $this->request->post();
$res = $this->article_obj->where('article_id',$data['article_id'])->update(['state'=>1]);
return json(['code'=>0,'msg'=>'success']);
}
/**
* @title 添加文章作者
* @description 添加文章作者

View File

@@ -269,7 +269,12 @@ class Journal extends Controller {
*/
public function editTopic(){
$data = $this->request->post();
$res = $this->journal_topic_obj->update($data);
$update['journal_topic_id'] = $data['journal_topic_id'];
$update['title'] = $data['title'];
$update['icon'] = $data['icon'];
$update['is_final'] = $data['is_final'];
$update['sort'] = $data['sort'];
$res = $this->journal_topic_obj->update($update);
if($res){
return json(['code'=>0,'msg'=>'success']);
}else{