diff --git a/extend/catcher/command/BackupCommand.php b/extend/catcher/command/BackupCommand.php index f35bc27..c6a6d19 100644 --- a/extend/catcher/command/BackupCommand.php +++ b/extend/catcher/command/BackupCommand.php @@ -52,7 +52,7 @@ class BackupCommand extends Command * @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\DataNotFoundException */ - public function generator($tables, $path) + public function generator($tables, $path): void { foreach ($tables as $table) { $this->table = $table; @@ -168,7 +168,9 @@ class BackupCommand extends Command if (extension_loaded('zip')) { $files = glob(CatchAdmin::backupDirectory() . '*.sql'); $zip = new \ZipArchive(); - $zip->open(root_path('database/') . 'backup.zip', \ZipArchive::CREATE); + $backupPath = runtime_path('database/'); + CatchAdmin::makeDirectory($backupPath); + $zip->open($backupPath . 'backup.zip', \ZipArchive::CREATE); $zip->addEmptyDir('backup'); foreach ($files as $file) { $zip->addFile($file, 'backup/'. basename($file)); diff --git a/view/catch-admin/src/api/database.js b/view/catch-admin/src/api/database.js new file mode 100644 index 0000000..e69de29 diff --git a/view/catch-admin/src/views/system/database/index.vue b/view/catch-admin/src/views/system/database/index.vue new file mode 100644 index 0000000..7a0d037 --- /dev/null +++ b/view/catch-admin/src/views/system/database/index.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/view/catch-admin/src/views/system/log/login.vue b/view/catch-admin/src/views/system/log/login.vue new file mode 100644 index 0000000..c9e4d7e --- /dev/null +++ b/view/catch-admin/src/views/system/log/login.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/view/catch-admin/src/views/system/log/operate.vue b/view/catch-admin/src/views/system/log/operate.vue new file mode 100644 index 0000000..2589ff3 --- /dev/null +++ b/view/catch-admin/src/views/system/log/operate.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file