diff --git a/shopxo/app/plugins/vr_ticket/view/admin/ticket/verify.html b/shopxo/app/plugins/vr_ticket/view/admin/ticket/verify.html
index d61463c..963b4a3 100644
--- a/shopxo/app/plugins/vr_ticket/view/admin/ticket/verify.html
+++ b/shopxo/app/plugins/vr_ticket/view/admin/ticket/verify.html
@@ -13,19 +13,19 @@
今日核销
-
{{$stats.today_verified|default=0}}
+
加载中...
待核销
-
{{$stats.pending|default=0}}
+
加载中...
已核销总数
-
{{$stats.total_verified|default=0}}
+
加载中...
@@ -138,6 +138,35 @@ function showResult(res) {
// 刷新统计(可选)
// loadStats();
+
+function loadStats() {
+ $.ajax({
+ url: '{{:PluginsAdminUrl('vr_ticket', 'admin', 'TicketStats')}}',
+ type: 'POST',
+ dataType: 'json',
+ success: function(res) {
+ if (res.code === 0 && res.data) {
+ $('#stat-today').text(res.data.today || 0);
+ $('#stat-pending').text(res.data.pending || 0);
+ $('#stat-verified').text(res.data.verified || 0);
+ } else {
+ $('#stat-today').text('-');
+ $('#stat-pending').text('-');
+ $('#stat-verified').text('-');
+ }
+ },
+ error: function() {
+ $('#stat-today').text('-');
+ $('#stat-pending').text('-');
+ $('#stat-verified').text('-');
+ }
+ });
+}
+
+// 页面加载时获取统计
+$(function() {
+ loadStats();
+});
} else {
html = '
' +
'
核销失败
' +