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()); + } } }