From df9a6802ba9d31a2ca094acaf4d65a23a089285a Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Tue, 28 Mar 2023 14:46:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/user/UserServices.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crmeb/app/services/user/UserServices.php b/crmeb/app/services/user/UserServices.php index 4720f16cd..408b5e9f9 100644 --- a/crmeb/app/services/user/UserServices.php +++ b/crmeb/app/services/user/UserServices.php @@ -1246,7 +1246,11 @@ class UserServices extends BaseServices $userInfo['birthday'] = $userInfo['birthday'] < 0 ? 0 : $userInfo['birthday']; if ($userInfo['addres'] == '') { $defaultAddressInfo = app()->make(UserAddressServices::class)->getUserDefaultAddress($uid); - $userInfo['addres'] = $defaultAddressInfo['province'] . $defaultAddressInfo['city'] . $defaultAddressInfo['district'] . $defaultAddressInfo['detail']; + if ($defaultAddressInfo) { + $userInfo['addres'] = $defaultAddressInfo['province'] . $defaultAddressInfo['city'] . $defaultAddressInfo['district'] . $defaultAddressInfo['detail']; + } else { + $userInfo['addres'] = ''; + } } $userInfo['vip_name'] = app()->make(SystemUserLevelServices::class)->value(['grade' => $userInfo['level']], 'name'); $userInfo['group_name'] = app()->make(UserGroupServices::class)->value(['id' => $userInfo['group_id']], 'group_name');