|
|
|
@ -752,19 +752,29 @@ |
|
|
|
`; |
|
|
|
|
|
|
|
if (certificate.signature) { |
|
|
|
// 显示二维码 |
|
|
|
const sessionId = getSessionId(); |
|
|
|
const viewUrl = `http://8.137.125.67:3008/view.html?sessionId=${encodeURIComponent(sessionId)}`; |
|
|
|
|
|
|
|
html += ` |
|
|
|
<div class="info-item"> |
|
|
|
<span class="label">签名:</span> |
|
|
|
<div class="signature-display"> |
|
|
|
<img src="${certificate.signature}" alt="签名" style="max-width: 200px; max-height: 100px;"> |
|
|
|
<div class="info-item" style="display: flex; flex-direction: column; align-items: flex-start; padding: 12px 0;"> |
|
|
|
<span class="label" style="margin-bottom: 10px;">签名与二维码:</span> |
|
|
|
<div style="display: flex; align-items: flex-start; width: 100%;"> |
|
|
|
<div style="flex: 1; min-width: 0; padding-right: 10px;"> |
|
|
|
<div style="font-size: 13px; color: #666; margin-bottom: 6px;">手写签名</div> |
|
|
|
<div class="signature-display" style="display: block; padding: 0;"> |
|
|
|
<img src="${certificate.signature}" alt="签名" style="max-width: 100%; max-height: 120px; object-fit: contain; margin: 0;"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="flex-shrink: 0; text-align: center;"> |
|
|
|
<div style="color: #28a745; margin-bottom: 8px; font-size: 13px; font-weight: 500;">📋 合格证二维码</div> |
|
|
|
<img src="https://api.qrserver.com/v1/create-qr-code/?size=140x140&data=${encodeURIComponent(viewUrl)}" |
|
|
|
alt="二维码" |
|
|
|
style="width: 120px; height: 120px; background-color: white; padding: 6px; border-radius: 6px; border: 1px solid #e0e0e0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
`; |
|
|
|
|
|
|
|
// 显示二维码 |
|
|
|
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 = '<p style="margin-bottom: 1px;">扫描查看完整信息</p><p>长按保存二维码</p>'; |
|
|
|
|
|
|
|
|
|
|
|
// 使用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元素内插入 |
|
|
|
|