调试微信授权登录

This commit is contained in:
luofei 2024-03-09 16:39:38 +08:00
parent 60221e78e4
commit 879e56c3a5

View File

@ -940,7 +940,7 @@ class Auth extends BaseController
if ($code && ($info = app()->make(RoutineQrcodeRepository::class)->getRoutineQrcodeFindType($code))) {
$auth['auth']['spread'] = $info['third_id'];
}
if (!$user || empty($user['account'])) {
if (!$user || empty($user['account']) || empty($user['phone'])) {
$uni = uniqid(true, false) . random_int(1, 100000000);
$key = 'U' . md5(time() . $uni);
Cache::set('u_try' . $key, ['id' => $authInfo['wechat_user_id'], 'type' => $authInfo['user_type'], 'spread' => $auth['auth']['spread'] ?? 0], 3600);