个人中心头像和上传头像增加默认图片

pull/224/MERGE
Ricky 2020-10-22 09:40:31 +08:00
parent 64a0a05b14
commit 207126847e
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@
<div class="row container">
<div class="col-md-10">
<div class="imageBox">
<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" >
<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="@{this.src='/img/profile.jpg'}">
</div>
<div class="action">
<div class="new-contentarea tc">

View File

@ -16,7 +16,7 @@
</div>
<div class="ibox-content">
<div class="text-center">
<p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}"></p>
<p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="@{this.src='/img/profile.jpg'}"></p>
<p><a href="javascript:avatar()">修改头像</a></p>
</div>
<ul class="list-group list-group-striped">