调试微信授权登录

This commit is contained in:
luofei 2024-03-09 16:47:06 +08:00
parent 2b56e360df
commit fc78d3af34

View File

@ -1696,7 +1696,7 @@ class Auth extends BaseController
return app('json')->fail('授权已过期,请重新登录'); return app('json')->fail('授权已过期,请重新登录');
} }
$user = $repository->wechatUserIdBytUser($auth['id']); $user = $repository->wechatUserIdBytUser($auth['id']);
if (!empty($user['account'])) { if (!empty($user['account']) && !empty($user['phone'])) {
return app('json')->fail('已绑定手机号'); return app('json')->fail('已绑定手机号');
} }
$targetUser = $repository->accountByUser($data['phone']); $targetUser = $repository->accountByUser($data['phone']);