fix: link old

This commit is contained in:
hashbro
2026-09-14 01:09:01 +08:00
parent b49755c900
commit d5ae0bf6ff
29 changed files with 1584 additions and 212 deletions
@@ -176,41 +176,6 @@
</div>
</div>
<div class="layui-row layui-col-space15" style="margin-top:4px;">
<div class="layui-col-md4">
<div class="layui-card">
<div class="layui-card-header">访问 · 按系统(UV / 占比)</div>
<div class="layui-card-body">
<table class="layui-table" lay-size="sm">
<thead><tr><th>系统</th><th>UV</th><th>占比</th></tr></thead>
<tbody id="dash-by-os"><tr><td colspan="3">—</td></tr></tbody>
</table>
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="layui-card">
<div class="layui-card-header">访问 · 按 iOS 版本(UV / 占比)</div>
<div class="layui-card-body">
<table class="layui-table" lay-size="sm">
<thead><tr><th>版本</th><th>UV</th><th>占比</th></tr></thead>
<tbody id="dash-by-ios-version"><tr><td colspan="3">—</td></tr></tbody>
</table>
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="layui-card">
<div class="layui-card-header">受控设备 · 系统版本分布</div>
<div class="layui-card-body">
<table class="layui-table" lay-size="sm">
<thead><tr><th>版本</th><th>设备数</th><th>占比</th></tr></thead>
<tbody id="dash-by-device-ios"><tr><td colspan="3">—</td></tr></tbody>
</table>
</div>
</div>
</div>
</div>
<div class="layui-word-aux" id="dash-range" style="margin-top:8px;"></div>
</div>
</div>
@@ -279,24 +244,6 @@ layui.use(['form', 'laydate', 'layer'], function () {
return where;
}
function fillRows(sel, rows) {
var html = '';
(rows || []).forEach(function (r) {
var pct = (r.pct === undefined || r.pct === null) ? '—' : (r.pct + '%');
html += '<tr><td>' + (r.label || '—') + '</td><td>' + r.uv + '</td><td>' + pct + '</td></tr>';
});
$(sel).html(html || '<tr><td colspan="3">暂无</td></tr>');
}
function fillDeviceVersionRows(sel, rows) {
var html = '';
(rows || []).forEach(function (r) {
var pct = (r.pct === undefined || r.pct === null) ? '—' : (r.pct + '%');
html += '<tr><td>' + (r.label || '—') + '</td><td>' + r.count + '</td><td>' + pct + '</td></tr>';
});
$(sel).html(html || '<tr><td colspan="3">暂无</td></tr>');
}
function ratioHtml(effective, total) {
return '<span class="dash-metric-hl">' + effective + '</span>' +
'<span class="dash-metric-sep">/</span>' +
@@ -321,9 +268,6 @@ layui.use(['form', 'laydate', 'layer'], function () {
var right = c === 'bnb' ? '—' : (tx[c] != null && tx[c] !== '' ? tx[c] : '0');
$('#dash-coin-' + c).html(ratioHtml(left, right));
});
fillRows('#dash-by-os', res.data.by_os);
fillRows('#dash-by-ios-version', res.data.by_ios_version);
fillDeviceVersionRows('#dash-by-device-ios', res.data.by_device_ios_version);
$('#dash-range').text('统计区间:' + res.data.from + ' ~ ' + res.data.to);
});
}