Ken 3 일 전
부모
커밋
3a4edc1807
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      app/Services/SmsService.php

+ 6 - 4
app/Services/SmsService.php

@@ -38,10 +38,12 @@ class SmsService
         $url .= "&c=" . urlencode($content);
         $url .= "&m=" . $phone;
         $res = file_get_contents($url);
-        if (!empty(static::$errors[$res])) {
-            throw new Exception(static::$errors[$res], HttpStatus::CUSTOM_ERROR);
-        }
-        if ($res != 0) throw new Exception("发送失败", HttpStatus::CUSTOM_ERROR);
+        $data['res'] = $res;
         return $data;
+//        if (!empty(static::$errors[$res])) {
+//            throw new Exception(static::$errors[$res], HttpStatus::CUSTOM_ERROR);
+//        }
+//        if ($res != 0) throw new Exception("发送失败", HttpStatus::CUSTOM_ERROR);
+//        return $data;
     }
 }