Browse Source

change default percent of bot completed

master
filesite 1 month ago
parent
commit
1eee385902
  1. 2
      themes/beauty/controller/SiteController.php
  2. 2
      www/css/beauty.css
  3. 7
      www/js/beauty.js

2
themes/beauty/controller/SiteController.php

@ -1048,7 +1048,7 @@ Class SiteController extends Controller {
public function actionBotstats() { public function actionBotstats() {
$code = 0; $code = 0;
$msg = 'OK'; $msg = 'OK';
$percent = 0; $percent = 5;
$statsFile = __DIR__ . '/../../../runtime/cache/stats_scan.json'; $statsFile = __DIR__ . '/../../../runtime/cache/stats_scan.json';
if (!file_exists($statsFile)) { if (!file_exists($statsFile)) {

2
www/css/beauty.css

@ -173,7 +173,7 @@ a:link{text-decoration:none}
.simple-form{max-width:480px;margin:0 auto} .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{ .fancybox__container{

7
www/js/beauty.js

@ -935,7 +935,12 @@ if ($('.botstats').length > 0) {
if (data.code != 1) { if (data.code != 1) {
console.warn('Bot stats获取失败', data.msg); console.warn('Bot stats获取失败', data.msg);
}else { }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) { if (data.percent < 100) {
$('.btnStartScan').prop('disabled', true); $('.btnStartScan').prop('disabled', true);
$('.botstats').removeClass('hide'); $('.botstats').removeClass('hide');

Loading…
Cancel
Save