mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]ComposerUpdate
This commit is contained in:
parent
2b8661c357
commit
22e5b35d7c
@ -79,9 +79,12 @@ class Index extends Controller
|
|||||||
$where = ['authorizer_appid' => $appid, 'is_deleted' => '0', 'status' => '1'];
|
$where = ['authorizer_appid' => $appid, 'is_deleted' => '0', 'status' => '1'];
|
||||||
$author = Db::name('WechatServiceConfig')->where($where)->find();
|
$author = Db::name('WechatServiceConfig')->where($where)->find();
|
||||||
empty($author) && $this->error('无效的授权信息,请同步其它公众号!');
|
empty($author) && $this->error('无效的授权信息,请同步其它公众号!');
|
||||||
$info = Build::filter(Wechat::service()->getAuthorizerInfo($appid));
|
$data = Build::filter(Wechat::service()->getAuthorizerInfo($appid));
|
||||||
$info['authorizer_appid'] = $appid;
|
$data['authorizer_appid'] = $appid;
|
||||||
if (data_save('WechatServiceConfig', $info, 'authorizer_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('更新公众号授权信息成功!', '');
|
$this->success('更新公众号授权信息成功!', '');
|
||||||
}
|
}
|
||||||
} catch (\think\exception\HttpResponseException $exception) {
|
} catch (\think\exception\HttpResponseException $exception) {
|
||||||
@ -105,6 +108,9 @@ class Index extends Controller
|
|||||||
$data['authorizer_appid'] = $item['authorizer_appid'];
|
$data['authorizer_appid'] = $item['authorizer_appid'];
|
||||||
$data['authorizer_refresh_token'] = $item['refresh_token'];
|
$data['authorizer_refresh_token'] = $item['refresh_token'];
|
||||||
$data['create_at'] = date('Y-m-d H:i:s', $item['auth_time']);
|
$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')) {
|
if (!data_save('WechatServiceConfig', $data, 'authorizer_appid')) {
|
||||||
$this->error('获取授权信息失败,请稍候再试!', '');
|
$this->error('获取授权信息失败,请稍候再试!', '');
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<label class="layui-form-label">MchId<br><span class="nowrap color-desc">微信商户ID</span></label>
|
<label class="layui-form-label">MchId<br><span class="nowrap color-desc">微信商户ID</span></label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input name="wechat_mch_id" required placeholder="请输入微信商户ID(必填)" value="{:sysconf('wechat_mch_id')}" class="layui-input">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6::getLoader();
|
return ComposerAutoloaderInit369934dfb865b90eedef5b9c19990239::getLoader();
|
||||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6
|
class ComposerAutoloaderInit369934dfb865b90eedef5b9c19990239
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
@ -19,15 +19,15 @@ class ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6
|
|||||||
return self::$loader;
|
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();
|
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());
|
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
require_once __DIR__ . '/autoload_static.php';
|
require_once __DIR__ . '/autoload_static.php';
|
||||||
|
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInit369934dfb865b90eedef5b9c19990239::getInitializer($loader));
|
||||||
} else {
|
} else {
|
||||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||||
foreach ($map as $namespace => $path) {
|
foreach ($map as $namespace => $path) {
|
||||||
@ -48,19 +48,19 @@ class ComposerAutoloaderInitdfa1d29ab4d9811dd97c96c297f778d6
|
|||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
$includeFiles = Composer\Autoload\ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$files;
|
$includeFiles = Composer\Autoload\ComposerStaticInit369934dfb865b90eedef5b9c19990239::$files;
|
||||||
} else {
|
} else {
|
||||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||||
}
|
}
|
||||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||||
composerRequiredfa1d29ab4d9811dd97c96c297f778d6($fileIdentifier, $file);
|
composerRequire369934dfb865b90eedef5b9c19990239($fileIdentifier, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function composerRequiredfa1d29ab4d9811dd97c96c297f778d6($fileIdentifier, $file)
|
function composerRequire369934dfb865b90eedef5b9c19990239($fileIdentifier, $file)
|
||||||
{
|
{
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
require $file;
|
require $file;
|
||||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace Composer\Autoload;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6
|
class ComposerStaticInit369934dfb865b90eedef5b9c19990239
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
|
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
|
||||||
@ -345,9 +345,9 @@ class ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6
|
|||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInit369934dfb865b90eedef5b9c19990239::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit369934dfb865b90eedef5b9c19990239::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitdfa1d29ab4d9811dd97c96c297f778d6::$classMap;
|
$loader->classMap = ComposerStaticInit369934dfb865b90eedef5b9c19990239::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -499,12 +499,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "52e88c23ee806257ca2e9d577b00dc03beb45a9f"
|
"reference": "0a52cf6cca88079e164ca101a2667d5539ee96b5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/52e88c23ee806257ca2e9d577b00dc03beb45a9f",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/0a52cf6cca88079e164ca101a2667d5539ee96b5",
|
||||||
"reference": "52e88c23ee806257ca2e9d577b00dc03beb45a9f",
|
"reference": "0a52cf6cca88079e164ca101a2667d5539ee96b5",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -523,7 +523,7 @@
|
|||||||
"qiniu/php-sdk": "^7.2",
|
"qiniu/php-sdk": "^7.2",
|
||||||
"topthink/framework": "5.1.*"
|
"topthink/framework": "5.1.*"
|
||||||
},
|
},
|
||||||
"time": "2019-04-18T05:12:51+00:00",
|
"time": "2019-04-18T15:29:48+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
4
vendor/zoujingli/think-library/common.php
vendored
4
vendor/zoujingli/think-library/common.php
vendored
@ -77,7 +77,7 @@ if (!function_exists('sysconf')) {
|
|||||||
$data = \think\facade\Cache::tag('system')->get('_sysconf_', []);
|
$data = \think\facade\Cache::tag('system')->get('_sysconf_', []);
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
$data = \think\Db::name('SystemConfig')->column('name,value');
|
$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])) : '';
|
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-Expose-Headers:User-Token-Csrf');
|
||||||
header('Access-Control-Allow-Headers:Content-Type,X-Requested-With');
|
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);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 注册系统常用指令
|
// 注册系统常用指令
|
||||||
|
@ -17,8 +17,8 @@ namespace library\command;
|
|||||||
use think\console\Command;
|
use think\console\Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清理无效的会话文件
|
* 清理会话文件
|
||||||
* Class Session
|
* Class Sess
|
||||||
* @package library\command
|
* @package library\command
|
||||||
*/
|
*/
|
||||||
class Sess extends Command
|
class Sess extends Command
|
||||||
|
@ -20,8 +20,8 @@ use think\console\Output;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件比对支持
|
* 文件比对支持
|
||||||
* Class update
|
* Class Sync
|
||||||
* @package app\admin\logic
|
* @package library\command
|
||||||
*/
|
*/
|
||||||
class Sync extends Command
|
class Sync extends Command
|
||||||
{
|
{
|
||||||
|
@ -17,9 +17,8 @@ namespace library\command\sync;
|
|||||||
use library\command\Sync;
|
use library\command\Sync;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统模块更新指令
|
* Class Admin
|
||||||
* Class UpdateAdmin
|
* @package library\command\sync
|
||||||
* @package app\admin\logic\update
|
|
||||||
*/
|
*/
|
||||||
class Admin extends Sync
|
class Admin extends Sync
|
||||||
{
|
{
|
||||||
|
@ -17,9 +17,8 @@ namespace library\command\sync;
|
|||||||
use library\command\Sync;
|
use library\command\Sync;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新系统配置指令
|
* Class Config
|
||||||
* Class UpdateConfig
|
* @package library\command\sync
|
||||||
* @package library\command\update
|
|
||||||
*/
|
*/
|
||||||
class Config extends Sync
|
class Config extends Sync
|
||||||
{
|
{
|
||||||
|
@ -17,9 +17,8 @@ namespace library\command\sync;
|
|||||||
use library\command\Sync;
|
use library\command\Sync;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新插件指令
|
* Class Plugs
|
||||||
* Class UpdatePlugs
|
* @package library\command\sync
|
||||||
* @package app\admin\logic\update
|
|
||||||
*/
|
*/
|
||||||
class Plugs extends Sync
|
class Plugs extends Sync
|
||||||
{
|
{
|
||||||
|
@ -17,8 +17,8 @@ namespace library\command\sync;
|
|||||||
use library\command\Sync;
|
use library\command\Sync;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UpdateService
|
* Class Service
|
||||||
* @package app\admin\logic\update
|
* @package library\command\sync
|
||||||
*/
|
*/
|
||||||
class Service extends Sync
|
class Service extends Sync
|
||||||
{
|
{
|
||||||
|
@ -17,9 +17,8 @@ namespace library\command\sync;
|
|||||||
use library\command\Sync;
|
use library\command\Sync;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新微信模块指令
|
* Class Wechat
|
||||||
* Class UpdateWechat
|
* @package library\command\sync
|
||||||
* @package app\admin\logic\update
|
|
||||||
*/
|
*/
|
||||||
class Wechat extends Sync
|
class Wechat extends Sync
|
||||||
{
|
{
|
||||||
|
@ -17,8 +17,7 @@ namespace library\command\task;
|
|||||||
use library\command\Task;
|
use library\command\Task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 守护进程重启
|
* Class Reset
|
||||||
* Class TaskRestart
|
|
||||||
* @package library\command\task
|
* @package library\command\task
|
||||||
*/
|
*/
|
||||||
class Reset extends Task
|
class Reset extends Task
|
||||||
@ -28,7 +27,7 @@ class Reset extends Task
|
|||||||
{
|
{
|
||||||
$this->setName('xtask:reset')->setDescription('reset message queue daemon');
|
$this->setName('xtask:reset')->setDescription('reset message queue daemon');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(\think\console\Input $input, \think\console\Output $output)
|
protected function execute(\think\console\Input $input, \think\console\Output $output)
|
||||||
{
|
{
|
||||||
if (($pid = $this->checkProcess()) > 0) {
|
if (($pid = $this->checkProcess()) > 0) {
|
||||||
|
@ -17,7 +17,7 @@ namespace library\command\task;
|
|||||||
use library\command\Task;
|
use library\command\Task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TaskStart
|
* Class Start
|
||||||
* @package library\command\task
|
* @package library\command\task
|
||||||
*/
|
*/
|
||||||
class Start extends Task
|
class Start extends Task
|
||||||
@ -27,7 +27,7 @@ class Start extends Task
|
|||||||
{
|
{
|
||||||
$this->setName('xtask:start')->setDescription('start message queue daemon');
|
$this->setName('xtask:start')->setDescription('start message queue daemon');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(\think\console\Input $input, \think\console\Output $output)
|
protected function execute(\think\console\Input $input, \think\console\Output $output)
|
||||||
{
|
{
|
||||||
if (($pid = $this->checkProcess()) > 0) {
|
if (($pid = $this->checkProcess()) > 0) {
|
||||||
|
@ -17,7 +17,7 @@ namespace library\command\task;
|
|||||||
use library\command\Task;
|
use library\command\Task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TaskState
|
* Class State
|
||||||
* @package library\command\task
|
* @package library\command\task
|
||||||
*/
|
*/
|
||||||
class State extends Task
|
class State extends Task
|
||||||
@ -27,7 +27,7 @@ class State extends Task
|
|||||||
{
|
{
|
||||||
$this->setName('xtask:state')->setDescription('view message queue daemon');
|
$this->setName('xtask:state')->setDescription('view message queue daemon');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(\think\console\Input $input, \think\console\Output $output)
|
protected function execute(\think\console\Input $input, \think\console\Output $output)
|
||||||
{
|
{
|
||||||
if (($pid = $this->checkProcess()) > 0) {
|
if (($pid = $this->checkProcess()) > 0) {
|
||||||
|
@ -17,7 +17,7 @@ namespace library\command\task;
|
|||||||
use library\command\Task;
|
use library\command\Task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TaskStop
|
* Class Stop
|
||||||
* @package library\command\task
|
* @package library\command\task
|
||||||
*/
|
*/
|
||||||
class Stop extends Task
|
class Stop extends Task
|
||||||
|
Loading…
x
Reference in New Issue
Block a user