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元素内插入