[更新]ComposerUpdate

This commit is contained in:
Anyon 2019-04-19 10:13:21 +08:00
parent 2b8661c357
commit 22e5b35d7c
18 changed files with 49 additions and 48 deletions

View File

@ -79,9 +79,12 @@ class Index extends Controller
$where = ['authorizer_appid' => $appid, 'is_deleted' => '0', 'status' => '1'];
$author = Db::name('WechatServiceConfig')->where($where)->find();
empty($author) && $this->error('无效的授权信息,请同步其它公众号!');
$info = Build::filter(Wechat::service()->getAuthorizerInfo($appid));
$info['authorizer_appid'] = $appid;
if (data_save('WechatServiceConfig', $info, 'authorizer_appid')) {
$data = Build::filter(Wechat::service()->getAuthorizerInfo($appid));
$data['authorizer_appid'] = $appid;
$where = ['authorizer_appid' => $data['authorizer_appid']];
$appkey = Db::name('WechatServiceConfig')->where($where)->value('appkey');
if (empty($appkey)) $data['appkey'] = md5(uniqid('', true));
if (data_save('WechatServiceConfig', $data, 'authorizer_appid')) {
$this->success('更新公众号授权信息成功!', '');
}
} catch (\think\exception\HttpResponseException $exception) {
@ -105,6 +108,9 @@ class Index extends Controller
$data['authorizer_appid'] = $item['authorizer_appid'];
$data['authorizer_refresh_token'] = $item['refresh_token'];
$data['create_at'] = date('Y-m-d H:i:s', $item['auth_time']);
$where = ['authorizer_appid' => $data['authorizer_appid']];
$appkey = Db::name('WechatServiceConfig')->where($where)->value('appkey');
if (empty($appkey)) $data['appkey'] = md5(uniqid('', true));
if (!data_save('WechatServiceConfig', $data, 'authorizer_appid')) {
$this->error('获取授权信息失败,请稍候再试!', '');
}

View File

@ -9,7 +9,7 @@
<label class="layui-form-label">MchId<br><span class="nowrap color-desc">微信商户ID</span></label>
<div class="layui-input-block">
<input name="wechat_mch_id" required placeholder="请输入微信商户ID必填" value="{:sysconf('wechat_mch_id')}" class="layui-input">
<p class="help-block">微信商户ID可以在微信商户平台或开通时的邮件中获取</p>
<p class="help-block">微信商户ID可以在微信商户平台或开通时的邮件中获取。</p>
</div>
</div>

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6::getLoader();
return ComposerAutoloaderInit369934dfb865b90eedef5b9c19990239::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6
class ComposerAutoloaderInit369934dfb865b90eedef5b9c19990239
{
private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit369934dfb865b90eedef5b9c19990239', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit369934dfb865b90eedef5b9c19990239', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit369934dfb865b90eedef5b9c19990239::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit369934dfb865b90eedef5b9c19990239::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiredfa1d29ab4d9811dd97c96c297f778d6($fileIdentifier, $file);
composerRequire369934dfb865b90eedef5b9c19990239($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequiredfa1d29ab4d9811dd97c96c297f778d6($fileIdentifier, $file)
function composerRequire369934dfb865b90eedef5b9c19990239($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6
class ComposerStaticInit369934dfb865b90eedef5b9c19990239
{
public static $files = array (
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
@ -345,9 +345,9 @@ class ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit369934dfb865b90eedef5b9c19990239::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit369934dfb865b90eedef5b9c19990239::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit369934dfb865b90eedef5b9c19990239::$classMap;
}, null, ClassLoader::class);
}

View File

@ -499,12 +499,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "52e88c23ee806257ca2e9d577b00dc03beb45a9f"
"reference": "0a52cf6cca88079e164ca101a2667d5539ee96b5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/52e88c23ee806257ca2e9d577b00dc03beb45a9f",
"reference": "52e88c23ee806257ca2e9d577b00dc03beb45a9f",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/0a52cf6cca88079e164ca101a2667d5539ee96b5",
"reference": "0a52cf6cca88079e164ca101a2667d5539ee96b5",
"shasum": "",
"mirrors": [
{
@ -523,7 +523,7 @@
"qiniu/php-sdk": "^7.2",
"topthink/framework": "5.1.*"
},
"time": "2019-04-18T05:12:51+00:00",
"time": "2019-04-18T15:29:48+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {

View File

@ -77,7 +77,7 @@ if (!function_exists('sysconf')) {
$data = \think\facade\Cache::tag('system')->get('_sysconf_', []);
if (empty($data)) {
$data = \think\Db::name('SystemConfig')->column('name,value');
\think\facade\Cache::tag('system')->set('_sysconf_', $data, 3600);
\think\facade\Cache::tag('system')->set('_sysconf_', $data, 60);
}
}
return isset($data[$field]) ? (strtolower($raw) === 'raw' ? $data[$field] : htmlspecialchars($data[$field])) : '';
@ -215,7 +215,7 @@ if (!function_exists('emoji_clear')) {
header('Access-Control-Expose-Headers:User-Token-Csrf');
header('Access-Control-Allow-Headers:Content-Type,X-Requested-With');
}
return $request->isOptions() ? \think\facade\Response::create() : $next($request);
return $request->isOptions() ? response() : $next($request);
});
// 注册系统常用指令

View File

@ -17,8 +17,8 @@ namespace library\command;
use think\console\Command;
/**
* 清理无效的会话文件
* Class Session
* 清理会话文件
* Class Sess
* @package library\command
*/
class Sess extends Command

View File

@ -20,8 +20,8 @@ use think\console\Output;
/**
* 文件比对支持
* Class update
* @package app\admin\logic
* Class Sync
* @package library\command
*/
class Sync extends Command
{

View File

@ -17,9 +17,8 @@ namespace library\command\sync;
use library\command\Sync;
/**
* 系统模块更新指令
* Class UpdateAdmin
* @package app\admin\logic\update
* Class Admin
* @package library\command\sync
*/
class Admin extends Sync
{

View File

@ -17,9 +17,8 @@ namespace library\command\sync;
use library\command\Sync;
/**
* 更新系统配置指令
* Class UpdateConfig
* @package library\command\update
* Class Config
* @package library\command\sync
*/
class Config extends Sync
{

View File

@ -17,9 +17,8 @@ namespace library\command\sync;
use library\command\Sync;
/**
* 更新插件指令
* Class UpdatePlugs
* @package app\admin\logic\update
* Class Plugs
* @package library\command\sync
*/
class Plugs extends Sync
{

View File

@ -17,8 +17,8 @@ namespace library\command\sync;
use library\command\Sync;
/**
* Class UpdateService
* @package app\admin\logic\update
* Class Service
* @package library\command\sync
*/
class Service extends Sync
{

View File

@ -17,9 +17,8 @@ namespace library\command\sync;
use library\command\Sync;
/**
* 更新微信模块指令
* Class UpdateWechat
* @package app\admin\logic\update
* Class Wechat
* @package library\command\sync
*/
class Wechat extends Sync
{

View File

@ -17,8 +17,7 @@ namespace library\command\task;
use library\command\Task;
/**
* 守护进程重启
* Class TaskRestart
* Class Reset
* @package library\command\task
*/
class Reset extends Task

View File

@ -17,7 +17,7 @@ namespace library\command\task;
use library\command\Task;
/**
* Class TaskStart
* Class Start
* @package library\command\task
*/
class Start extends Task

View File

@ -17,7 +17,7 @@ namespace library\command\task;
use library\command\Task;
/**
* Class TaskState
* Class State
* @package library\command\task
*/
class State extends Task

View File

@ -17,7 +17,7 @@ namespace library\command\task;
use library\command\Task;
/**
* Class TaskStop
* Class Stop
* @package library\command\task
*/
class Stop extends Task