diff --git a/app/common/logic/AuthLogic.php b/app/common/logic/AuthLogic.php index 4e9c0ac..0eb0eeb 100644 --- a/app/common/logic/AuthLogic.php +++ b/app/common/logic/AuthLogic.php @@ -223,7 +223,7 @@ class AuthLogic 'union_id'=>$userInfo['data']['union_id'], 'name'=>$userInfo['data']['name'], 'app_id'=>$data['app_id'], - 'avatar'=>$userInfo['avatar_url'] + 'avatar'=>$userInfo['data']['avatar_url']??'', ]); return $userInfo['data'] + $data; } diff --git a/app/common/service/UsedCarService.php b/app/common/service/UsedCarService.php index 3b26bbf..804c980 100644 --- a/app/common/service/UsedCarService.php +++ b/app/common/service/UsedCarService.php @@ -141,7 +141,11 @@ class UsedCarService $asc = ord($s[0]); if ($asc >= 65 && $asc <= 90) return $char; - + + // 转码失败或长度不足 + if ($s === false || strlen($s) < 2) { + return ''; + } $code = ord($s[0]) * 256 + ord($s[1]) - 65536; $map = [ diff --git a/app/common/utils/pdf/template/usedCar.stub b/app/common/utils/pdf/template/usedCar.stub index fb1dc22..ed10ee5 100644 --- a/app/common/utils/pdf/template/usedCar.stub +++ b/app/common/utils/pdf/template/usedCar.stub @@ -87,7 +87,7 @@ 里程 - + 马力