diff --git a/web/admin/logs/__init__.py b/web/admin/logs/__init__.py index 22993f2a8..2d2218616 100644 --- a/web/admin/logs/__init__.py +++ b/web/admin/logs/__init__.py @@ -54,7 +54,7 @@ def del_panel_logs(): @panel_login_required def get_audit_logs_files(): logs_file = adult_log.getAuditLogsFiles() - return logs_file + return mw.returnData(True, 'ok', logs_file) # 系统审计日志列表 @blueprint.route('/get_audit_file', endpoint='get_audit_file', methods=['POST']) diff --git a/web/static/app/logs.js b/web/static/app/logs.js index 18f46c210..24590f2e2 100644 --- a/web/static/app/logs.js +++ b/web/static/app/logs.js @@ -58,7 +58,8 @@ $('#panelLogs .clear').click(function(){ function getAuditLogsFiles(){ var loadT = layer.msg('正在获取日志审计列表...', { icon: 16, time: 0, shade: 0.3 }); - $.post('/logs/get_audit_logs_files',{}, function(data) { + $.post('/logs/get_audit_logs_files',{}, function(rdata) { + var data = rdata.data; layer.close(loadT); var option = ''; for (var i = 0; i < data.length; i++) {