From 632bde0f32999a2b319b706e23d90bc1b5dd8cc2 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 21 四月 2026 17:22:56 +0800
Subject: [PATCH] 1.新增拍照功能

---
 src/main/webapp/static/js/common.js |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index c90f1d2..614d7ec 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -284,6 +284,40 @@
     return(false);
 }
 
+function showPhotoViewer(layer, urls) {
+    if (!urls || urls.length === 0) {
+        layer.msg('鏆傛棤鐓х墖');
+        return;
+    }
+    var html = '<div style="padding:16px;display:flex;flex-wrap:wrap;gap:12px;max-height:70vh;overflow:auto;background:#f7f7f7;">';
+    for (var i = 0; i < urls.length; i++) {
+        var url = escapePhotoHtml(urls[i]);
+        html += '<a href="' + url + '" target="_blank" style="display:block;width:360px;max-width:100%;background:#fff;border:1px solid #e6e6e6;padding:8px;">'
+            + '<img src="' + url + '" style="display:block;width:100%;height:auto;max-height:360px;object-fit:contain;" alt="photo">'
+            + '</a>';
+    }
+    html += '</div>';
+    layer.open({
+        type: 1,
+        title: '鏌ョ湅鐓х墖',
+        area: ['900px', '75%'],
+        maxmin: true,
+        shadeClose: true,
+        content: html
+    });
+}
+
+function escapePhotoHtml(value) {
+    if (value === undefined || value === null) {
+        return '';
+    }
+    return String(value)
+        .replace(/&/g, '&amp;')
+        .replace(/"/g, '&quot;')
+        .replace(/</g, '&lt;')
+        .replace(/>/g, '&gt;');
+}
+
 /**
  * 鑾峰彇AI鍔╂墜SVG鍥炬爣HTML
  * @param {number} width 瀹藉害锛岄粯璁�48

--
Gitblit v1.9.1