From 9ac2e427d030c766b8d4488cfecd24f1365ed4e9 Mon Sep 17 00:00:00 2001 From: Default User Date: Wed, 4 Mar 2026 17:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=88=E6=A0=BC=E8=AF=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80=EF=BC=8C=E5=B0=86=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E5=92=8C=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=94=BE=E5=9C=A8?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E8=A1=8C=E5=B9=B6=E8=B0=83=E6=95=B4=E9=97=B4?= =?UTF-8?q?=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- certificate.html | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/certificate.html b/certificate.html index 5b53e3d..8e06b19 100644 --- a/certificate.html +++ b/certificate.html @@ -752,19 +752,29 @@ `; if (certificate.signature) { + // 显示二维码 + const sessionId = getSessionId(); + const viewUrl = `http://8.137.125.67:3008/view.html?sessionId=${encodeURIComponent(sessionId)}`; + html += ` -
- 签名: -
- 签名 +
+ 签名与二维码: +
+
+
手写签名
+
+ 签名 +
+
+
+
📋 合格证二维码
+ 二维码 +
`; - - // 显示二维码 - const sessionId = getSessionId(); - const viewUrl = `http://8.137.125.67:3008/view.html?sessionId=${encodeURIComponent(sessionId)}`; - displayQRCodeOnPage(viewUrl); } container.innerHTML = html; @@ -1113,8 +1123,8 @@ // 生成查看页面的URL,包含会话ID const viewUrl = `http://8.137.125.67:3008/view.html?sessionId=${encodeURIComponent(sessionId)}`; - // 生成二维码并在页面下方显示 - displayQRCodeOnPage(viewUrl); + // 生成二维码并显示在弹窗中 + generateQRCode(viewUrl); } else { alert('没有找到可导出的信息'); } @@ -1166,16 +1176,6 @@ border: 1px solid #e0e0e0; `; - // 创建提示文字 - const qrText = document.createElement('div'); - qrText.style.cssText = ` - color: #666; - font-size: 10px; - text-align: center; - line-height: 1.2; - `; - qrText.innerHTML = '

扫描查看完整信息

长按保存二维码

'; - // 使用Google Charts API生成二维码 const qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=140x140&data=${encodeURIComponent(url)}`; @@ -1184,7 +1184,6 @@ // 组装容器 qrContainer.appendChild(qrTitle); qrContainer.appendChild(qrImage); - qrContainer.appendChild(qrText); // 找到合适的位置插入二维码容器 // 在certificate元素内插入