From 3f25b4c0684a93ea80848e40a866c0ad52211067 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 14 Sep 2020 16:57:56 +0800 Subject: [PATCH] ComposerUpdate --- vendor/composer/autoload_classmap.php | 1 + vendor/composer/autoload_static.php | 1 + vendor/composer/installed.json | 24 +++++++++---------- vendor/services.php | 2 +- .../zoujingli/think-library/src/Library.php | 2 +- .../think-library/src/service/MenuService.php | 2 +- vendor/zoujingli/wechat-developer/We.php | 2 +- .../WeChat/Contracts/MyCurlFile.php | 8 ++++--- .../WeChat/Contracts/Tools.php | 9 +++---- .../wechat-developer/WeChat/Oauth.php | 5 ++-- 10 files changed, 31 insertions(+), 25 deletions(-) diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 256fe521e..0d6e1206e 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -226,6 +226,7 @@ return array( 'app\\data\\controller\\api\\Login' => $baseDir . '/app/data/controller/api/Login.php', 'app\\data\\controller\\api\\News' => $baseDir . '/app/data/controller/api/News.php', 'app\\data\\controller\\api\\Notify' => $baseDir . '/app/data/controller/api/Notify.php', + 'app\\data\\controller\\api\\Wxapp' => $baseDir . '/app/data/controller/api/Wxapp.php', 'app\\data\\controller\\api\\auth\\Address' => $baseDir . '/app/data/controller/api/auth/Address.php', 'app\\data\\controller\\api\\auth\\Center' => $baseDir . '/app/data/controller/api/auth/Center.php', 'app\\data\\controller\\api\\auth\\News' => $baseDir . '/app/data/controller/api/auth/News.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index b27eae074..6edc50869 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -363,6 +363,7 @@ class ComposerStaticInit7ad2dfd941224dedfd9e69a3187017d8 'app\\data\\controller\\api\\Login' => __DIR__ . '/../..' . '/app/data/controller/api/Login.php', 'app\\data\\controller\\api\\News' => __DIR__ . '/../..' . '/app/data/controller/api/News.php', 'app\\data\\controller\\api\\Notify' => __DIR__ . '/../..' . '/app/data/controller/api/Notify.php', + 'app\\data\\controller\\api\\Wxapp' => __DIR__ . '/../..' . '/app/data/controller/api/Wxapp.php', 'app\\data\\controller\\api\\auth\\Address' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Address.php', 'app\\data\\controller\\api\\auth\\Center' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Center.php', 'app\\data\\controller\\api\\auth\\News' => __DIR__ . '/../..' . '/app/data/controller/api/auth/News.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 275bceefe..f300eacfa 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -958,17 +958,17 @@ }, { "name": "zoujingli/think-library", - "version": "v6.0.7", - "version_normalized": "6.0.7.0", + "version": "v6.0.8", + "version_normalized": "6.0.8.0", "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "eac899ff2ef30c37018370b3654151980d1c3ee8" + "reference": "686db8b3131f4cec0f5f5927338baba4580d65c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/eac899ff2ef30c37018370b3654151980d1c3ee8", - "reference": "eac899ff2ef30c37018370b3654151980d1c3ee8", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/686db8b3131f4cec0f5f5927338baba4580d65c5", + "reference": "686db8b3131f4cec0f5f5927338baba4580d65c5", "shasum": "", "mirrors": [ { @@ -985,7 +985,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2020-09-10T07:50:21+00:00", + "time": "2020-09-14T08:48:48+00:00", "type": "library", "extra": { "think": { @@ -1018,17 +1018,17 @@ }, { "name": "zoujingli/wechat-developer", - "version": "v1.2.25", - "version_normalized": "1.2.25.0", + "version": "v1.2.26", + "version_normalized": "1.2.26.0", "source": { "type": "git", "url": "https://github.com/zoujingli/WeChatDeveloper.git", - "reference": "6fcb6504904ee4276b358b3f9b80ffc992eb385c" + "reference": "5ecafcd810627cd9217c3d7f18c7026612418278" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/6fcb6504904ee4276b358b3f9b80ffc992eb385c", - "reference": "6fcb6504904ee4276b358b3f9b80ffc992eb385c", + "url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/5ecafcd810627cd9217c3d7f18c7026612418278", + "reference": "5ecafcd810627cd9217c3d7f18c7026612418278", "shasum": "", "mirrors": [ { @@ -1048,7 +1048,7 @@ "ext-xml": "*", "php": ">=5.4" }, - "time": "2020-08-19T08:52:11+00:00", + "time": "2020-09-13T06:01:11+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/services.php b/vendor/services.php index fbbdd4993..a9081fa3e 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/zoujingli/think-library/src/Library.php b/vendor/zoujingli/think-library/src/Library.php index 305884cb5..a57864dc1 100644 --- a/vendor/zoujingli/think-library/src/Library.php +++ b/vendor/zoujingli/think-library/src/Library.php @@ -41,7 +41,7 @@ class Library extends Service /** * 扩展库版本号 */ - const VERSION = '6.0.7'; + const VERSION = '6.0.8'; /** * 启动服务 diff --git a/vendor/zoujingli/think-library/src/service/MenuService.php b/vendor/zoujingli/think-library/src/service/MenuService.php index 882047312..4f51378e9 100644 --- a/vendor/zoujingli/think-library/src/service/MenuService.php +++ b/vendor/zoujingli/think-library/src/service/MenuService.php @@ -83,7 +83,7 @@ class MenuService extends Service unset($menus[$key]); } else { $node = join('/', array_slice(explode('/', $menu['url']), 0, 3)); - $menu['url'] = url($menu['url']) . ($menu['params'] ? '' : "?{$menu['params']}"); + $menu['url'] = url($menu['url'])->build() . ($menu['params'] ? '?' . $menu['params'] : ''); if (!$service->check($node)) unset($menus[$key]); } } diff --git a/vendor/zoujingli/wechat-developer/We.php b/vendor/zoujingli/wechat-developer/We.php index 8439aedde..f582eb61b 100644 --- a/vendor/zoujingli/wechat-developer/We.php +++ b/vendor/zoujingli/wechat-developer/We.php @@ -86,7 +86,7 @@ class We * 定义当前版本 * @var string */ - const VERSION = '1.2.25'; + const VERSION = '1.2.26'; /** * 静态配置 diff --git a/vendor/zoujingli/wechat-developer/WeChat/Contracts/MyCurlFile.php b/vendor/zoujingli/wechat-developer/WeChat/Contracts/MyCurlFile.php index e81e3da46..d77ca885f 100644 --- a/vendor/zoujingli/wechat-developer/WeChat/Contracts/MyCurlFile.php +++ b/vendor/zoujingli/wechat-developer/WeChat/Contracts/MyCurlFile.php @@ -39,7 +39,7 @@ class MyCurlFile extends \stdClass } /** - * 获取文件信息 + * 获取文件上传信息 * @return \CURLFile|string * @throws \WeChat\Exceptions\LocalCacheException */ @@ -48,12 +48,14 @@ class MyCurlFile extends \stdClass $this->filename = Tools::pushFile($this->tempname, base64_decode($this->content)); if (class_exists('CURLFile')) { return new \CURLFile($this->filename, $this->mimetype, $this->postname); + } else { + return "@{$this->tempname};filename={$this->postname};type={$this->mimetype}"; } - return "@{$this->tempname};filename={$this->postname};type={$this->mimetype}"; } /** - * 类销毁处理 + * 通用销毁函数清理缓存文件 + * 提前删除过期因此放到了网络请求之后 */ public function __destruct() { diff --git a/vendor/zoujingli/wechat-developer/WeChat/Contracts/Tools.php b/vendor/zoujingli/wechat-developer/WeChat/Contracts/Tools.php index 0f96b7b27..69d7c4efb 100644 --- a/vendor/zoujingli/wechat-developer/WeChat/Contracts/Tools.php +++ b/vendor/zoujingli/wechat-developer/WeChat/Contracts/Tools.php @@ -110,10 +110,11 @@ class Tools if (is_string($filename) && file_exists($filename)) { if (is_null($postname)) $postname = basename($filename); if (is_null($mimetype)) $mimetype = self::getExtMine(pathinfo($filename, 4)); - if (function_exists('curl_file_create')) { - return curl_file_create($filename, $mimetype, $postname); + if (class_exists('CURLFile')) { + return new \CURLFile($filename, $mimetype, $postname); + } else { + return "@{$filename};filename={$postname};type={$mimetype}"; } - return "@{$filename};filename={$postname};type={$mimetype}"; } return $filename; } @@ -182,7 +183,7 @@ class Tools */ public static function arr2json($data) { - $json = json_encode(self::buildEnEmojiData($data), JSON_UNESCAPED_UNICODE); + $json = json_encode($data, JSON_UNESCAPED_UNICODE); return $json === '[]' ? '{}' : $json; } diff --git a/vendor/zoujingli/wechat-developer/WeChat/Oauth.php b/vendor/zoujingli/wechat-developer/WeChat/Oauth.php index 2cb79d07e..e9691f317 100644 --- a/vendor/zoujingli/wechat-developer/WeChat/Oauth.php +++ b/vendor/zoujingli/wechat-developer/WeChat/Oauth.php @@ -40,15 +40,16 @@ class Oauth extends BasicWeChat /** * 通过 code 获取 AccessToken 和 openid + * @param string $code 授权Code值,不传则取GET参数 * @return bool|array * @throws Exceptions\InvalidResponseException * @throws Exceptions\LocalCacheException */ - public function getOauthAccessToken() + public function getOauthAccessToken($code = '') { $appid = $this->config->get('appid'); $appsecret = $this->config->get('appsecret'); - $code = isset($_GET['code']) ? $_GET['code'] : ''; + $code = $code ? $code : (isset($_GET['code']) ? $_GET['code'] : ''); $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={$appid}&secret={$appsecret}&code={$code}&grant_type=authorization_code"; return $this->httpGetForJson($url); }