优化
This commit is contained in:
@@ -221,12 +221,13 @@ class AuthLogic
|
||||
throw new BusinessException('授权失败,请重试');
|
||||
}
|
||||
|
||||
User::firstOrCreate(['union_id'=>$userInfo['data']['union_id']],[
|
||||
$user = User::firstOrCreate(['union_id'=>$userInfo['data']['union_id']],[
|
||||
'union_id'=>$userInfo['data']['union_id'],
|
||||
'name'=>$userInfo['data']['name'],
|
||||
'app_id'=>$data['app_id'],
|
||||
'avatar'=>$userInfo['data']['avatar_url']??'',
|
||||
]);
|
||||
$data['role'] = $user['role'];
|
||||
return $userInfo['data'] + $data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user