Update InstallService.php

This commit is contained in:
Anyon 2020-08-24 12:56:02 +08:00
parent 89ab78ec92
commit d0f86d6212

View File

@ -44,6 +44,7 @@ class InstallService extends Service
{
$this->root = strtr($this->app->getRootPath(), '\\', '/');
$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", [
'rules' => json_encode($rules1), 'ignore' => json_encode($ignore1),
]), true);
dump($result);
if (!empty($result['code'])) {
$new = $this->getList($result['data']['rules'], $result['data']['ignore']);
foreach ($this->_grenerateDifferenceContrast($result['data']['list'], $new['list']) as $file) {
@ -88,6 +90,7 @@ class InstallService extends Service
}
}
}
dump($data);
return $data;
}
@ -189,7 +192,7 @@ class InstallService extends Service
private function _scanList($path, $data = []): array
{
foreach (NodeService::instance()->scanDirectory($path) as $file) {
$data[] = $this->_getInfo($file);
$data[] = $this->_getInfo(strtr($file, '\\', '/'));
}
return $data;
}