ComposerUpdate

This commit is contained in:
Anyon 2019-11-28 10:33:21 +08:00
parent 1a2fb9b803
commit fef414759e
14 changed files with 77 additions and 36 deletions

8
composer.lock generated
View File

@ -783,12 +783,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "575e803f69555599fbc0914b95012f978da3798f" "reference": "a77fd83917548d92d044a3481f01b102abbf1be9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/575e803f69555599fbc0914b95012f978da3798f", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a77fd83917548d92d044a3481f01b102abbf1be9",
"reference": "575e803f69555599fbc0914b95012f978da3798f", "reference": "a77fd83917548d92d044a3481f01b102abbf1be9",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -832,7 +832,7 @@
], ],
"description": "ThinkPHP v6.0 Development Library", "description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top", "homepage": "http://framework.thinkadmin.top",
"time": "2019-11-27T09:48:45+00:00" "time": "2019-11-28T02:30:34+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View File

@ -144,6 +144,7 @@ return array(
'think\\admin\\Service' => $vendorDir . '/zoujingli/think-library/src/Service.php', 'think\\admin\\Service' => $vendorDir . '/zoujingli/think-library/src/Service.php',
'think\\admin\\Storage' => $vendorDir . '/zoujingli/think-library/src/Storage.php', 'think\\admin\\Storage' => $vendorDir . '/zoujingli/think-library/src/Storage.php',
'think\\admin\\command\\Install' => $vendorDir . '/zoujingli/think-library/src/command/Install.php', 'think\\admin\\command\\Install' => $vendorDir . '/zoujingli/think-library/src/command/Install.php',
'think\\admin\\command\\Version' => $vendorDir . '/zoujingli/think-library/src/command/Version.php',
'think\\admin\\extend\\CodeExtend' => $vendorDir . '/zoujingli/think-library/src/extend/CodeExtend.php', 'think\\admin\\extend\\CodeExtend' => $vendorDir . '/zoujingli/think-library/src/extend/CodeExtend.php',
'think\\admin\\extend\\DataExtend' => $vendorDir . '/zoujingli/think-library/src/extend/DataExtend.php', 'think\\admin\\extend\\DataExtend' => $vendorDir . '/zoujingli/think-library/src/extend/DataExtend.php',
'think\\admin\\extend\\ExcelExtend' => $vendorDir . '/zoujingli/think-library/src/extend/ExcelExtend.php', 'think\\admin\\extend\\ExcelExtend' => $vendorDir . '/zoujingli/think-library/src/extend/ExcelExtend.php',

View File

@ -235,6 +235,7 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
'think\\admin\\Service' => __DIR__ . '/..' . '/zoujingli/think-library/src/Service.php', 'think\\admin\\Service' => __DIR__ . '/..' . '/zoujingli/think-library/src/Service.php',
'think\\admin\\Storage' => __DIR__ . '/..' . '/zoujingli/think-library/src/Storage.php', 'think\\admin\\Storage' => __DIR__ . '/..' . '/zoujingli/think-library/src/Storage.php',
'think\\admin\\command\\Install' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Install.php', 'think\\admin\\command\\Install' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Install.php',
'think\\admin\\command\\Version' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Version.php',
'think\\admin\\extend\\CodeExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/CodeExtend.php', 'think\\admin\\extend\\CodeExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/CodeExtend.php',
'think\\admin\\extend\\DataExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/DataExtend.php', 'think\\admin\\extend\\DataExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/DataExtend.php',
'think\\admin\\extend\\ExcelExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/ExcelExtend.php', 'think\\admin\\extend\\ExcelExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/ExcelExtend.php',

View File

@ -805,12 +805,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "575e803f69555599fbc0914b95012f978da3798f" "reference": "a77fd83917548d92d044a3481f01b102abbf1be9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/575e803f69555599fbc0914b95012f978da3798f", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a77fd83917548d92d044a3481f01b102abbf1be9",
"reference": "575e803f69555599fbc0914b95012f978da3798f", "reference": "a77fd83917548d92d044a3481f01b102abbf1be9",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -826,7 +826,7 @@
"ext-json": "*", "ext-json": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2019-11-27T09:48:45+00:00", "time": "2019-11-28T02:30:34+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"think": { "think": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2019-11-27 18:01:13 // This file is automatically generated at:2019-11-28 10:32:44
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',

View File

@ -180,7 +180,7 @@ abstract class Controller extends \stdClass
* @param string|Query $dbQuery * @param string|Query $dbQuery
* @return QueryHelper * @return QueryHelper
*/ */
protected function _query($dbQuery) protected function _query($dbQuery): QueryHelper
{ {
return QueryHelper::instance()->init($dbQuery); return QueryHelper::instance()->init($dbQuery);
} }

View File

@ -80,6 +80,7 @@ class Library extends Service
'think\admin\queue\QueryQueue', 'think\admin\queue\QueryQueue',
'think\admin\queue\ListenQueue', 'think\admin\queue\ListenQueue',
'think\admin\command\Install', 'think\admin\command\Install',
'think\admin\command\Version',
]); ]);
} }
} }

View File

@ -42,7 +42,7 @@ abstract class Service
/** /**
* 服务初始化 * 服务初始化
* @return static * @return $this
*/ */
public function initialize(): Service public function initialize(): Service
{ {

View File

@ -71,15 +71,11 @@ class Install extends Command
protected function configure() protected function configure()
{ {
$this->setName('xtask:install'); $this->setName('xadmin:install');
$this->setDescription("[安装]安装或更新指定模块"); $this->setDescription("[安装]安装或更新指定模块");
$this->addArgument('name', Argument::OPTIONAL, '模块名称', ''); $this->addArgument('name', Argument::OPTIONAL, '模块名称', '');
} }
/**
* @param Input $input
* @param Output $output
*/
protected function execute(Input $input, Output $output) protected function execute(Input $input, Output $output)
{ {
$this->name = trim($input->getArgument('name')); $this->name = trim($input->getArgument('name'));

View File

@ -0,0 +1,42 @@
<?php
// +----------------------------------------------------------------------
// | Library for ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://demo.thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | gitee 仓库地址 https://gitee.com/zoujingli/ThinkLibrary
// | github 仓库地址 https://github.com/zoujingli/ThinkLibrary
// +----------------------------------------------------------------------
namespace think\admin\command;
use think\admin\service\ProcessService;
use think\App;
use think\console\Command;
use think\console\Input;
use think\console\Output;
/**
* 获取当前框架版本号
* Class Version
* @package think\admin\command
*/
class Version extends Command
{
protected function configure()
{
$this->setName('xadmin:version');
$this->setDescription("[系统]查看当前框架版本号");
}
protected function execute(Input $input, Output $output)
{
$output->writeln("ThinkAdmin " . ProcessService::instance()->version());
$output->writeln('ThinkPHPCore ' . App::VERSION);
}
}

View File

@ -35,13 +35,13 @@ class DeleteHelper extends Helper
* 数据对象主键名称 * 数据对象主键名称
* @var string * @var string
*/ */
protected $pkField; protected $field;
/** /**
* 数据对象主键值 * 数据对象主键值
* @var string * @var string
*/ */
protected $pkValue; protected $value;
/** /**
* 逻辑器初始化 * 逻辑器初始化
@ -55,11 +55,11 @@ class DeleteHelper extends Helper
{ {
$this->where = $where; $this->where = $where;
$this->query = $this->buildQuery($dbQuery); $this->query = $this->buildQuery($dbQuery);
$this->pkField = empty($field) ? $this->query->getPk() : $field; $this->field = empty($field) ? $this->query->getPk() : $field;
$this->pkValue = $this->app->request->post($this->pkField, null); $this->value = $this->app->request->post($this->field, null);
// 主键限制处理 // 主键限制处理
if (!isset($this->where[$this->pkField]) && is_string($this->pkValue)) { if (!isset($this->where[$this->field]) && is_string($this->value)) {
$this->query->whereIn($this->pkField, explode(',', $this->pkValue)); $this->query->whereIn($this->field, explode(',', $this->value));
} }
// 前置回调处理 // 前置回调处理
if (false === $this->controller->callback('_delete_filter', $this->query, $where)) { if (false === $this->controller->callback('_delete_filter', $this->query, $where)) {

View File

@ -22,8 +22,8 @@ use think\db\Query;
* 搜索条件处理器 * 搜索条件处理器
* Class QueryHelper * Class QueryHelper
* @package think\admin\helper * @package think\admin\helper
* @see \think\Db\Query * @see \think\db\Query
* @mixin \think\Db\Query * @mixin \think\db\Query
*/ */
class QueryHelper extends Helper class QueryHelper extends Helper
{ {
@ -211,8 +211,8 @@ class QueryHelper extends Helper
/** /**
* 实例化分页管理器 * 实例化分页管理器
* @param boolean $isPage 是否启用分页 * @param boolean $page 是否启用分页
* @param boolean $isDisplay 是否渲染模板 * @param boolean $display 是否渲染模板
* @param boolean $total 集合分页记录数 * @param boolean $total 集合分页记录数
* @param integer $limit 集合每页记录数 * @param integer $limit 集合每页记录数
* @return mixed * @return mixed
@ -220,8 +220,8 @@ class QueryHelper extends Helper
* @throws \think\db\exception\DbException * @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
*/ */
public function page($isPage = true, $isDisplay = true, $total = false, $limit = 0) public function page($page = true, $display = true, $total = false, $limit = 0)
{ {
return PageHelper::instance()->init($this->query, $isPage, $isDisplay, $total, $limit); return PageHelper::instance()->init($this->query, $page, $display, $total, $limit);
} }
} }

View File

@ -41,13 +41,13 @@ class SaveHelper extends Helper
* 数据对象主键名称 * 数据对象主键名称
* @var array|string * @var array|string
*/ */
protected $pkField; protected $field;
/** /**
* 数据对象主键值 * 数据对象主键值
* @var string * @var string
*/ */
protected $pkValue; protected $value;
/** /**
* 逻辑器初始化 * 逻辑器初始化
@ -63,12 +63,12 @@ class SaveHelper extends Helper
$this->where = $where; $this->where = $where;
$this->query = $this->buildQuery($dbQuery); $this->query = $this->buildQuery($dbQuery);
$this->data = empty($data) ? $this->app->request->post() : $data; $this->data = empty($data) ? $this->app->request->post() : $data;
$this->pkField = empty($field) ? $this->query->getPk() : $field; $this->field = empty($field) ? $this->query->getPk() : $field;
$this->pkValue = $this->app->request->post($this->pkField, null); $this->value = $this->app->request->post($this->field, null);
// 主键限制处理 // 主键限制处理
if (!isset($this->where[$this->pkField]) && is_string($this->pkValue)) { if (!isset($this->where[$this->field]) && is_string($this->value)) {
$this->query->whereIn($this->pkField, explode(',', $this->pkValue)); $this->query->whereIn($this->field, explode(',', $this->value));
if (isset($this->data)) unset($this->data[$this->pkField]); if (isset($this->data)) unset($this->data[$this->field]);
} }
// 前置回调处理 // 前置回调处理
if (false === $this->controller->callback('_save_filter', $this->query, $this->data)) { if (false === $this->controller->callback('_save_filter', $this->query, $this->data)) {

View File

@ -172,7 +172,7 @@ class QiniuStorage extends Storage
*/ */
public function upload() public function upload()
{ {
$protocol = request()->isSsl() ? 'https' : 'http'; $protocol = $this->app->request->isSsl() ? 'https' : 'http';
switch (sysconf('storage.qiniu_region')) { switch (sysconf('storage.qiniu_region')) {
case '华东': case '华东':
return "{$protocol}://up.qiniup.com"; return "{$protocol}://up.qiniup.com";