diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 4a8a64500..0418365ca 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -941,12 +941,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "b34dc9c54a212b3f44b4231eec2218c8da1b98c1" + "reference": "4871a421983c89e92e220ae9a30152b6cd6c4504" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b34dc9c54a212b3f44b4231eec2218c8da1b98c1", - "reference": "b34dc9c54a212b3f44b4231eec2218c8da1b98c1", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/4871a421983c89e92e220ae9a30152b6cd6c4504", + "reference": "4871a421983c89e92e220ae9a30152b6cd6c4504", "shasum": "", "mirrors": [ { @@ -963,7 +963,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2020-10-29T02:59:49+00:00", + "time": "2020-10-29T06:49:03+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 8ebed5a5e..907c1e9f3 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/zoujingli/think-library/src/Library.php b/vendor/zoujingli/think-library/src/Library.php index 442ce1dad..cd7f0451b 100644 --- a/vendor/zoujingli/think-library/src/Library.php +++ b/vendor/zoujingli/think-library/src/Library.php @@ -41,7 +41,7 @@ class Library extends Service /** * 版本号 */ - const VERSION = '6.0.18'; + const VERSION = '6.0.19'; /** * 启动服务 diff --git a/vendor/zoujingli/think-library/src/service/NodeService.php b/vendor/zoujingli/think-library/src/service/NodeService.php index 6d21786be..770741977 100644 --- a/vendor/zoujingli/think-library/src/service/NodeService.php +++ b/vendor/zoujingli/think-library/src/service/NodeService.php @@ -48,16 +48,17 @@ class NodeService extends Service public function getCurrent(string $type = ''): string { $prefix = $this->app->http->getName(); - if (preg_match("|\\\\addons\\\\{$prefix}$|", $this->app->getNamespace())) { - $prefix = "addons-{$this->app->http->getName()}"; + $namespace = $this->app->getNamespace(); + if (preg_match("|\\\\addons\\\\{$prefix}$|", $namespace)) { + $prefix = "addons-{$prefix}"; } // 获取应用前缀节点 if ($type === 'module') return $prefix; // 获取控制器前缀节点 - $middle = '\\' . $this->nameTolower($this->app->request->controller()); - if ($type === 'controller') return $prefix . $middle; + $middle = $this->nameTolower($this->app->request->controller()); + if ($type === 'controller') return $prefix . '/' . $middle; // 获取完整的权限节点 - return strtolower(strtr($prefix . $middle . $this->app->request->action(), '\\', '/')); + return $prefix . '/' . $middle . '/' . strtolower($this->app->request->action()); } /** diff --git a/vendor/zoujingli/think-library/src/service/SystemService.php b/vendor/zoujingli/think-library/src/service/SystemService.php index 55dd8da63..9cd90fc93 100644 --- a/vendor/zoujingli/think-library/src/service/SystemService.php +++ b/vendor/zoujingli/think-library/src/service/SystemService.php @@ -331,10 +331,10 @@ class SystemService extends Service */ public function doInit(?\think\App $app = null): void { - if (is_null($app)) $app = new App(); - $http = $app->debug($this->isDebug())->http; - ($response = $http->run())->send(); - $http->end($response); + $this->app = $app ?: $this->app; + $this->app->debug($this->isDebug()); + ($response = $this->app->http->run())->send(); + $this->app->http->end($response); } /**