设置角色组

This commit is contained in:
Dev
2026-10-17 16:29:14 +08:00
parent 2d342bcbd7
commit 8a3f133488
8 changed files with 89 additions and 10 deletions
@@ -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();