diff --git a/app/admin/controller/File.php b/app/admin/controller/File.php index 2a1441c35..f860f386f 100644 --- a/app/admin/controller/File.php +++ b/app/admin/controller/File.php @@ -29,6 +29,17 @@ use think\admin\Storage; */ class File extends Controller { + protected $types; + + /** + * 控制器初始化 + * @return void + */ + protected function initialize() + { + $this->types = Storage::types(); + } + /** * 系统文件管理 * @auth true @@ -39,7 +50,6 @@ class File extends Controller */ public function index() { - $this->types = Storage::types(); SystemFile::mQuery()->layTable(function () { $this->title = '系统文件管理'; $this->xexts = SystemFile::mk()->distinct()->column('xext'); @@ -61,6 +71,16 @@ class File extends Controller } } + /** + * 编辑系统文件 + * @auth true + * @return void + */ + public function edit() + { + SystemFile::mForm('form'); + } + /** * 删除系统文件 * @auth true diff --git a/app/admin/view/file/form.html b/app/admin/view/file/form.html new file mode 100644 index 000000000..d934ec911 --- /dev/null +++ b/app/admin/view/file/form.html @@ -0,0 +1,39 @@ +
+ +
+ + + + + + + + + + + +
+ +
+ {notempty name='vo.id'}{/notempty} + +
+ + +
+
\ No newline at end of file diff --git a/app/admin/view/file/index.html b/app/admin/view/file/index.html index f6bad60c1..01a6c3352 100644 --- a/app/admin/view/file/index.html +++ b/app/admin/view/file/index.html @@ -48,13 +48,16 @@ }, {field: 'ctype', title: '存储方式', align: 'center', width: '10%'}, {field: 'create_at', title: '上传时间', align: 'center', width: '15%', sort: true}, - {toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 90, fixed: 'right'} + {toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 140, fixed: 'right'} ]] }); });