From cf7b7b9661d42b83c63a185bf31dbcb23e0ed812 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Tue, 2 Dec 2025 11:30:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=98=B5=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/UserService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/common/service/UserService.php b/app/common/service/UserService.php index ffd2fdf..7c66bb5 100644 --- a/app/common/service/UserService.php +++ b/app/common/service/UserService.php @@ -250,13 +250,14 @@ class UserService $wechatService = new WechatService(); $wxinfo = $wechatService->xcxOpenid($data['code']); + $name = '微信用户_' . self::generate(8); // 用户信息 $user = User::firstOrCreate( ['openid' => $wxinfo['openid']], [ - 'nickname' => '微信用户_'.$wxinfo['openid'], + 'nickname' => $name, 'unionid' => $wxinfo['unionid'], - 'name' => '微信用户_' . self::generate(8), + 'name' => $name, 'avatar' => 'bsh_datax/user/20251021/a4ee815405a1506abeec1af0f738f70f_68f6e76514b66.jpg' ] );