diff --git a/app/controller/api/Common.php b/app/controller/api/Common.php index b09a12f9..e9e5c43a 100644 --- a/app/controller/api/Common.php +++ b/app/controller/api/Common.php @@ -89,6 +89,25 @@ class Common extends BaseController return app('json')->success($repository->options()); } + + /** + * 查询组合数据 + */ + public function system_group_value($name) + { + $group_id = Db::name('system_group')->where('group_key', $name)->value('group_id'); + $data = []; + if ($group_id) { + $select = Db::name('system_group_data')->where('group_id', $group_id) + ->limit(100)->select(); + foreach ($select as $k => $v) { + $data[$k] = json_decode($v['value'], true); + } + } + return app('json')->success($data); + } + + public function menus() { return app('json')->success([ diff --git a/route/api.php b/route/api.php index 57416a5b..bfc7df16 100644 --- a/route/api.php +++ b/route/api.php @@ -25,6 +25,7 @@ Route::group('api/', function () { Route::any('applet', 'api.Common/applet'); Route::any('promote_writing', 'api.Common/promoteWriting'); Route::get('business/agree', 'api.Auth/businessAgree'); + Route::any('system_group_value', 'api.Common/system_group_value'); //强制登录 Route::group(function () { Route::group('v2', function () {