This commit is contained in:
wangjinlei
2021-02-25 15:03:13 +08:00
parent 540a2d7579
commit 49979c23f5
3 changed files with 90 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ class Main extends Controller {
protected $article_to_topic_obj = '';
protected $sys_scient_obj = '';
protected $sys_book_obj = '';
protected $sys_not_obj = '';
protected $article_ltai_obj = '';
public function __construct(\think\Request $request = null) {
@@ -39,6 +40,7 @@ class Main extends Controller {
$this->article_to_topic_obj = Db::name('article_to_topic');
$this->sys_scient_obj = Db::name('system_scient');
$this->sys_book_obj = Db::name('system_books');
$this->sys_not_obj = Db::name('system_notices');
$this->article_ltai_obj = Db::name('article_ltai');
}
@@ -352,6 +354,21 @@ class Main extends Controller {
return jsonError('no highlights');
}
}
/**
* @title 获取notices列表
* @description 获取notices列表
* @author wangjinlei
* @url /api/Main/getAllNotices
* @method POST
*
* @return notices:array#
*/
public function getAllNotices(){
$list = $this->sys_not_obj->where('state',0)->order('system_notices_id desc')->select();
$re['notices'] = $list;
return jsonSuccess($re);
}
/**
* @title 获取期刊列表