From 1e5863c022513edb28d5b599e4266f6cfaaba46b Mon Sep 17 00:00:00 2001 From: filesite Date: Fri, 20 Dec 2024 19:02:05 +0800 Subject: [PATCH] improve proccess bar show --- themes/beauty/controller/SiteController.php | 2 +- www/js/beauty.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index 27fa040..d0e242a 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 = 5; + $percent = 1; $statsFile = __DIR__ . '/../../../runtime/cache/stats_scan.json'; if (!file_exists($statsFile)) { diff --git a/www/js/beauty.js b/www/js/beauty.js index 5ad6501..b251f1a 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -946,10 +946,10 @@ if ($('.botstats').length > 0) { console.warn('Bot stats获取失败', data.msg); }else { $('.botstats .progress-bar').css('width', data.percent + '%'); - if (data.percent >= 10) { + if (data.percent >= 5) { $('.botstats .progress-bar').text('扫描已完成 ' + data.percent + '%'); }else { - $('.botstats .progress-bar').text(data.percent + '%'); + $('.botstats .progress-bar').text(''); } if (data.percent < 100) { didScan = true;