diff --git a/app/data/controller/api/Data.php b/app/data/controller/api/Data.php index 21044a29d..415379272 100644 --- a/app/data/controller/api/Data.php +++ b/app/data/controller/api/Data.php @@ -11,6 +11,19 @@ use think\admin\Controller; */ class Data extends Controller { + + /** + * 获取指定数据对象 + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function getData() + { + $data = $this->_vali(['name.require' => '数据名称不能为空!']); + $this->success('获取数据对象', sysdata($data['name'])); + } + /** * 获取轮播图片数据 * @throws \think\db\exception\DataNotFoundException @@ -20,7 +33,7 @@ class Data extends Controller public function getSlider() { $data = sysdata(input('keys', 'slider')); - $this->success('获取轮播图片数据', $data); + $this->success('获取轮播图片', $data); } /** @@ -36,6 +49,6 @@ class Data extends Controller if (($id = input('id')) > 0) { $this->app->db->name('BaseUserMessage')->where(['id' => $id])->inc('num_read')->update(); } - $this->success('获取系统通知数据', $result); + $this->success('获取系统通知', $result); } } \ No newline at end of file