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.
105 lines
7.0 KiB
105 lines
7.0 KiB
2 months ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>import</title>
|
||
|
<link rel="stylesheet" href="styles.css">
|
||
|
<style>
|
||
|
/* 其他样式保持不变 */
|
||
|
.login-button {
|
||
|
cursor: pointer; /* 将鼠标指针设置为点击状态 */
|
||
|
}
|
||
|
.sign-up-link {
|
||
|
cursor: pointer;
|
||
|
color: black;
|
||
|
font-size: 20px;
|
||
|
font-family: Inter;
|
||
|
font-weight: 500;
|
||
|
text-decoration: none; /* 去掉超链接的下划线 */
|
||
|
}
|
||
|
/* 隐藏文件输入 */
|
||
|
#file-input {
|
||
|
display: none;
|
||
|
}
|
||
|
</style>
|
||
|
<script>
|
||
|
function redirectToPage() {
|
||
|
window.location.href = 'page.html'; //
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div style="width: 100vw; height: auto; position: relative; background: #FAFAF9">
|
||
|
<img style="width: 100vw; height: auto; top: 105px; position: absolute" src="E:\softwareengineer\work2\frontend\assets\d3.png" />
|
||
|
<div style="width: 100vw; height: 105px; left: 0px; top: 0px; position: absolute; background: #006FFF"></div>
|
||
|
<div style="width: 182px; height: 182px; left: 27%; top: 234px; position: absolute" class="login-button" onclick="redirectToimport()">
|
||
|
<div style="width: 182px; height: 182px; left: 0px; top: 0px; position: absolute; background: #FFB812; border-radius: 40px; border: 2px black dotted"></div>
|
||
|
<div style="width: 104px; height: 106px; left: 39px; top: 22px; position: absolute; border-radius: 40px; overflow: hidden">
|
||
|
<img style="width: 69.33px; height: 83.92px; left: 17.33px; top: 8.83px; position: absolute" src="E:\softwareengineer\work2\frontend\emoji\download1.png" />
|
||
|
</div>
|
||
|
<div style="width: 80px; height: 28px; left: 51px; top: 128px; position: absolute; color: black; font-size: 20px; font-family: Inter; font-weight: 400; word-wrap: break-word">导入名单</div>
|
||
|
</div>
|
||
|
<div style="width: 182px; height: 182px; left: 27%; top: 554px; position: absolute" class="login-button" onclick="redirectToexport()">
|
||
|
<div style="width: 182px; height: 182px; left: 0px; top: 0px; position: absolute; background: #FFB812; border-radius: 40px; border: 2px black dotted"></div>
|
||
|
<div style="width: 80px; height: 28px; left: 51px; top: 131px; position: absolute; color: black; font-size: 20px; font-family: Inter; font-weight: 400; word-wrap: break-word">导出名单</div>
|
||
|
<div style="width: 104px; height: 106px; left: 39px; top: 25px; position: absolute">
|
||
|
<img style="width: 69.33px; height: 83.92px; left: 17.33px; top: 8.83px; position: absolute" src="E:\softwareengineer\work2\frontend\emoji\export1.png" />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="width: 182px; height: 182px; left: 60%; top: 234px; position: absolute" class="login-button" onclick="redirectTorollname()">
|
||
|
<div style="width: 182px; height: 182px; left: 0px; top: 0px; position: absolute; background: #FFB812; border-radius: 40px; border: 2px black dotted"></div>
|
||
|
<div style="width: 80px; height: 28px; left: 51px; top: 128px; position: absolute; color: black; font-size: 20px; font-family: Inter; font-weight: 400; word-wrap: break-word">随机点名</div>
|
||
|
<div style="width: 104px; height: 106px; left: 39px; top: 22px; position: absolute">
|
||
|
<img style="width: 60.67px; height: 88.33px; left: 21.67px; top: 8.83px; position: absolute" src="E:\softwareengineer\work2\frontend\emoji\rollname1.png" />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="width: 182px; height: 182px; left: 60%; top: 554px; position: absolute" class="login-button" onclick="redirectTocrazy()">
|
||
|
<div style="width: 182px; height: 182px; left: 0px; top: 0px; position: absolute; background: #FFB812; border-radius: 40px; border: 2px black dotted"></div>
|
||
|
<div style="width: 80px; height: 28px; left: 52px; top: 131px; position: absolute; color: black; font-size: 20px; font-family: Inter; font-weight: 400; word-wrap: break-word">疯狂模式</div>
|
||
|
<div style="width: 104px; height: 106px; left: 39px; top: 25px; position: absolute">
|
||
|
<img style="width: 78px; height: 79.50px; left: 13px; top: 13.25px; position: absolute" src="E:\softwareengineer\work2\frontend\emoji\crazy1.png" />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="width: 481px; height: 93px; left: 5%; top: -9px; position: absolute; color: white; font-size: 96px; font-family: Alfa Slab One; font-weight: 400; word-wrap: break-word">FUClass</div>
|
||
|
<a href="log_in.html" style="width: 83px; height: 29px; left: 90%; top: 67px; position: absolute; color: white; font-size: 24px; font-family: Inter; font-style: italic; font-weight: 400; word-wrap: break-word; text-decoration: none;">log out</a>
|
||
|
</div>
|
||
|
<div style="width: 100%; height: 900px; left: 0px; top: 110px; position: absolute; opacity: 0.70; background: #D9D9D9" class="login-button" onclick="redirectToPage()"></div>
|
||
|
<div style="width: 324px; height: 241px; left: 40%; top: 375px; position: absolute">
|
||
|
<div style="width: 324px; height: 241px; left: 0px; top: 0px; position: absolute; background: white; border-radius: 30px; border: 1px black solid"></div>
|
||
|
<a href="page.html" style="width: 52px; height: 29px; left: 138px; top: 196px; position: absolute; color: #2499F8; font-size: 24px; font-family: Inter; font-weight: 400; word-wrap: break-word; text-decoration: none;">取消</a>
|
||
|
<div style="left: 90px; top: 53px; position: absolute; color: black; font-size: 24px; font-family: Inter; font-weight: 400; word-wrap: break-word">选择导入文件</div>
|
||
|
<a href="javascript:void(0);" id="browse-btn" style="left: 138px; top: 146px; position: absolute; color: black; font-size: 24px; font-family: Inter; font-weight: 400; word-wrap: break-word">浏览</a> <!-- 浏览按钮 -->
|
||
|
<input type="file" id="file-input" name="file" required><br><br>
|
||
|
<div style="width: 322px; height: 0px; left: 0; top: 55%; position: absolute; border: 1px black solid"></div>
|
||
|
<div style="width: 322px; height: 0px; left: 0; top: 78%; position: absolute; border: 1px black solid"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script>
|
||
|
// 获取浏览按钮并添加点击事件
|
||
|
document.getElementById('browse-btn').addEventListener('click', function() {
|
||
|
// 触发文件输入的点击事件
|
||
|
document.getElementById('file-input').click();
|
||
|
});
|
||
|
|
||
|
if (file) {
|
||
|
const formData = new FormData();
|
||
|
formData.append('file', file);
|
||
|
|
||
|
fetch('/api/upload-file', {
|
||
|
method: 'POST',
|
||
|
body: formData
|
||
|
})
|
||
|
.then(response => response.json())
|
||
|
.then(data => {
|
||
|
console.log('Success:', data);
|
||
|
alert('文件上传成功!');
|
||
|
})
|
||
|
.catch((error) => {
|
||
|
console.error('Error:', error);
|
||
|
alert('文件上传失败!');
|
||
|
});
|
||
|
};
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|