This commit is contained in:
2026-01-16 14:29:48 +08:00
parent 00787bebfe
commit 1f3d66c58e
7 changed files with 19 additions and 1482 deletions
+2 -1
View File
@@ -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;
}