|
@@ -472,7 +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>
|
|
|
- <button class="menu-btn" id="registerBtn2">作品提交</button>
|
|
|
|
|
|
|
+ <button class="menu-btn" id="registerBtn2">作品提交(桌游设计挑战类比赛)</button>
|
|
|
<span onclick="help()" class="help"></span>
|
|
<span onclick="help()" class="help"></span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -748,6 +748,32 @@
|
|
|
<button type="submit" class="submit-btn" onclick="submitRegistration()">提交报名表</button>
|
|
<button type="submit" class="submit-btn" onclick="submitRegistration()">提交报名表</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 上传报名表单 -->
|
|
|
|
|
+ <div class="registration-section" id="uploadSection2">
|
|
|
|
|
+ <h2 class="content-header">作品提交</h2>
|
|
|
|
|
+ <div class="download-list">
|
|
|
|
|
+ <div class="form-row">
|
|
|
|
|
+ <div class="form-col">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label class="form-label required" for="idNumber">身份证号码</label>
|
|
|
|
|
+ <input type="text" id="id_number2" class="form-input" required pattern="\d{17}[\dXx]"
|
|
|
|
|
+ placeholder="请填写在线报名时,团队内任一选手的身份证号码">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form-row">
|
|
|
|
|
+ <div class="form-col">
|
|
|
|
|
+ <div class="file-upload">
|
|
|
|
|
+ <label class="form-label required" for="photo">上传作品说明文件</label>
|
|
|
|
|
+ <input type="file" id="uploadFile2" required>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button type="submit" class="submit-btn" onclick="submitRegistration2()">提交报名表</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -780,7 +806,7 @@
|
|
|
<img src="./logo1.png" alt="logo" style="width: 200px;margin-right: 15px;"></img>
|
|
<img src="./logo1.png" alt="logo" style="width: 200px;margin-right: 15px;"></img>
|
|
|
<div class="event-name">第六届广东省青少年创新思维及科技实践大赛(创新思维类选手报名)</div>`
|
|
<div class="event-name">第六届广东省青少年创新思维及科技实践大赛(创新思维类选手报名)</div>`
|
|
|
}
|
|
}
|
|
|
- document.getElementById("registerBtn2").style.display = "none";
|
|
|
|
|
|
|
+ //document.getElementById("registerBtn2").style.display = "none";
|
|
|
|
|
|
|
|
if (document.getElementById("registerBtn1").innerText == "作品提交") {
|
|
if (document.getElementById("registerBtn1").innerText == "作品提交") {
|
|
|
document.getElementById("registerBtn2").style.display = "none";
|
|
document.getElementById("registerBtn2").style.display = "none";
|
|
@@ -826,21 +852,19 @@
|
|
|
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.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 && !urlSearch.length > 0) {
|
|
|
|
|
- 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>";
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ document.getElementById('uploadSection').remove.add('active');
|
|
|
|
|
+ document.getElementById('uploadSection2').classList.add('active');
|
|
|
});
|
|
});
|
|
|
let buttonContestant = false
|
|
let buttonContestant = false
|
|
|
document.getElementById('registerBtn').addEventListener('click', function () {
|
|
document.getElementById('registerBtn').addEventListener('click', function () {
|
|
|
document.getElementById('registerBtn').classList.add('active');
|
|
document.getElementById('registerBtn').classList.add('active');
|
|
|
|
|
+ document.getElementById('registerBtn2').classList.remove('active');
|
|
|
document.getElementById('downloadBtn').classList.remove('active');
|
|
document.getElementById('downloadBtn').classList.remove('active');
|
|
|
document.getElementById('registerBtn1').classList.remove('active');
|
|
document.getElementById('registerBtn1').classList.remove('active');
|
|
|
document.getElementById('registrationSection').classList.add('active');
|
|
document.getElementById('registrationSection').classList.add('active');
|
|
|
document.getElementById('downloadSection').classList.remove('active');
|
|
document.getElementById('downloadSection').classList.remove('active');
|
|
|
document.getElementById('uploadSection').classList.remove('active');
|
|
document.getElementById('uploadSection').classList.remove('active');
|
|
|
|
|
+ document.getElementById('uploadSection2').classList.remove('active');
|
|
|
console.log("selectedCompetitionId:", selectedCompetitionId);
|
|
console.log("selectedCompetitionId:", selectedCompetitionId);
|
|
|
if (buttonContestant) {
|
|
if (buttonContestant) {
|
|
|
document.getElementsByClassName("button-Contestant")[0].classList.add('active');
|
|
document.getElementsByClassName("button-Contestant")[0].classList.add('active');
|
|
@@ -1301,9 +1325,11 @@
|
|
|
alert(`报名失败: ${error.message}`);
|
|
alert(`报名失败: ${error.message}`);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
async function submitRegistration() {
|
|
async function submitRegistration() {
|
|
|
var area = urlSearch.slice(1)
|
|
var area = urlSearch.slice(1)
|
|
|
- if (area.indexOf("longhua") >-1 || area.indexOf("guangming") >-1 ) {alert("报名时间已截止"); return}
|
|
|
|
|
|
|
+ if (area.indexOf("longhua") > -1 || area.indexOf("guangming") > -1) { alert("报名时间已截止"); return }
|
|
|
const idNumber = document.getElementById('id_number');
|
|
const idNumber = document.getElementById('id_number');
|
|
|
const CompetitionType = document.getElementById('CompetitionType');
|
|
const CompetitionType = document.getElementById('CompetitionType');
|
|
|
if (!idNumber.value && !CompetitionType.value) {
|
|
if (!idNumber.value && !CompetitionType.value) {
|
|
@@ -1351,6 +1377,48 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ async function submitRegistration2() {
|
|
|
|
|
+ const idNumber = document.getElementById('id_number');
|
|
|
|
|
+ const uploadFile2 = document.getElementById('uploadFile2');
|
|
|
|
|
+ if (!idNumber.value) {
|
|
|
|
|
+ alert('请选择比赛类型和填写身份证号');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (uploadFile2 == "") {
|
|
|
|
|
+ alert('请上传报名文件');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!confirm('如已上传过文件,本次上传会覆盖之前上传,是否确定提交吗?')) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ const response = await fetch(requesturl + "api/update", {
|
|
|
|
|
+ method: "POST",
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ "Content-Type": "application/json"
|
|
|
|
|
+ },
|
|
|
|
|
+ body: JSON.stringify({
|
|
|
|
|
+ url: uploadFile2,
|
|
|
|
|
+ id_number: idNumber.value,
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ area: ""
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ if (!response.ok) {
|
|
|
|
|
+ throw new Error('信息更新失败');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const registerData = await response.json();
|
|
|
|
|
+ console.log(registerData);
|
|
|
|
|
+ alert(registerData.message);
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('信息更新失败:', error);
|
|
|
|
|
+ alert(error.message);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
async function help() {
|
|
async function help() {
|
|
|
const img1 = `<img class="help-qrCode" src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0960e9b6-2687-b858-2285-455c29eac369/code2.png" />`
|
|
const img1 = `<img class="help-qrCode" src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0960e9b6-2687-b858-2285-455c29eac369/code2.png" />`
|
|
|
const img2 = `<div><span>创新思维赛 桌游设计挑战类 答疑群</span><br /><img class="help-qrCode" src="./2.png" /></div>`
|
|
const img2 = `<div><span>创新思维赛 桌游设计挑战类 答疑群</span><br /><img class="help-qrCode" src="./2.png" /></div>`
|