ComposerUpdate

This commit is contained in:
Anyon 2020-09-14 16:57:56 +08:00
parent 0b5f6488cd
commit 3f25b4c068
10 changed files with 31 additions and 25 deletions

View File

@ -226,6 +226,7 @@ return array(
'app\\data\\controller\\api\\Login' => $baseDir . '/app/data/controller/api/Login.php', '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\\News' => $baseDir . '/app/data/controller/api/News.php',
'app\\data\\controller\\api\\Notify' => $baseDir . '/app/data/controller/api/Notify.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\\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\\Center' => $baseDir . '/app/data/controller/api/auth/Center.php',
'app\\data\\controller\\api\\auth\\News' => $baseDir . '/app/data/controller/api/auth/News.php', 'app\\data\\controller\\api\\auth\\News' => $baseDir . '/app/data/controller/api/auth/News.php',

View File

@ -363,6 +363,7 @@ class ComposerStaticInit7ad2dfd941224dedfd9e69a3187017d8
'app\\data\\controller\\api\\Login' => __DIR__ . '/../..' . '/app/data/controller/api/Login.php', '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\\News' => __DIR__ . '/../..' . '/app/data/controller/api/News.php',
'app\\data\\controller\\api\\Notify' => __DIR__ . '/../..' . '/app/data/controller/api/Notify.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\\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\\Center' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Center.php',
'app\\data\\controller\\api\\auth\\News' => __DIR__ . '/../..' . '/app/data/controller/api/auth/News.php', 'app\\data\\controller\\api\\auth\\News' => __DIR__ . '/../..' . '/app/data/controller/api/auth/News.php',

View File

@ -958,17 +958,17 @@
}, },
{ {
"name": "zoujingli/think-library", "name": "zoujingli/think-library",
"version": "v6.0.7", "version": "v6.0.8",
"version_normalized": "6.0.7.0", "version_normalized": "6.0.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "eac899ff2ef30c37018370b3654151980d1c3ee8" "reference": "686db8b3131f4cec0f5f5927338baba4580d65c5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/eac899ff2ef30c37018370b3654151980d1c3ee8", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/686db8b3131f4cec0f5f5927338baba4580d65c5",
"reference": "eac899ff2ef30c37018370b3654151980d1c3ee8", "reference": "686db8b3131f4cec0f5f5927338baba4580d65c5",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -985,7 +985,7 @@
"ext-mbstring": "*", "ext-mbstring": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2020-09-10T07:50:21+00:00", "time": "2020-09-14T08:48:48+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"think": { "think": {
@ -1018,17 +1018,17 @@
}, },
{ {
"name": "zoujingli/wechat-developer", "name": "zoujingli/wechat-developer",
"version": "v1.2.25", "version": "v1.2.26",
"version_normalized": "1.2.25.0", "version_normalized": "1.2.26.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/WeChatDeveloper.git", "url": "https://github.com/zoujingli/WeChatDeveloper.git",
"reference": "6fcb6504904ee4276b358b3f9b80ffc992eb385c" "reference": "5ecafcd810627cd9217c3d7f18c7026612418278"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/6fcb6504904ee4276b358b3f9b80ffc992eb385c", "url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/5ecafcd810627cd9217c3d7f18c7026612418278",
"reference": "6fcb6504904ee4276b358b3f9b80ffc992eb385c", "reference": "5ecafcd810627cd9217c3d7f18c7026612418278",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -1048,7 +1048,7 @@
"ext-xml": "*", "ext-xml": "*",
"php": ">=5.4" "php": ">=5.4"
}, },
"time": "2020-08-19T08:52:11+00:00", "time": "2020-09-13T06:01:11+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2020-09-11 14:09:44 // This file is automatically generated at:2020-09-14 16:57:43
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\admin\\Library', 0 => 'think\\admin\\Library',

View File

@ -41,7 +41,7 @@ class Library extends Service
/** /**
* 扩展库版本号 * 扩展库版本号
*/ */
const VERSION = '6.0.7'; const VERSION = '6.0.8';
/** /**
* 启动服务 * 启动服务

View File

@ -83,7 +83,7 @@ class MenuService extends Service
unset($menus[$key]); unset($menus[$key]);
} else { } else {
$node = join('/', array_slice(explode('/', $menu['url']), 0, 3)); $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]); if (!$service->check($node)) unset($menus[$key]);
} }
} }

View File

@ -86,7 +86,7 @@ class We
* 定义当前版本 * 定义当前版本
* @var string * @var string
*/ */
const VERSION = '1.2.25'; const VERSION = '1.2.26';
/** /**
* 静态配置 * 静态配置

View File

@ -39,7 +39,7 @@ class MyCurlFile extends \stdClass
} }
/** /**
* 获取文件信息 * 获取文件上传信息
* @return \CURLFile|string * @return \CURLFile|string
* @throws \WeChat\Exceptions\LocalCacheException * @throws \WeChat\Exceptions\LocalCacheException
*/ */
@ -48,12 +48,14 @@ class MyCurlFile extends \stdClass
$this->filename = Tools::pushFile($this->tempname, base64_decode($this->content)); $this->filename = Tools::pushFile($this->tempname, base64_decode($this->content));
if (class_exists('CURLFile')) { if (class_exists('CURLFile')) {
return new \CURLFile($this->filename, $this->mimetype, $this->postname); 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() public function __destruct()
{ {

View File

@ -110,10 +110,11 @@ class Tools
if (is_string($filename) && file_exists($filename)) { if (is_string($filename) && file_exists($filename)) {
if (is_null($postname)) $postname = basename($filename); if (is_null($postname)) $postname = basename($filename);
if (is_null($mimetype)) $mimetype = self::getExtMine(pathinfo($filename, 4)); if (is_null($mimetype)) $mimetype = self::getExtMine(pathinfo($filename, 4));
if (function_exists('curl_file_create')) { if (class_exists('CURLFile')) {
return curl_file_create($filename, $mimetype, $postname); return new \CURLFile($filename, $mimetype, $postname);
} else {
return "@{$filename};filename={$postname};type={$mimetype}";
} }
return "@{$filename};filename={$postname};type={$mimetype}";
} }
return $filename; return $filename;
} }
@ -182,7 +183,7 @@ class Tools
*/ */
public static function arr2json($data) public static function arr2json($data)
{ {
$json = json_encode(self::buildEnEmojiData($data), JSON_UNESCAPED_UNICODE); $json = json_encode($data, JSON_UNESCAPED_UNICODE);
return $json === '[]' ? '{}' : $json; return $json === '[]' ? '{}' : $json;
} }

View File

@ -40,15 +40,16 @@ class Oauth extends BasicWeChat
/** /**
* 通过 code 获取 AccessToken openid * 通过 code 获取 AccessToken openid
* @param string $code 授权Code值不传则取GET参数
* @return bool|array * @return bool|array
* @throws Exceptions\InvalidResponseException * @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException * @throws Exceptions\LocalCacheException
*/ */
public function getOauthAccessToken() public function getOauthAccessToken($code = '')
{ {
$appid = $this->config->get('appid'); $appid = $this->config->get('appid');
$appsecret = $this->config->get('appsecret'); $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"; $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={$appid}&secret={$appsecret}&code={$code}&grant_type=authorization_code";
return $this->httpGetForJson($url); return $this->httpGetForJson($url);
} }