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