- 更新IP数据库

- 更新企业微信服务
v6 v6.0.66
Chaim 4 years ago
parent f94c60fabd
commit 8addce2907

@ -43,8 +43,7 @@
"qiniu/php-sdk": "^7.2", "qiniu/php-sdk": "^7.2",
"upyun/sdk": "^3.4", "upyun/sdk": "^3.4",
"netease/nos-php-sdk": "^1.0", "netease/nos-php-sdk": "^1.0",
"aws/aws-sdk-php": "^3.142", "aws/aws-sdk-php": "^3.142"
"liguangchun/qyweixin-grouprobot": "^1.0"
}, },
"require-dev": { "require-dev": {
"symfony/var-dumper": "^4.2" "symfony/var-dumper": "^4.2"

Binary file not shown.

@ -16,8 +16,6 @@
namespace DtApp\ThinkLibrary\service\wechat; namespace DtApp\ThinkLibrary\service\wechat;
use DtApp\Notice\QyWeiXin\QyWeXinException;
use DtApp\Notice\QyWeiXin\Send;
use DtApp\ThinkLibrary\exception\DtaException; use DtApp\ThinkLibrary\exception\DtaException;
use DtApp\ThinkLibrary\Service; use DtApp\ThinkLibrary\Service;
use DtApp\ThinkLibrary\service\curl\HttpService; use DtApp\ThinkLibrary\service\curl\HttpService;
@ -52,17 +50,16 @@ class QyService extends Service
* 发送文本消息 * 发送文本消息
* @param string $content 消息内容 * @param string $content 消息内容
* @return bool * @return bool
* @throws DtaException|QyWeXinException * @throws DtaException
*/ */
public function text(string $content = '') public function text(string $content = '')
{ {
$this->msgType = 'text'; $this->msgType = 'text';
if (empty($this->key)) throw new DtaException("请检查KEY"); return $this->sendMsg([
$config = [ 'text' => [
'key' => $this->key 'content' => $content,
]; ],
$qywx = new Send($config); ]);
return $qywx->text($content);
} }
/** /**
@ -70,17 +67,15 @@ class QyService extends Service
* @param string $content 消息内容 * @param string $content 消息内容
* @return bool * @return bool
* @throws DtaException * @throws DtaException
* @throws QyWeXinException
*/ */
public function markdown(string $content = '') public function markdown(string $content = '')
{ {
$this->msgType = 'markdown'; $this->msgType = 'markdown';
if (empty($this->key)) throw new DtaException("请检查KEY"); return $this->sendMsg([
$config = [ 'markdown' => [
'key' => $this->key 'content' => $content,
]; ],
$qywx = new Send($config); ]);
return $qywx->text($content);
} }
/** /**

Loading…
Cancel
Save