Browse Source

improve proccess bar show

master
filesite 4 weeks ago
parent
commit
1e5863c022
  1. 2
      themes/beauty/controller/SiteController.php
  2. 4
      www/js/beauty.js

2
themes/beauty/controller/SiteController.php

@ -1048,7 +1048,7 @@ Class SiteController extends Controller { @@ -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)) {

4
www/js/beauty.js

@ -946,10 +946,10 @@ if ($('.botstats').length > 0) { @@ -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;

Loading…
Cancel
Save