- 公众号更新

v6
Chaim 4 years ago
parent a6ba30bc3d
commit 48161999a3

@ -27,9 +27,9 @@ use think\Facade;
* @package think\facade
* @mixin helper
*
* @method helper random($size = 10, $type = 1, $prefix = '') static 获取随机字符串编码
* @method helper date($size = 16, $prefix = '') static 唯一日期编码
* @method helper number($size = 12, $prefix = '') static 唯一数字编码
* @method helper random($size = 10, $type = 1, $prefix = '') string 获取随机字符串编码
* @method helper date($size = 16, $prefix = '') string 唯一日期编码
* @method helper number($size = 12, $prefix = '') string 唯一数字编码
*/
class UnIqIds extends Facade
{

@ -27,9 +27,9 @@ use think\Facade;
* @package think\facade
* @mixin helper
*
* @method helper lenCode(string $url) static 编码
* @method helper deCode(string $url) static 解码
* @method helper toParams(array $data) static 格式化参数格式化成url参数
* @method helper lenCode(string $url) string 编码
* @method helper deCode(string $url) string 解码
* @method helper toParams(array $data) string 格式化参数格式化成url参数
*/
class Urls extends Facade
{

@ -266,7 +266,7 @@ class WebApps extends Service
{
// 获取数据
$accessToken = $this->getAccessToken();
$url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={$accessToken['access_token']}";
$url = "{$this->api_url}cgi-bin/message/template/send?access_token={$accessToken['access_token']}";
if (is_array($data)) $data = json_encode($data);
return HttpService::instance()
->url($url)
@ -285,11 +285,7 @@ class WebApps extends Service
{
// 获取数据
$accessToken = $this->getAccessToken();
$data = [
'access_token' => $accessToken['access_token']
];
$params = Urls::toParams($data);
$url = 'https://api.weixin.qq.com/cgi-bin/shorturl' . "?$params";
$url = "{$this->api_url}cgi-bin/shorturl?access_token={$accessToken['access_token']}";
return HttpService::instance()
->url($url)
->data([

Loading…
Cancel
Save