You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
210 lines
5.0 KiB
210 lines
5.0 KiB
|
1 month ago
|
<!DOCTYPE html>
|
||
|
|
<html lang="zh-CN">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||
|
|
<title>生成邀请二维码</title>
|
||
|
|
<style>
|
||
|
|
* {
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
body {
|
||
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||
|
|
background-color: #f5f5f5;
|
||
|
|
color: #333;
|
||
|
|
-webkit-overflow-scrolling: touch;
|
||
|
|
overflow-x: hidden;
|
||
|
|
position: relative;
|
||
|
|
touch-action: manipulation;
|
||
|
|
}
|
||
|
|
|
||
|
|
html, body {
|
||
|
|
height: 100%;
|
||
|
|
overflow: hidden;
|
||
|
|
overscroll-behavior: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.container {
|
||
|
|
max-width: 480px;
|
||
|
|
margin: 0 auto;
|
||
|
|
background-color: white;
|
||
|
|
height: 100%;
|
||
|
|
overflow-y: auto;
|
||
|
|
-webkit-overflow-scrolling: touch;
|
||
|
|
position: relative;
|
||
|
|
padding: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.header {
|
||
|
|
text-align: center;
|
||
|
|
margin-bottom: 30px;
|
||
|
|
padding-top: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.header h1 {
|
||
|
|
font-size: 24px;
|
||
|
|
color: #28a745;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.header p {
|
||
|
|
font-size: 16px;
|
||
|
|
color: #666;
|
||
|
|
}
|
||
|
|
|
||
|
|
.qr-container {
|
||
|
|
text-align: center;
|
||
|
|
margin: 30px 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
#qrCodeImage {
|
||
|
|
max-width: 300px;
|
||
|
|
max-height: 300px;
|
||
|
|
margin: 0 auto;
|
||
|
|
background-color: white;
|
||
|
|
padding: 15px;
|
||
|
|
border-radius: 10px;
|
||
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||
|
|
}
|
||
|
|
|
||
|
|
.info-box {
|
||
|
|
background-color: #f8f9fa;
|
||
|
|
border-radius: 8px;
|
||
|
|
padding: 15px;
|
||
|
|
margin: 20px 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.info-box h3 {
|
||
|
|
font-size: 18px;
|
||
|
|
color: #333;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.info-box p {
|
||
|
|
font-size: 14px;
|
||
|
|
color: #666;
|
||
|
|
line-height: 1.5;
|
||
|
|
margin-bottom: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.action-buttons {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
gap: 15px;
|
||
|
|
margin-top: 30px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn {
|
||
|
|
padding: 15px;
|
||
|
|
border: none;
|
||
|
|
border-radius: 8px;
|
||
|
|
font-size: 16px;
|
||
|
|
font-weight: 500;
|
||
|
|
cursor: pointer;
|
||
|
|
text-align: center;
|
||
|
|
transition: background-color 0.3s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-primary {
|
||
|
|
background-color: #28a745;
|
||
|
|
color: white;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-primary:hover {
|
||
|
|
background-color: #218838;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-secondary {
|
||
|
|
background-color: #6c757d;
|
||
|
|
color: white;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-secondary:hover {
|
||
|
|
background-color: #5a6268;
|
||
|
|
}
|
||
|
|
|
||
|
|
.footer {
|
||
|
|
text-align: center;
|
||
|
|
margin-top: 40px;
|
||
|
|
padding: 20px 0;
|
||
|
|
font-size: 14px;
|
||
|
|
color: #999;
|
||
|
|
border-top: 1px solid #f0f0f0;
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 480px) {
|
||
|
|
.container {
|
||
|
|
max-width: 100%;
|
||
|
|
padding: 15px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.header h1 {
|
||
|
|
font-size: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
#qrCodeImage {
|
||
|
|
max-width: 250px;
|
||
|
|
max-height: 250px;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="container">
|
||
|
|
<div class="header">
|
||
|
|
<h1>生成邀请二维码</h1>
|
||
|
|
<p>创建一个二维码,邀请他人填写合格证信息</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="info-box">
|
||
|
|
<h3>使用说明</h3>
|
||
|
|
<p>1. 点击下方按钮生成邀请二维码</p>
|
||
|
|
<p>2. 将生成的二维码分享给需要填写信息的人</p>
|
||
|
|
<p>3. 对方扫描二维码后,填写完整的合格证信息并提交</p>
|
||
|
|
<p>4. 您可以扫描下方二维码查看和导出已填写的信息</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="qr-container">
|
||
|
|
<h3>邀请二维码</h3>
|
||
|
|
<img id="qrCodeImage" src="" alt="邀请二维码">
|
||
|
|
<p style="margin-top: 10px; color: #666;">扫描此二维码进入信息填写页面</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="action-buttons">
|
||
|
|
<button class="btn btn-primary" onclick="generateInviteQR()">重新生成二维码</button>
|
||
|
|
<button class="btn btn-secondary" onclick="window.location.href='certificate.html'">返回主页面</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="footer">
|
||
|
|
技术支持:四川又鸟蛋贸易有限公司
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
// 生成邀请二维码
|
||
|
|
function generateInviteQR() {
|
||
|
|
// 生成包含会话ID的URL
|
||
|
|
const sessionId = 'session_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
|
||
|
|
const inviteUrl = `http://8.137.125.67:3008/certificate.html?sessionId=${encodeURIComponent(sessionId)}`;
|
||
|
|
|
||
|
|
// 使用Google Charts API生成二维码
|
||
|
|
const qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=${encodeURIComponent(inviteUrl)}`;
|
||
|
|
|
||
|
|
// 更新二维码图片
|
||
|
|
document.getElementById('qrCodeImage').src = qrCodeUrl;
|
||
|
|
|
||
|
|
// 显示成功提示
|
||
|
|
alert('邀请二维码生成成功!\n\n请将此二维码分享给需要填写信息的人。\n\n对方填写完成后,您可以通过相同的二维码查看和导出信息。');
|
||
|
|
}
|
||
|
|
|
||
|
|
// 页面加载时自动生成二维码
|
||
|
|
window.onload = function() {
|
||
|
|
generateInviteQR();
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|