更新userinfo 带group_id
This commit is contained in:
parent
1b7fae2bd1
commit
e38a650f78
@ -37,6 +37,7 @@ use think\db\exception\DbException;
|
|||||||
use think\db\exception\ModelNotFoundException;
|
use think\db\exception\ModelNotFoundException;
|
||||||
use think\exception\ValidateException;
|
use think\exception\ValidateException;
|
||||||
use think\facade\Cache;
|
use think\facade\Cache;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -133,6 +134,12 @@ class Auth extends BaseController
|
|||||||
$data['total_consume'] = $user['pay_price'];
|
$data['total_consume'] = $user['pay_price'];
|
||||||
$data['extension_status'] = systemConfig('extension_status');
|
$data['extension_status'] = systemConfig('extension_status');
|
||||||
if (systemConfig('member_status')) $data['member_icon'] = $this->request->userInfo()->member->brokerage_icon ?? '';
|
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);
|
return app('json')->success($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user