diff --git a/composer.json b/composer.json index 67fec5f..7404d7f 100644 --- a/composer.json +++ b/composer.json @@ -43,8 +43,7 @@ "qiniu/php-sdk": "^7.2", "upyun/sdk": "^3.4", "netease/nos-php-sdk": "^1.0", - "aws/aws-sdk-php": "^3.142", - "liguangchun/qyweixin-grouprobot": "^1.0" + "aws/aws-sdk-php": "^3.142" }, "require-dev": { "symfony/var-dumper": "^4.2" diff --git a/src/service/bin/qqwry.dat b/src/service/bin/qqwry.dat index f6a2d5f..08b2ba4 100644 Binary files a/src/service/bin/qqwry.dat and b/src/service/bin/qqwry.dat differ diff --git a/src/service/wechat/QyService.php b/src/service/wechat/QyService.php index 823acda..57cbe56 100644 --- a/src/service/wechat/QyService.php +++ b/src/service/wechat/QyService.php @@ -16,8 +16,6 @@ namespace DtApp\ThinkLibrary\service\wechat; -use DtApp\Notice\QyWeiXin\QyWeXinException; -use DtApp\Notice\QyWeiXin\Send; use DtApp\ThinkLibrary\exception\DtaException; use DtApp\ThinkLibrary\Service; use DtApp\ThinkLibrary\service\curl\HttpService; @@ -52,17 +50,16 @@ class QyService extends Service * 发送文本消息 * @param string $content 消息内容 * @return bool - * @throws DtaException|QyWeXinException + * @throws DtaException */ public function text(string $content = '') { $this->msgType = 'text'; - if (empty($this->key)) throw new DtaException("请检查KEY"); - $config = [ - 'key' => $this->key - ]; - $qywx = new Send($config); - return $qywx->text($content); + return $this->sendMsg([ + 'text' => [ + 'content' => $content, + ], + ]); } /** @@ -70,17 +67,15 @@ class QyService extends Service * @param string $content 消息内容 * @return bool * @throws DtaException - * @throws QyWeXinException */ public function markdown(string $content = '') { $this->msgType = 'markdown'; - if (empty($this->key)) throw new DtaException("请检查KEY"); - $config = [ - 'key' => $this->key - ]; - $qywx = new Send($config); - return $qywx->text($content); + return $this->sendMsg([ + 'markdown' => [ + 'content' => $content, + ], + ]); } /**