Просмотр исходного кода

后台清理缓存新增临时文件项

萤火科技 3 лет назад
Родитель
Сommit
a637b32f5e
2 измененных файлов с 10 добавлено и 1 удалено
  1. 2 1
      app/admin/service/Cache.php
  2. 8 0
      app/store/service/setting/Clear.php

+ 2 - 1
app/admin/service/Cache.php

@@ -53,7 +53,8 @@ class Cache extends BaseService
         if (in_array('temp', $data['item'])) {
             $paths = [
                 'temp' => web_path() . 'temp/',
-                'runtime' => runtime_root_path() . 'image/'
+                'runtime-image' => runtime_root_path() . 'image/',
+                'runtime-local' => runtime_root_path() . 'local/',
             ];
             foreach ($paths as $path) {
                 $this->deleteFolder($path);

+ 8 - 0
app/store/service/setting/Clear.php

@@ -68,6 +68,14 @@ class Clear extends BaseService
                     'runtime' => runtime_root_path() . "/image/{$storeId}/",
                 ]
             ],
+            'local' => [
+                'type' => self::ITEM_TYPE_FILE,
+                'name' => '临时文件',
+                'dirPath' => [
+                    'batch-delivery' => runtime_root_path() . "local/batch-delivery/{$storeId}/",
+                    'goods-import' => runtime_root_path() . "local/goods-import/{$storeId}/",
+                ]
+            ],
         ];
     }