ComposerUpdate

This commit is contained in:
邹景立 2021-06-18 17:00:06 +08:00
parent 43a8afea89
commit d158dc57fc
4 changed files with 21 additions and 12 deletions

View File

@ -849,12 +849,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "dab37cf567def670988c452943022ff1b8bb4176"
"reference": "283b25735511092a6c1c48e4d55b919cf1e09e30"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/dab37cf567def670988c452943022ff1b8bb4176",
"reference": "dab37cf567def670988c452943022ff1b8bb4176",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/283b25735511092a6c1c48e4d55b919cf1e09e30",
"reference": "283b25735511092a6c1c48e4d55b919cf1e09e30",
"shasum": "",
"mirrors": [
{
@ -871,7 +871,7 @@
"ext-mbstring": "*",
"topthink/framework": "^6.0"
},
"time": "2021-05-27T02:17:00+00:00",
"time": "2021-06-18T08:57:57+00:00",
"default-branch": true,
"type": "library",
"extra": {

View File

@ -5,7 +5,7 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '1eaff7a50b3fc13c01311c222522c6070ff7e35b',
'reference' => '43a8afea8902a5269d27519ebb31caa0705e2c82',
'name' => 'zoujingli/thinkadmin',
'dev' => false,
),
@ -144,7 +144,7 @@
'aliases' => array(
0 => '9999999-dev',
),
'reference' => 'dab37cf567def670988c452943022ff1b8bb4176',
'reference' => '283b25735511092a6c1c48e4d55b919cf1e09e30',
'dev_requirement' => false,
),
'zoujingli/thinkadmin' => array(
@ -153,7 +153,7 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '1eaff7a50b3fc13c01311c222522c6070ff7e35b',
'reference' => '43a8afea8902a5269d27519ebb31caa0705e2c82',
'dev_requirement' => false,
),
'zoujingli/wechat-developer' => array(

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2021-06-17 13:29:55
// This file is automatically generated at:2021-06-18 16:59:49
declare (strict_types = 1);
return array (
0 => 'think\\admin\\Library',

View File

@ -157,10 +157,19 @@ class SystemService extends Service
*/
public function sysuri(string $url = '', array $vars = [], $suffix = true, $domain = false): string
{
[$hm, $bs] = [$this->app->config->get('route.url_html_suffix', 'html'), $this->app->route->buildUrl('@')->suffix(false)->domain($domain)->build()];
[$d1, $d2, $d3] = [$this->app->config->get('app.default_app'), Str::snake($this->app->config->get('route.default_controller')), $this->app->config->get('route.default_action')];
$pattern = ["#^({$bs}){$d1}/{$d2}/{$d3}(\.{$hm}|^\w|\?|$)?#i", "#^({$bs}[\w\.]+)/{$d2}/{$d3}(\.{$hm}|^\w|\?|$)#i", "#^({$bs}[\w\.]+)(/[\w\.]+)/{$d3}(\.{$hm}|^\w|$)#i"];
return preg_replace($pattern, ['$1$2', '$1$2', '$1$2$3'], $this->app->route->buildUrl($url, $vars)->suffix($suffix)->domain($domain)->build());
$ext = $this->app->config->get('route.url_html_suffix', 'html');
$pre = $this->app->route->buildUrl('@')->suffix(false)->domain($domain)->build();
$uri = $this->app->route->buildUrl($url, $vars)->suffix($suffix)->domain($domain)->build();
// 默认节点配置数据
$app = $this->app->config->get('app.default_app');
$act = Str::lower($this->app->config->get('route.default_action'));
$ctr = Str::snake($this->app->config->get('route.default_controller'));
// 替换省略链接路径
return preg_replace([
"#^({$pre}){$app}/{$ctr}/{$act}(\.{$ext}|^\w|\?|$)?#i",
"#^({$pre}[\w\.]+)/{$ctr}/{$act}(\.{$ext}|^\w|\?|$)#i",
"#^({$pre}[\w\.]+)(/[\w\.]+)/{$act}(\.{$ext}|^\w|\?|$)#i",
], ['$1$2', '$1$2', '$1$2$3'], $uri);
}
/**