mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update InstallService.php
This commit is contained in:
parent
89ab78ec92
commit
d0f86d6212
@ -44,6 +44,7 @@ class InstallService extends Service
|
|||||||
{
|
{
|
||||||
$this->root = strtr($this->app->getRootPath(), '\\', '/');
|
$this->root = strtr($this->app->getRootPath(), '\\', '/');
|
||||||
$this->server = ModuleService::instance()->getServer();
|
$this->server = ModuleService::instance()->getServer();
|
||||||
|
dump($this->server);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,6 +81,7 @@ class InstallService extends Service
|
|||||||
$result = json_decode(HttpExtend::post("{$this->server}/admin/api.update/node", [
|
$result = json_decode(HttpExtend::post("{$this->server}/admin/api.update/node", [
|
||||||
'rules' => json_encode($rules1), 'ignore' => json_encode($ignore1),
|
'rules' => json_encode($rules1), 'ignore' => json_encode($ignore1),
|
||||||
]), true);
|
]), true);
|
||||||
|
dump($result);
|
||||||
if (!empty($result['code'])) {
|
if (!empty($result['code'])) {
|
||||||
$new = $this->getList($result['data']['rules'], $result['data']['ignore']);
|
$new = $this->getList($result['data']['rules'], $result['data']['ignore']);
|
||||||
foreach ($this->_grenerateDifferenceContrast($result['data']['list'], $new['list']) as $file) {
|
foreach ($this->_grenerateDifferenceContrast($result['data']['list'], $new['list']) as $file) {
|
||||||
@ -88,6 +90,7 @@ class InstallService extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dump($data);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +192,7 @@ class InstallService extends Service
|
|||||||
private function _scanList($path, $data = []): array
|
private function _scanList($path, $data = []): array
|
||||||
{
|
{
|
||||||
foreach (NodeService::instance()->scanDirectory($path) as $file) {
|
foreach (NodeService::instance()->scanDirectory($path) as $file) {
|
||||||
$data[] = $this->_getInfo($file);
|
$data[] = $this->_getInfo(strtr($file, '\\', '/'));
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user