diff --git a/composer.lock b/composer.lock index 548ee14..65ca0b7 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "league/flysystem", - "version": "1.0.63", + "version": "1.0.64", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d13c43dbd4b791f815215959105a008515d1a2e0", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0", "shasum": "", "mirrors": [ { @@ -35,7 +35,7 @@ }, "require-dev": { "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" + "phpunit/phpunit": "^5.7.26" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -94,7 +94,7 @@ "sftp", "storage" ], - "time": "2020-01-04T16:30:31+00:00" + "time": "2020-02-05T18:14:17+00:00" }, { "name": "league/flysystem-cached-adapter", @@ -800,16 +800,16 @@ }, { "name": "topthink/think-view", - "version": "v1.0.13", + "version": "v1.0.14", "source": { "type": "git", "url": "https://github.com/top-think/think-view.git", - "reference": "90803b73f781db5d42619082c4597afc58b2d4c5" + "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-view/zipball/90803b73f781db5d42619082c4597afc58b2d4c5", - "reference": "90803b73f781db5d42619082c4597afc58b2d4c5", + "url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d", + "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d", "shasum": "", "mirrors": [ { @@ -839,22 +839,22 @@ } ], "description": "thinkphp template driver", - "time": "2019-10-07T12:23:10+00:00" + "time": "2019-11-06T11:40:13+00:00" } ], "packages-dev": [ { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "", "mirrors": [ { @@ -872,7 +872,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -906,20 +906,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "", "mirrors": [ { @@ -934,7 +934,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -967,20 +967,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.4.2", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99" + "reference": "46b53fd714568af343953c039ff47b67ce8af8d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/be330f919bdb395d1e0c3f2bfb8948512d6bdd99", - "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46b53fd714568af343953c039ff47b67ce8af8d6", + "reference": "46b53fd714568af343953c039ff47b67ce8af8d6", "shasum": "", "mirrors": [ { @@ -1049,7 +1049,7 @@ "debug", "dump" ], - "time": "2019-12-18T13:41:29+00:00" + "time": "2020-01-25T12:44:29+00:00" } ], "aliases": [], diff --git a/database/migrations/20190728015455_create_table_upload_files.php b/database/migrations/20190728015455_create_table_upload_files.php index 55e1753..c4a1218 100644 --- a/database/migrations/20190728015455_create_table_upload_files.php +++ b/database/migrations/20190728015455_create_table_upload_files.php @@ -36,10 +36,10 @@ class CreateTableUploadFiles extends Migrator $table->addColumn('ext_name','string',['limit'=>10,'comment'=>'扩展名']); $table->addColumn('file_md5','string',['limit'=>32,'comment'=>'文件md5值']); $table->addColumn('file_sha1','string',['limit'=>40,'comment'=>'文件sha1值']); - $table->addColumn('create_time','integer',['limit'=>10,'comment'=>'上传时间']); - $table->addColumn('used_time','integer',['limit'=>10,'comment'=>'标记使用时间,如果为空,可能仅作为了预览图']); - $table->addColumn('delete_time','integer',['limit'=>10,'comment'=>'删除时间']); - $table->addColumn('clear_time','integer',['limit'=>10,'comment'=>'清空时间']); + $table->addColumn('create_time','integer',['limit'=>10,'default'=>0,'comment'=>'上传时间']); + $table->addColumn('used_time','integer',['limit'=>10,'default'=>0,'comment'=>'标记使用时间,如果为空,可能仅作为了预览图']); + $table->addColumn('delete_time','integer',['limit'=>10,'default'=>0,'comment'=>'删除时间']); + $table->addColumn('clear_time','integer',['limit'=>10,'default'=>0,'comment'=>'清空时间']); $table->addColumn('type','integer',['limit'=>2,'default'=>1,'comment'=>'文件类型,1:系统logo;2:管理员头像']); $table->addColumn('status','integer',['limit'=>2,'default'=>0,'comment'=>'文件状态:0,上传未使用,1:已使用,2:已删除,3已清除']); $table->addIndex('save_name'); diff --git a/view/admin/file/index.html b/view/admin/file/index.html index 410c48e..92df203 100644 --- a/view/admin/file/index.html +++ b/view/admin/file/index.html @@ -102,12 +102,12 @@
+ {if condition="empty($vo->getData('clear_time'))" } {if condition="!empty($vo->getData('used_time')) && empty($vo->getData('delete_time'))" }
强制清除文件
{else /} - {if condition="empty($vo->getData('clear_time'))" }
清除文件
- {/if} + {/if} {/if} {if condition="empty($vo->getData('clear_time'))" } 下载 @@ -150,6 +150,7 @@ },function(result){ if(result.code == 0){ layer.msg('删除成功'); + $(item).parents('td').children().remove() }else{ layer.msg(result.msg) } @@ -165,6 +166,7 @@ },function(result){ if(result.code == 0){ layer.msg('删除成功'); + $(item).parents('td').children().remove() }else{ layer.msg(result.msg) }