diff --git a/conf/app.php b/conf/app.php index b738a92..9dc8383 100644 --- a/conf/app.php +++ b/conf/app.php @@ -3,8 +3,8 @@ * Config */ $configs = array( - 'version' => '0.4.0', - 'releaseDate' => '2024-11-29', + 'version' => '0.4.1', + 'releaseDate' => '2024-12-18', 'showVersion' => false, //默认不显示版本号和发布日期 'default_timezone' => 'Asia/Hong_Kong', //timezone, check more: https://www.php.net/manual/en/timezones.asia.php diff --git a/themes/beauty/controller/CommandController.php b/themes/beauty/controller/CommandController.php index 3fa1317..feaacb2 100644 --- a/themes/beauty/controller/CommandController.php +++ b/themes/beauty/controller/CommandController.php @@ -152,7 +152,7 @@ eof; } } - sleep(10); + sleep(5); } } diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index 00b4ffd..eeb92a6 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -1052,7 +1052,7 @@ Class SiteController extends Controller { $statsFile = __DIR__ . '/../../../runtime/cache/stats_scan.json'; if (!file_exists($statsFile)) { - $code = 0; + $code = 1; $msg = '还没执行过文件扫描任务'; }else { try { diff --git a/themes/beauty/views/list/bydate.php b/themes/beauty/views/list/bydate.php index d946292..de30664 100644 --- a/themes/beauty/views/list/bydate.php +++ b/themes/beauty/views/list/bydate.php @@ -88,7 +88,7 @@ eof; echo << 还没有索引数据! - + eof; } diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 955ef89..a2df086 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -96,7 +96,10 @@ eof; echo << 还没有索引数据! - +
+ +
+ 请在完成后刷新网页查看 eof; } @@ -362,7 +365,7 @@ eof;

咦?没有文件哦

- 空目录吗?复制照片目录或文件到目录后点右上角“清空缓存数据刷新”图标清空缓存。 + 空目录吗?复制照片、视频等文件到目录后点右上角“清空缓存数据刷新”图标清空缓存。
如果不是空目录,点右上角“清空缓存数据刷新”图标清空缓存,网页有 10 分钟缓存。

diff --git a/www/js/beauty.js b/www/js/beauty.js index 1b55200..ae82763 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -937,6 +937,7 @@ if ($('.botstats').length > 0) { }else { $('.botstats .progress-bar').css('width', data.percent + '%').text('扫描已完成 ' + data.percent + '%'); if (data.percent < 100) { + $('.btnStartScan').prop('disabled', true); $('.botstats').removeClass('hide'); $('.botstats .progress-bar').removeClass('progress-bar-success'); setTimeout(refreshBotStats, 10000); @@ -944,6 +945,7 @@ if ($('.botstats').length > 0) { $('.botstats .progress-bar').addClass('progress-bar-success'); setTimeout(function() { $('.botstats').addClass('hide'); + $('.btnStartScan').removeAttr('disabled'); }, 3000); } } @@ -954,3 +956,21 @@ if ($('.botstats').length > 0) { refreshBotStats(); } + +/* MainBot扫描启动 */ +$('.btnStartScan').click(function() { + $.ajax({ + url: '/site/startbot', + method: 'POST', + dataType: 'json' + }).done(function(data) { + if (data.code != 1) { + alert('文件扫描开始失败:' + data.msg); + }else { + location.reload(); + } + }).fail(function(jqXHR, textStatus, errorThrown) { + alert('文件扫描开始失败,错误信息:' + errorThrown); + console.error('文件扫描开始失败,错误信息:' + errorThrown); + }); +});