From 1eee38590255224ae84ef72fd1d8547830375bcd Mon Sep 17 00:00:00 2001 From: filesite Date: Thu, 19 Dec 2024 00:11:19 +0800 Subject: [PATCH] change default percent of bot completed --- themes/beauty/controller/SiteController.php | 2 +- www/css/beauty.css | 2 +- www/js/beauty.js | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index eeb92a6..27fa040 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -1048,7 +1048,7 @@ Class SiteController extends Controller { public function actionBotstats() { $code = 0; $msg = 'OK'; - $percent = 0; + $percent = 5; $statsFile = __DIR__ . '/../../../runtime/cache/stats_scan.json'; if (!file_exists($statsFile)) { diff --git a/www/css/beauty.css b/www/css/beauty.css index 29d81c4..a24da5e 100644 --- a/www/css/beauty.css +++ b/www/css/beauty.css @@ -173,7 +173,7 @@ a:link{text-decoration:none} .simple-form{max-width:480px;margin:0 auto} -.botstats{margin-bottom:1px;margin-left:15px;margin-right:15px} +.botstats{margin-bottom:1px;margin-left:10px;margin-right:10px} /*自动播放图片时隐藏标题*/ .fancybox__container{ diff --git a/www/js/beauty.js b/www/js/beauty.js index ae82763..01227f2 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -935,7 +935,12 @@ if ($('.botstats').length > 0) { if (data.code != 1) { console.warn('Bot stats获取失败', data.msg); }else { - $('.botstats .progress-bar').css('width', data.percent + '%').text('扫描已完成 ' + data.percent + '%'); + $('.botstats .progress-bar').css('width', data.percent + '%'); + if (data.percent >= 10) { + $('.botstats .progress-bar').text('扫描已完成 ' + data.percent + '%'); + }else { + $('.botstats .progress-bar').text(data.percent + '%'); + } if (data.percent < 100) { $('.btnStartScan').prop('disabled', true); $('.botstats').removeClass('hide');