fix(admin): 修复命中记录页时间渲染依赖不存在的 API

This commit is contained in:
augushong
2026-08-15 10:48:15 +08:00
parent 79dc98e3e4
commit 296269d66d

View File

@@ -23,7 +23,12 @@ $(function(){
if (isNaN(ts) || ts <= 0) {
return '-';
}
return window.UA_CORE.util.toDateString(ts * 1000, 'yyyy-MM-dd HH:mm:ss');
var dt = new Date(ts * 1000);
var p = function (n) {
return n < 10 ? '0' + n : '' + n;
};
return dt.getFullYear() + '-' + p(dt.getMonth() + 1) + '-' + p(dt.getDate())
+ ' ' + p(dt.getHours()) + ':' + p(dt.getMinutes()) + ':' + p(dt.getSeconds());
}},
{field: 'ct', title: '命中次数', width: 100, search: 'number_limit'},
{field: 'wt_sum', title: '耗时合计(ms)', width: 140, search: 'number_limit', templet: function(d) {