Serve dashboard stats from daily_stats and default visit list to today.

Stop live-scanning page_visits on every dashboard load (including today) so the admin home stays fast; keep the live path only for channel filters and cache the result for 45s.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
root
2026-10-11 09:46:38 +00:00
parent 11caef98fc
commit fcbc479c2e
9 changed files with 550 additions and 76 deletions
+4 -4
View File
@@ -11,10 +11,10 @@
<label class="layui-form-label">时间</label>
<div class="layui-input-block">
<select name="range">
<option value="30d" selected>近30天</option>
<option value="7d">近7天</option>
<option value="today" selected>今日</option>
<option value="yesterday">昨日</option>
<option value="today">今日</option>
<option value="7d">近7天</option>
<option value="30d">近30天</option>
</select>
</div>
</div>
@@ -80,7 +80,7 @@
<script>
layui.use(['table', 'form', 'layer'], function () {
var table = layui.table, form = layui.form, layer = layui.layer, $ = layui.$;
var where = { range: '30d' };
var where = { range: 'today' };
var logsUrl = @json(route($portal.'.visits.logs'));
if (window.CorunaFilterOptions) CorunaFilterOptions.apply(form);