diff --git a/certificate.html b/certificate.html index 2606609..f8504f0 100644 --- a/certificate.html +++ b/certificate.html @@ -429,9 +429,9 @@ - + - +
@@ -552,6 +552,12 @@ return dateValue; } + // 隐藏电话号码中间四位 + function hidePhoneNumber(phone) { + if (!phone || phone.length !== 11) return phone; + return phone.substring(0, 3) + '****' + phone.substring(7); + } + // 显示合格证信息 function displayCertificate(certificate) { const container = document.getElementById('certificateInfo'); @@ -580,7 +586,7 @@
联系方式: - ${certificate.contact || ''} + ${hidePhoneNumber(certificate.contact) || ''}
开具日期: @@ -839,6 +845,15 @@ padding: 20px; `; + // 创建二维码标题 + const qrTitle = document.createElement('h3'); + qrTitle.style.cssText = ` + color: #28a745; + margin-bottom: 15px; + font-size: 20px; + `; + qrTitle.innerHTML = '📋 导出信息二维码'; + // 创建二维码图片 const qrImage = document.createElement('img'); qrImage.id = 'qrCodeImage'; @@ -859,8 +874,11 @@ text-align: center; margin-bottom: 20px; max-width: 90%; + background-color: rgba(40, 167, 69, 0.1); + padding: 15px; + border-radius: 8px; `; - qrText.innerHTML = '扫描二维码查看完整信息
长按保存二维码'; + qrText.innerHTML = '

作用:查看完整的合格证信息

扫描二维码查看完整信息
长按保存二维码

'; // 创建关闭按钮 const closeBtn = document.createElement('button'); @@ -900,6 +918,7 @@ qrImage.src = qrCodeUrl; // 组装容器 + qrContainer.appendChild(qrTitle); qrContainer.appendChild(qrImage); qrContainer.appendChild(qrText); qrContainer.appendChild(closeBtn); @@ -1027,6 +1046,17 @@ window.onload = function() { loadCertificate(); setupDateInput(); + + // 自动检查提交状态,如果未提交则弹出填写窗口 + setTimeout(function() { + const sessionId = getSessionId(); + const hasSubmitted = sessionStorage.getItem('certificateSubmitted_' + sessionId); + + if (!hasSubmitted) { + // 未提交过,自动打开填写弹窗 + openModal(); + } + }, 500); // 延迟执行,确保页面完全加载 }; diff --git a/invite.html b/invite.html index 33e777f..ca99423 100644 --- a/invite.html +++ b/invite.html @@ -168,9 +168,12 @@
-

邀请二维码

+

📝 邀请二维码

邀请二维码 -

扫描此二维码进入信息填写页面

+
+

作用:邀请他人填写合格证信息

+

扫描此二维码进入信息填写页面

+
diff --git a/view.html b/view.html index b91dc52..a876fd0 100644 --- a/view.html +++ b/view.html @@ -258,7 +258,7 @@
联系方式: - ${certificate.contact || ''} + ${hidePhoneNumber(certificate.contact) || ''}
开具日期: @@ -299,6 +299,12 @@ return dateValue; } + // 隐藏电话号码中间四位 + function hidePhoneNumber(phone) { + if (!phone || phone.length !== 11) return phone; + return phone.substring(0, 3) + '****' + phone.substring(7); + } + // 页面加载时加载信息 window.onload = function() { loadCertificate();