From 5d9e7048204c0da3232202ed73fce46f05c03150 Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 8 Jan 2020 14:09:23 +0800 Subject: [PATCH] ComposerUpdate --- composer.lock | 8 +++---- vendor/composer/installed.json | 8 +++---- vendor/services.php | 2 +- .../src/helper/ValidateHelper.php | 21 ++++++++++++++----- .../think-library/src/queue/WorkQueue.php | 2 +- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index fa960e4d8..f429ce6e0 100644 --- a/composer.lock +++ b/composer.lock @@ -909,12 +909,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "da9b19733aa956650b201c1351886ac045119453" + "reference": "8c49f31c04ed4bf34710e43d4115aeba37bbcfaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/da9b19733aa956650b201c1351886ac045119453", - "reference": "da9b19733aa956650b201c1351886ac045119453", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/8c49f31c04ed4bf34710e43d4115aeba37bbcfaa", + "reference": "8c49f31c04ed4bf34710e43d4115aeba37bbcfaa", "shasum": "", "mirrors": [ { @@ -958,7 +958,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://framework.thinkadmin.top", - "time": "2020-01-06T07:42:55+00:00" + "time": "2020-01-08T02:36:41+00:00" }, { "name": "zoujingli/wechat-developer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 7701c0a8f..b6cd35991 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -935,12 +935,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "da9b19733aa956650b201c1351886ac045119453" + "reference": "8c49f31c04ed4bf34710e43d4115aeba37bbcfaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/da9b19733aa956650b201c1351886ac045119453", - "reference": "da9b19733aa956650b201c1351886ac045119453", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/8c49f31c04ed4bf34710e43d4115aeba37bbcfaa", + "reference": "8c49f31c04ed4bf34710e43d4115aeba37bbcfaa", "shasum": "", "mirrors": [ { @@ -956,7 +956,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2020-01-06T07:42:55+00:00", + "time": "2020-01-08T02:36:41+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index dd7f77464..2b72210b0 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/zoujingli/think-library/src/helper/ValidateHelper.php b/vendor/zoujingli/think-library/src/helper/ValidateHelper.php index 6f1273931..dd35d0743 100644 --- a/vendor/zoujingli/think-library/src/helper/ValidateHelper.php +++ b/vendor/zoujingli/think-library/src/helper/ValidateHelper.php @@ -16,6 +16,7 @@ namespace think\admin\helper; use think\admin\Helper; +use think\Validate; /** * 快捷输入验证器 @@ -38,20 +39,30 @@ class ValidateHelper extends Helper list($name, $alias) = explode('#', $name); } if (stripos($name, '.') === false) { - $data[$name] = empty($alias) ? $name : $alias; + if (is_numeric($name)) { + $keys = $message; + if (is_string($message) && stripos($message, '#') !== false) { + list($name, $alias) = explode('#', $message); + $keys = empty($alias) ? $name : $alias; + } + $data[$name] = input("{$type}{$keys}"); + } else { + $data[$name] = $message; + } } else { list($_rgx) = explode(':', $name); list($_key, $_rule) = explode('.', $name); + $keys = empty($alias) ? $_key : $alias; $info[$_rgx] = $message; - $data[$_key] = empty($alias) ? $_key : $alias; + $data[$_key] = input("{$type}{$keys}"); $rule[$_key] = empty($rule[$_key]) ? $_rule : "{$rule[$_key]}|{$_rule}"; } } - foreach ($data as $key => $name) $data[$key] = input("{$type}{$name}"); - if ($this->app->validate->rule($rule)->message($info)->check($data)) { + $validate = new Validate(); + if ($validate->rule($rule)->message($info)->check($data)) { return $data; } else { - $this->controller->error($this->app->validate->getError()); + $this->controller->error($validate->getError()); } } diff --git a/vendor/zoujingli/think-library/src/queue/WorkQueue.php b/vendor/zoujingli/think-library/src/queue/WorkQueue.php index 13b463bab..61f13c470 100644 --- a/vendor/zoujingli/think-library/src/queue/WorkQueue.php +++ b/vendor/zoujingli/think-library/src/queue/WorkQueue.php @@ -48,7 +48,7 @@ class WorkQueue extends Command */ protected function configure() { - $this->setName('xtask:_work')->setDescription('Create a process to execute a task'); + $this->setName('xtask:_work')->setDescription('Create a process to execute task'); $this->addArgument('code', Argument::OPTIONAL, 'TaskNumber'); $this->addArgument('spts', Argument::OPTIONAL, 'Separator'); }