Ken 3 өдөр өмнө
parent
commit
3a4edc1807

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