设置角色组
This commit is contained in:
@@ -33,6 +33,7 @@ class Profile extends Api
|
||||
public function userCenter()
|
||||
{
|
||||
$userInfo = $this->auth->getUserinfo();
|
||||
$group = $this->auth->getUser()->group;
|
||||
$userInfo = [
|
||||
'id' => $userInfo['id'],
|
||||
'avatarUrl' => $userInfo['avatar'] ?: $this->request->domain() . '/uploads/avatar/default.png',
|
||||
@@ -40,6 +41,7 @@ class Profile extends Api
|
||||
'phoneNumber' => '',
|
||||
'gender' => $userInfo['gender'],
|
||||
'role' => $userInfo['role'],
|
||||
'group_name' => $group ? trim((string)$group['name']) : '',
|
||||
];
|
||||
$publishCount = DemandService::where('user_id', $userInfo['id'])->count();
|
||||
$quoteCount = DemandBiddingService::where(['user_id' => $userInfo['id']])->count();
|
||||
|
||||
Reference in New Issue
Block a user