From e38a650f7853bf8e16aedb2ca647d5063cec1aaa Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 3 Jan 2023 16:08:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0userinfo=20=E5=B8=A6group=5Fi?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 401a18b3..0cb463ac 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -37,6 +37,7 @@ use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; use think\exception\ValidateException; use think\facade\Cache; +use think\facade\Db; /** @@ -133,6 +134,12 @@ class Auth extends BaseController $data['total_consume'] = $user['pay_price']; $data['extension_status'] = systemConfig('extension_status'); if (systemConfig('member_status')) $data['member_icon'] = $this->request->userInfo()->member->brokerage_icon ?? ''; + $find=Db::name('nk_user')->where('user_id',$user['uid'])->find(); + if ($find){ + $data['group_id']=$find['group_id']; + }else{ + $data['group_id']=1; + } return app('json')->success($data); }