提交 d994fe64 编写于 作者: 李光春's avatar 李光春

- 增加YY天气

- 公众号增加模板信息
上级 0b70ef17
......@@ -256,6 +256,24 @@ class WebApps extends Service
->toArray();
}
/**
* 发送模板消息
* @param array $data
* @return array|bool|mixed|string
* @throws CurlException
*/
public function messageTemplateSend(array $data = [])
{
// 获取数据
$accessToken = $this->getAccessToken();
$url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={$accessToken['access_token']}";
if (is_array($data)) $data = json_encode($data);
return HttpService::instance()
->url($url)
->data($data)
->toArray();
}
/**
* 获取access_token信息
* @return array|bool|mixed|string|string[]
......
<?php
namespace DtApp\ThinkLibrary\service\yytianqi;
/**
* YY天气
* http://www.yytianqi.com/api.html
* Class YyTiAnQiService
* @package DtApp\ThinkLibrary\service\yytianqi
*/
class YyTiAnQiService
{
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册