修改类库

This commit is contained in:
wuyanwen 2019-12-27 09:51:48 +08:00
parent 201cb455f5
commit b94800033f
5 changed files with 43 additions and 2 deletions

View File

@ -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));

View File

View File

@ -0,0 +1,13 @@
<template>
$END$
</template>
<script>
export default {
name: 'index'
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
$END$
</template>
<script>
export default {
name: 'login'
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
$END$
</template>
<script>
export default {
name: 'operate'
}
</script>
<style scoped>
</style>