From 4b9f612cbdc31ff2512619051ca49f96ef171dba Mon Sep 17 00:00:00 2001 From: lanzu_qinsheng <334039090@qq.com> Date: Wed, 16 Sep 2020 16:07:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E9=80=81=E5=91=98=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=97=B6=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/LanzuServiceHorseman.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Models/LanzuServiceHorseman.php b/app/Models/LanzuServiceHorseman.php index 868cde9..8fba949 100644 --- a/app/Models/LanzuServiceHorseman.php +++ b/app/Models/LanzuServiceHorseman.php @@ -33,10 +33,11 @@ class LanzuServiceHorseman extends Model //获取骑手名称 if ($hid){ $horseman = LanzuServiceHorseman::find($hid); - return $horseman->name; - }else{ - return '--'; + if ($horseman){ + return $horseman->name; + } } + return '--'; } }