|
@@ -8,7 +8,6 @@ use App\Libs\Utils;
|
|
|
use Exception;
|
|
|
use GuzzleHttp\Client;
|
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
|
-use http\Exception\InvalidArgumentException;
|
|
|
|
|
|
/**
|
|
|
* Vivo推送
|
|
@@ -102,10 +101,10 @@ class VPush
|
|
|
// 参数判断
|
|
|
$this->checkParam();
|
|
|
if (!$this->_taskId) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置taskId');
|
|
|
+ throw new Exception('VIVO推送必须要设置taskId');
|
|
|
}
|
|
|
if (!$this->_regId) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置regId');
|
|
|
+ throw new Exception('VIVO推送必须要设置regId');
|
|
|
}
|
|
|
|
|
|
$data = [
|
|
@@ -186,25 +185,25 @@ class VPush
|
|
|
}
|
|
|
|
|
|
if (!$this->_appId) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置appId');
|
|
|
+ throw new Exception('VIVO推送必须要设置appId');
|
|
|
}
|
|
|
if (!$this->_appKey) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置appKey');
|
|
|
+ throw new Exception('VIVO推送必须要设置appKey');
|
|
|
}
|
|
|
if (!$this->_appSecret) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置appSecret');
|
|
|
+ throw new Exception('VIVO推送必须要设置appSecret');
|
|
|
}
|
|
|
if (!$this->_accessToken) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置AccessToken');
|
|
|
+ throw new Exception('VIVO推送必须要设置AccessToken');
|
|
|
}
|
|
|
if (!$this->_title) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置title');
|
|
|
+ throw new Exception('VIVO推送必须要设置title');
|
|
|
}
|
|
|
if (!$this->_content) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置content');
|
|
|
+ throw new Exception('VIVO推送必须要设置content');
|
|
|
}
|
|
|
if (!$this->_timeToLive) {
|
|
|
- throw new InvalidArgumentException('VIVO推送必须要设置timeToLive');
|
|
|
+ throw new Exception('VIVO推送必须要设置timeToLive');
|
|
|
}
|
|
|
return $this;
|
|
|
}
|