mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
b4a2669cab
commit
c27f6b336e
8
composer.lock
generated
8
composer.lock
generated
@ -937,12 +937,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "adb49d4408625e7a4bb50c3292377d154a10b3d3"
|
"reference": "dc2052ced8b4edf72914d4276ee35346f43af582"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/adb49d4408625e7a4bb50c3292377d154a10b3d3",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/dc2052ced8b4edf72914d4276ee35346f43af582",
|
||||||
"reference": "adb49d4408625e7a4bb50c3292377d154a10b3d3",
|
"reference": "dc2052ced8b4edf72914d4276ee35346f43af582",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -987,7 +987,7 @@
|
|||||||
],
|
],
|
||||||
"description": "ThinkPHP v6.0 Development Library",
|
"description": "ThinkPHP v6.0 Development Library",
|
||||||
"homepage": "http://thinkadmin.top",
|
"homepage": "http://thinkadmin.top",
|
||||||
"time": "2020-08-20T05:52:53+00:00"
|
"time": "2020-08-20T07:41:23+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "zoujingli/wechat-developer",
|
"name": "zoujingli/wechat-developer",
|
||||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -963,12 +963,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "adb49d4408625e7a4bb50c3292377d154a10b3d3"
|
"reference": "dc2052ced8b4edf72914d4276ee35346f43af582"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/adb49d4408625e7a4bb50c3292377d154a10b3d3",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/dc2052ced8b4edf72914d4276ee35346f43af582",
|
||||||
"reference": "adb49d4408625e7a4bb50c3292377d154a10b3d3",
|
"reference": "dc2052ced8b4edf72914d4276ee35346f43af582",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -985,7 +985,7 @@
|
|||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-08-20T05:52:53+00:00",
|
"time": "2020-08-20T07:41:23+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-08-20 14:38:32
|
// This file is automatically generated at:2020-08-20 17:38:41
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\admin\\Library',
|
0 => 'think\\admin\\Library',
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
namespace think\admin\multiple;
|
namespace think\admin\multiple;
|
||||||
|
|
||||||
|
use think\helper\Str;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多应用URL生成与解析
|
* 多应用URL生成与解析
|
||||||
* Class Url
|
* Class Url
|
||||||
@ -49,7 +51,7 @@ class Url extends \think\route\Url
|
|||||||
$action = array_pop($path);
|
$action = array_pop($path);
|
||||||
$controller = empty($path) ? $controller : array_pop($path);
|
$controller = empty($path) ? $controller : array_pop($path);
|
||||||
$app = empty($path) ? $app : array_pop($path);
|
$app = empty($path) ? $app : array_pop($path);
|
||||||
$url = $controller . '/' . $action;
|
$url = Str::snake($controller) . '/' . $action;
|
||||||
$bind = $this->app->config->get('app.domain_bind', []);
|
$bind = $this->app->config->get('app.domain_bind', []);
|
||||||
if ($key = array_search($app, $bind)) {
|
if ($key = array_search($app, $bind)) {
|
||||||
isset($bind[$_SERVER['SERVER_NAME']]) && $domain = $_SERVER['SERVER_NAME'];
|
isset($bind[$_SERVER['SERVER_NAME']]) && $domain = $_SERVER['SERVER_NAME'];
|
||||||
@ -87,15 +89,15 @@ class Url extends \think\route\Url
|
|||||||
$anchor = $info['fragment'];
|
$anchor = $info['fragment'];
|
||||||
if (false !== strpos($anchor, '?')) {
|
if (false !== strpos($anchor, '?')) {
|
||||||
// 解析参数
|
// 解析参数
|
||||||
list($anchor, $info['query']) = explode('?', $anchor, 2);
|
[$anchor, $info['query']] = explode('?', $anchor, 2);
|
||||||
}
|
}
|
||||||
if (false !== strpos($anchor, '@')) {
|
if (false !== strpos($anchor, '@')) {
|
||||||
// 解析域名
|
// 解析域名
|
||||||
list($anchor, $domain) = explode('@', $anchor, 2);
|
[$anchor, $domain] = explode('@', $anchor, 2);
|
||||||
}
|
}
|
||||||
} elseif (strpos($url, '@') && false === strpos($url, '\\')) {
|
} elseif (strpos($url, '@') && false === strpos($url, '\\')) {
|
||||||
// 解析域名
|
// 解析域名
|
||||||
list($url, $domain) = explode('@', $url, 2);
|
[$url, $domain] = explode('@', $url, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($url) {
|
if ($url) {
|
||||||
|
@ -17,6 +17,7 @@ namespace think\admin\service;
|
|||||||
|
|
||||||
use think\admin\extend\DataExtend;
|
use think\admin\extend\DataExtend;
|
||||||
use think\admin\Service;
|
use think\admin\Service;
|
||||||
|
use think\helper\Str;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统权限管理服务
|
* 系统权限管理服务
|
||||||
@ -74,8 +75,12 @@ class AdminService extends Service
|
|||||||
if ($this->isSuper()) return true;
|
if ($this->isSuper()) return true;
|
||||||
$service = NodeService::instance();
|
$service = NodeService::instance();
|
||||||
[$real, $nodes] = [$service->fullnode($node), $service->getMethods()];
|
[$real, $nodes] = [$service->fullnode($node), $service->getMethods()];
|
||||||
foreach ($nodes as $key => $rule) if (stripos($key, '_') !== false) {
|
foreach ($nodes as $key => $rule) {
|
||||||
$nodes[str_replace('_', '', $key)] = $rule;
|
if (strpos($key, '_') !== false && strpos($key, '/') !== false) {
|
||||||
|
$attr = explode('/', $key);
|
||||||
|
$attr[1] = strtr($attr[1], ['_' => '']);
|
||||||
|
$nodes[join('/', $attr)] = $rule;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!empty($nodes[$real]['isauth'])) {
|
if (!empty($nodes[$real]['isauth'])) {
|
||||||
return in_array($real, $this->app->session->get('user.nodes', []));
|
return in_array($real, $this->app->session->get('user.nodes', []));
|
||||||
|
@ -102,11 +102,11 @@ class NodeService extends Service
|
|||||||
$ignores = get_class_methods('\think\admin\Controller');
|
$ignores = get_class_methods('\think\admin\Controller');
|
||||||
foreach ($this->_scanDirectory($this->app->getBasePath()) as $file) {
|
foreach ($this->_scanDirectory($this->app->getBasePath()) as $file) {
|
||||||
if (preg_match("|/(\w+)/(\w+)/controller/(.+)\.php$|i", $file, $matches)) {
|
if (preg_match("|/(\w+)/(\w+)/controller/(.+)\.php$|i", $file, $matches)) {
|
||||||
list(, $namespace, $appname, $classname) = $matches;
|
[, $namespace, $appname, $classname] = $matches;
|
||||||
$class = new \ReflectionClass(strtr("{$namespace}/{$appname}/controller/{$classname}", '/', '\\'));
|
|
||||||
$prefix = strtr("{$appname}/{$this->nameTolower($classname)}", '\\', '/');
|
$prefix = strtr("{$appname}/{$this->nameTolower($classname)}", '\\', '/');
|
||||||
$data[$prefix] = $this->_parseComment($class->getDocComment(), $classname);
|
$reflection = new \ReflectionClass(strtr("{$namespace}/{$appname}/controller/{$classname}", '/', '\\'));
|
||||||
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
|
$data[$prefix] = $this->_parseComment($reflection->getDocComment(), $classname);
|
||||||
|
foreach ($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
|
||||||
if (in_array($metname = $method->getName(), $ignores)) continue;
|
if (in_array($metname = $method->getName(), $ignores)) continue;
|
||||||
$data["{$prefix}/{$metname}"] = $this->_parseComment($method->getDocComment(), $metname);
|
$data["{$prefix}/{$metname}"] = $this->_parseComment($method->getDocComment(), $metname);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user