Signed-off-by: Chenx221 <chenx221@yandex.com>
This commit is contained in:
Chenx221 2023-06-19 23:04:39 +08:00
parent cc48d06ebb
commit d9f6f56ee8
8 changed files with 41 additions and 1323 deletions

View File

@ -6,6 +6,7 @@
- IntelliJ IDEA 2023.1.2 (Ultimate Edition)
- Tomcat 9.0.75
- JDK17
- MySQL 8.0.33
- 凭证可在applicationContext.xml修改
- Minio 20230616

View File

@ -52,7 +52,7 @@
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
@ -149,6 +149,9 @@
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="old_avatar"/>
</div>
<div class="col-lg-4">
<label class="form-label"
@ -202,6 +205,7 @@
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
<script>
$(document).ready(function () {
<c:if test="${not empty message && message ne 'null'}">
$('#exampleModal').modal('show');
@ -211,7 +215,7 @@
.then(function (response) {
if (response.ok) {
// 图像存在,显示自定义头像
$('#custom_avatar').show();
$('#old_avatar').show();
} else {
// 图像不存在,显示默认头像
$('#default_avatar').show();
@ -243,6 +247,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#old_avatar').hide();
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
@ -253,8 +258,6 @@
});
});
});
</script>
</body>

View File

@ -49,7 +49,7 @@
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
@ -132,6 +132,9 @@
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="old_avatar"/>
</div>
<div class="col-lg-4">
<label class="form-label"
@ -190,11 +193,12 @@
$('#exampleModal').modal('show');
</c:if>
fetch("/person/image")
.then(function (response) {
if (response.ok) {
// 图像存在,显示自定义头像
$('#custom_avatar').show();
$('#old_avatar').show();
} else {
// 图像不存在,显示默认头像
$('#default_avatar').show();
@ -226,6 +230,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#old_avatar').hide();
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
@ -236,8 +241,6 @@
});
});
});
</script>
</body>

View File

@ -135,6 +135,9 @@
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="old_avatar"/>
</div>
<div class="col-lg-4">
<label class="form-label"
@ -193,11 +196,12 @@
$('#exampleModal').modal('show');
</c:if>
fetch("/person/image")
.then(function (response) {
if (response.ok) {
// 图像存在,显示自定义头像
$('#custom_avatar').show();
$('#old_avatar').show();
} else {
// 图像不存在,显示默认头像
$('#default_avatar').show();
@ -229,6 +233,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#old_avatar').hide();
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
@ -239,8 +244,6 @@
});
});
});
</script>
</body>

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
@ -149,6 +149,9 @@
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="old_avatar"/>
</div>
<div class="col-lg-4">
<label class="form-label"
@ -202,6 +205,7 @@
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
<script>
$(document).ready(function () {
<c:if test="${not empty message && message ne 'null'}">
$('#exampleModal').modal('show');
@ -211,7 +215,7 @@
.then(function (response) {
if (response.ok) {
// 图像存在,显示自定义头像
$('#custom_avatar').show();
$('#old_avatar').show();
} else {
// 图像不存在,显示默认头像
$('#default_avatar').show();
@ -243,6 +247,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#old_avatar').hide();
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
@ -253,8 +258,6 @@
});
});
});
</script>
</body>

View File

@ -49,7 +49,7 @@
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
@ -132,6 +132,9 @@
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="old_avatar"/>
</div>
<div class="col-lg-4">
<label class="form-label"
@ -190,11 +193,12 @@
$('#exampleModal').modal('show');
</c:if>
fetch("/person/image")
.then(function (response) {
if (response.ok) {
// 图像存在,显示自定义头像
$('#custom_avatar').show();
$('#old_avatar').show();
} else {
// 图像不存在,显示默认头像
$('#default_avatar').show();
@ -226,6 +230,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#old_avatar').hide();
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
@ -236,8 +241,6 @@
});
});
});
</script>
</body>

View File

@ -135,6 +135,9 @@
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="old_avatar"/>
</div>
<div class="col-lg-4">
<label class="form-label"
@ -193,11 +196,12 @@
$('#exampleModal').modal('show');
</c:if>
fetch("/person/image")
.then(function (response) {
if (response.ok) {
// 图像存在,显示自定义头像
$('#custom_avatar').show();
$('#old_avatar').show();
} else {
// 图像不存在,显示默认头像
$('#default_avatar').show();
@ -229,6 +233,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#old_avatar').hide();
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
@ -239,8 +244,6 @@
});
});
});
</script>
</body>