|
@@ -279,7 +279,7 @@
|
|
|
display: none;
|
|
display: none;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .remove-Contestant {
|
|
|
|
|
|
|
+ .remove-Contestant {
|
|
|
padding: 7px 15px;
|
|
padding: 7px 15px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
background-color: #db3434;
|
|
background-color: #db3434;
|
|
@@ -420,8 +420,29 @@
|
|
|
display: block;
|
|
display: block;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- #registerBtn1 {
|
|
|
|
|
- display: none;
|
|
|
|
|
|
|
+ .help {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ width: 50px;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ bottom: 10px;
|
|
|
|
|
+ left: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .help::after{
|
|
|
|
|
+ content: '?';
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 50%;
|
|
|
|
|
+ left: 50%;
|
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
|
+ font-size: 24px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .help-qrCode{
|
|
|
|
|
+ width: 50%;
|
|
|
|
|
+ padding: 20px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.235.1.min.js"></script>
|
|
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.235.1.min.js"></script>
|
|
@@ -451,6 +472,7 @@
|
|
|
<button class="menu-btn active" id="downloadBtn">资料下载</button>
|
|
<button class="menu-btn active" id="downloadBtn">资料下载</button>
|
|
|
<button class="menu-btn" id="registerBtn">在线报名</button>
|
|
<button class="menu-btn" id="registerBtn">在线报名</button>
|
|
|
<button class="menu-btn" id="registerBtn1">资格确认</button>
|
|
<button class="menu-btn" id="registerBtn1">资格确认</button>
|
|
|
|
|
+ <span onclick="help()" class="help"></span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 右侧内容区域 -->
|
|
<!-- 右侧内容区域 -->
|
|
@@ -489,6 +511,13 @@
|
|
|
href="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/a/%E6%8A%A5%E5%90%8D%E8%A1%A8.docx"
|
|
href="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/a/%E6%8A%A5%E5%90%8D%E8%A1%A8.docx"
|
|
|
class="download-btn" download>下载</a>
|
|
class="download-btn" download>下载</a>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="download-item">
|
|
|
|
|
+ <div class="file-icon">🎬</div>
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <div class="file-title">宣讲视频</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button onclick="openVideo()" class="download-btn" style="font-size: 16px;"> 播放</button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -531,11 +560,14 @@
|
|
|
<!-- 步骤2:填写报名信息 -->
|
|
<!-- 步骤2:填写报名信息 -->
|
|
|
<div id="step2" class="step-container">
|
|
<div id="step2" class="step-container">
|
|
|
<div class="step-title">第二步:填写报名信息</div>
|
|
<div class="step-title">第二步:填写报名信息</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="form-group" style="display: flex;align-items: center;">
|
|
<div class="form-group" style="display: flex;align-items: center;">
|
|
|
<label class="form-label required" for="name">指导教师</label>
|
|
<label class="form-label required" for="name">指导教师</label>
|
|
|
- <input style="width: 200px;margin-left: 20px;margin-right: 15px;" type="text" id="teacher" class="form-input" required>
|
|
|
|
|
- <div class="error" id="name-error1">请输入指导教师</div>
|
|
|
|
|
|
|
+ <input style="width: 200px;margin-left: 20px;margin-right: 15px;" type="text" id="teacher"
|
|
|
|
|
+ class="form-input">
|
|
|
|
|
+ <label class="form-label required" for="name">手机号</label>
|
|
|
|
|
+ <input style="width: 200px;margin-left: 20px;margin-right: 15px;" type="text" id="teacherPhone"
|
|
|
|
|
+ class="form-input">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-container" id="formContainer">
|
|
<div class="form-container" id="formContainer">
|
|
|
<input type="hidden" id="competitionType" value="">
|
|
<input type="hidden" id="competitionType" value="">
|
|
@@ -683,17 +715,22 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+
|
|
|
const requesturl = window.location.href.indexOf("localhost") > -1 ? "http://localhost:11111" : "http://183.36.25.93:888/";
|
|
const requesturl = window.location.href.indexOf("localhost") > -1 ? "http://localhost:11111" : "http://183.36.25.93:888/";
|
|
|
console.log("requesturl:", requesturl);
|
|
console.log("requesturl:", requesturl);
|
|
|
|
|
|
|
|
const nowTime = new Date();
|
|
const nowTime = new Date();
|
|
|
- const givenTime = new Date("2025-10-13")
|
|
|
|
|
- if (givenTime - nowTime > 0) {
|
|
|
|
|
- document.getElementById('registerBtn1').style.display = "none";
|
|
|
|
|
- } else {
|
|
|
|
|
- document.getElementById('registerBtn1').style.display = "block";
|
|
|
|
|
|
|
+ const deadline = new Date("2025-09-22");
|
|
|
|
|
+
|
|
|
|
|
+ // 2025-09-22之前,只有带参数(如 ?)可以打开,之后都可以打开
|
|
|
|
|
+ if (nowTime < deadline && window.location.search === "") {
|
|
|
|
|
+ alert("报名未开放");
|
|
|
|
|
+ document.body.innerHTML = "<div style='display:flex;justify-content:center;align-items:center;height:100vh;font-size:2rem;color:#db3434;'>报名未开放</div>";
|
|
|
|
|
+ throw new Error("报名未开放");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 切换下载和报名区域
|
|
// 切换下载和报名区域
|
|
|
document.getElementById('downloadBtn').addEventListener('click', function () {
|
|
document.getElementById('downloadBtn').addEventListener('click', function () {
|
|
|
document.getElementById('downloadBtn').classList.add('active');
|
|
document.getElementById('downloadBtn').classList.add('active');
|
|
@@ -710,8 +747,13 @@
|
|
|
document.getElementById('registerBtn').classList.remove('active');
|
|
document.getElementById('registerBtn').classList.remove('active');
|
|
|
document.getElementById('downloadSection').classList.remove('active');
|
|
document.getElementById('downloadSection').classList.remove('active');
|
|
|
document.getElementById('registrationSection').classList.remove('active');
|
|
document.getElementById('registrationSection').classList.remove('active');
|
|
|
- document.getElementById('uploadSection').classList.add('active');
|
|
|
|
|
document.getElementsByClassName("button-Contestant")[0].classList.remove('active');
|
|
document.getElementsByClassName("button-Contestant")[0].classList.remove('active');
|
|
|
|
|
+ document.getElementById('uploadSection').classList.add('active');
|
|
|
|
|
+ const uploadTime = new Date("2025-10-13");
|
|
|
|
|
+ if (nowTime < uploadTime) {
|
|
|
|
|
+ document.getElementById('uploadSection').innerHTML = "<div style='display:flex;justify-content:center;align-items:center;height:100vh;font-size:2rem;color:#db3434;'>资格确认在2025-10-13开放上传</div>";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
let buttonContestant = false
|
|
let buttonContestant = false
|
|
|
document.getElementById('registerBtn').addEventListener('click', function () {
|
|
document.getElementById('registerBtn').addEventListener('click', function () {
|
|
@@ -775,7 +817,7 @@
|
|
|
num = num + 1;
|
|
num = num + 1;
|
|
|
addList.push(num)
|
|
addList.push(num)
|
|
|
const ifFirst = addList.find(item => item === 1);
|
|
const ifFirst = addList.find(item => item === 1);
|
|
|
- let addListLength = addList.length+1;
|
|
|
|
|
|
|
+ let addListLength = addList.length + 1;
|
|
|
if (ifFirst) {
|
|
if (ifFirst) {
|
|
|
addListLength = addList.length
|
|
addListLength = addList.length
|
|
|
}
|
|
}
|
|
@@ -904,7 +946,7 @@
|
|
|
createDiv.appendChild(formCrate);
|
|
createDiv.appendChild(formCrate);
|
|
|
html.appendChild(createDiv);
|
|
html.appendChild(createDiv);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
function removeContestant(e) {
|
|
function removeContestant(e) {
|
|
|
const parentElement = Number(e.target.parentElement.id && e.target.parentElement.id.slice(16));
|
|
const parentElement = Number(e.target.parentElement.id && e.target.parentElement.id.slice(16));
|
|
@@ -934,9 +976,9 @@
|
|
|
let phoneError = '';
|
|
let phoneError = '';
|
|
|
let i = 0
|
|
let i = 0
|
|
|
let isFirst = addList.find(item => item === 1);
|
|
let isFirst = addList.find(item => item === 1);
|
|
|
- if(!isFirst) addList.unshift(1);
|
|
|
|
|
-
|
|
|
|
|
- for (let j = 0; j <= addList.length-1; j++) {
|
|
|
|
|
|
|
+ if (!isFirst) addList.unshift(1);
|
|
|
|
|
+
|
|
|
|
|
+ for (let j = 0; j <= addList.length - 1; j++) {
|
|
|
let element = null;
|
|
let element = null;
|
|
|
let errorElement = null;
|
|
let errorElement = null;
|
|
|
let isValid = true;
|
|
let isValid = true;
|
|
@@ -973,7 +1015,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!isValid) {
|
|
if (!isValid) {
|
|
|
- alert(`选手${j+1}填写信息有误,请重新填写`);
|
|
|
|
|
|
|
+ alert(`选手${j + 1}填写信息有误,请重新填写`);
|
|
|
return;
|
|
return;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -993,15 +1035,20 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const teacher = document.getElementById('teacher').value;
|
|
const teacher = document.getElementById('teacher').value;
|
|
|
- if(!teacher) {
|
|
|
|
|
|
|
+ if (!teacher) {
|
|
|
alert('请填写指导老师');
|
|
alert('请填写指导老师');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ const teacherPhone = document.getElementById('teacherPhone').value;
|
|
|
|
|
+ if (!teacherPhone) {
|
|
|
|
|
+ alert('请填写指导老师手机号');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
try {
|
|
try {
|
|
|
// 收集表单数据
|
|
// 收集表单数据
|
|
|
const formDataObj = {
|
|
const formDataObj = {
|
|
|
type: selectedCompetitionId, // 报名类型,1桌游,2智能体
|
|
type: selectedCompetitionId, // 报名类型,1桌游,2智能体
|
|
|
- uploadUrl: teacher, // 上传文件的URL
|
|
|
|
|
|
|
+ uploadUrl: teacher + teacherPhone, // 上传文件的URL
|
|
|
idCard: formData.map(item => item.id_number).join(","), // 选手身份证号拼接
|
|
idCard: formData.map(item => item.id_number).join(","), // 选手身份证号拼接
|
|
|
registrationFormUrl: "", // 报名表上传URL
|
|
registrationFormUrl: "", // 报名表上传URL
|
|
|
user: JSON.stringify(formData),
|
|
user: JSON.stringify(formData),
|
|
@@ -1112,6 +1159,42 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ async function help() {
|
|
|
|
|
+ const img1 = `<img class="help-qrCode" src="./1.png" />`
|
|
|
|
|
+ const img2 = `<img class="help-qrCode" src="./2.png" />`
|
|
|
|
|
+ showModal(img1 + img2)
|
|
|
|
|
+ }
|
|
|
|
|
+ async function openVideo() {
|
|
|
|
|
+ // const video = `<video style="width:100%;height:100%" src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/f41a07d8-2cab-76b2-2b5b-8211d98bdb0c/%E9%A6%AC%E6%88%B2%E5%9C%98%E6%A9%9F%E5%99%A8%E4%BA%BA.mp4" controls autoplay></video>`
|
|
|
|
|
+ showModal("宣讲视频暂无...")
|
|
|
|
|
+ }
|
|
|
|
|
+ </script>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Modal -->
|
|
|
|
|
+ <div id="modal" style="display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,0.4);z-index:999;justify-content:center;align-items:center;">
|
|
|
|
|
+ <div style="background:#fff;padding:30px 20px;border-radius:10px;width:800px;box-shadow:0 4px 24px rgba(0,0,0,0.2);position:relative;">
|
|
|
|
|
+ <span id="modalClose" style="position:absolute;top:10px;right:15px;font-size:22px;cursor:pointer;">×</span>
|
|
|
|
|
+ <div id="modalContent"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <script>
|
|
|
|
|
+ // 显示modal
|
|
|
|
|
+ function showModal(content) {
|
|
|
|
|
+ document.getElementById('modalContent').innerHTML = content;
|
|
|
|
|
+ document.getElementById('modal').style.display = 'flex';
|
|
|
|
|
+ }
|
|
|
|
|
+ // 关闭modal
|
|
|
|
|
+ document.getElementById('modalClose').onclick = function() {
|
|
|
|
|
+ document.getElementById('modal').style.display = 'none';
|
|
|
|
|
+ };
|
|
|
|
|
+ // 点击遮罩关闭
|
|
|
|
|
+ document.getElementById('modal').onclick = function(e) {
|
|
|
|
|
+ if (e.target === this) this.style.display = 'none';
|
|
|
|
|
+ };
|
|
|
|
|
+ // 示例:点击左下角问号弹出帮助
|
|
|
|
|
+ // document.querySelector('.help').onclick = function() {
|
|
|
|
|
+ // showModal('如有疑问请联系组委会邮箱:ccrb@cocorobo.cn<br>或电话:020-8251-0085');
|
|
|
|
|
+ // };
|
|
|
</script>
|
|
</script>
|
|
|
</body>
|
|
</body>
|
|
|
|
|
|