From 3f45e8fdfa31d7b764d60a7c0cb5dd11944ed418 Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期一, 21 九月 2026 23:38:59 +0800
Subject: [PATCH] bug:统计数据修正
---
cloud-server-management/src/main/webapp/static/js/common/sensitive-info.js | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/static/js/common/sensitive-info.js b/cloud-server-management/src/main/webapp/static/js/common/sensitive-info.js
new file mode 100644
index 0000000..98490ba
--- /dev/null
+++ b/cloud-server-management/src/main/webapp/static/js/common/sensitive-info.js
@@ -0,0 +1,41 @@
+/** Admin-only sensitive-information viewer. Every request is audited by the server. */
+var SensitiveInfo = {
+ view: function (url) {
+ layer.confirm('查看完整敏感信息将记录操作日志,是否继续?', {
+ icon: 3,
+ title: '敏感信息查看'
+ }, function (index) {
+ $.ajax({
+ url: Feng.ctxPath + url,
+ type: 'GET',
+ success: function (data) {
+ layer.close(index);
+ if (!data) {
+ Feng.info('未查询到敏感信息');
+ return;
+ }
+ // 弹窗只展示手机号;接口中的 id、name 等定位字段不应暴露给页面。
+ var phone = data.phone || data.mobile || data.telephone || data.tel || data.name;
+ if (!phone) {
+ Feng.info('未查询到手机号');
+ return;
+ }
+ var content = '<div class="form-horizontal" style="padding:20px"><div class="form-group">'
+ + '<label class="col-sm-4 control-label">手机号:</label><div class="col-sm-8">'
+ + '<p class="form-control-static">' + SensitiveInfo.escape(String(phone))
+ + '</p></div></div></div>';
+ layer.open({type: 1, title: '敏感信息', area: ['480px', 'auto'], content: content});
+ },
+ error: function (xhr) {
+ layer.close(index);
+ Feng.error(xhr.responseJSON && xhr.responseJSON.message ? xhr.responseJSON.message : '敏感信息查询失败');
+ }
+ });
+ });
+ },
+ escape: function (value) {
+ return value.replace(/[&<>'"]/g, function (char) {
+ return {'&': '&', '<': '<', '>': '>', "'": ''', '"': '"'}[char];
+ });
+ }
+};
--
Gitblit v1.7.1