From 338354ee774d6b919f389ca94f526bad48b729f9 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Wed, 26 Jun 2024 16:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=94=B6=E9=93=B6=E5=8F=B0?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/SmsService.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/common/service/SmsService.php b/app/common/service/SmsService.php index aa18e526a..eac0e415e 100644 --- a/app/common/service/SmsService.php +++ b/app/common/service/SmsService.php @@ -47,7 +47,7 @@ class SmsService public function client($phone,$template,$code,$type = 0) { -// try{ + try{ $easySms = new EasySms($this->config); if($type){//预留发送到货短信 @@ -67,16 +67,17 @@ class SmsService 'code' => $code ], ]); - }d($res); + } if($res && $res['aliyun']['status'] == 'success'){ return true; }else{ return false; } -// }catch(NoGatewayAvailableException $e){ -// throw new BusinessException($e->getExceptions()); -// } + }catch(NoGatewayAvailableException $e){ + d($e); + throw new BusinessException($e->getExceptions()); + } } }