配置context-path默认图片加载问题.

This commit is contained in:
RuoYi
2018-09-27 09:02:58 +08:00
parent b64bb61207
commit e1c7db101c
3 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ $(window).load(function() {
var options = {
thumbBox: '.thumbBox',
spinner: '.spinner',
imgSrc: $.common.isEmpty(avatar) ? '/img/profile.jpg' : '/profile/avatar/' + avatar
imgSrc: $.common.isEmpty(avatar) ? ctx + 'img/profile.jpg' : ctx + 'profile/avatar/' + avatar
}
var cropper = $('.imageBox').cropbox(options);
$('#avatar').on('change',

View File

@@ -35,7 +35,7 @@
<div class="contact-box">
<div class="col-sm-4">
<div class="text-center">
<img alt="image" class="img-circle m-t-xs img-responsive" th:src="(${user.avatar} == '') ? '/img/profile.jpg' : '/profile/avatar/' + ${user.avatar}">
<img alt="image" class="img-circle m-t-xs img-responsive" th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{/profile/avatar/} + ${user.avatar}">
<div class="m-t-xs font-bold">[[${user.loginIp}]]</div>
</div>
</div>