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\\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',

View File

@ -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',

View File

@ -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": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?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);
return array (
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]);
} 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]);
}
}

View File

@ -86,7 +86,7 @@ class We
* 定义当前版本
* @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
* @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()
{

View File

@ -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;
}

View File

@ -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);
}