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

master
RuoYi 6 years ago committed by Limy
parent 979495377f
commit 0b55b07e37

@ -32,7 +32,7 @@
<ul class="nav" id="side-menu"> <ul class="nav" id="side-menu">
<li class="nav-header"> <li class="nav-header">
<div class="dropdown profile-element"> <span> <div class="dropdown profile-element"> <span>
<img th:src="(${user.avatar} == '') ? '/img/profile.jpg' : '/profile/avatar/' + ${user.avatar}" alt="image" class="img-circle" height="60" width="60"/></span> <img th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{/profile/avatar/} + ${user.avatar}" alt="image" class="img-circle" height="60" width="60"/></span>
<a data-toggle="dropdown" class="dropdown-toggle" href="#"> <a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="clear"><span class="block m-t-xs"><strong class="font-bold" th:text="${user.userName}">用户</strong></span> <span class="clear"><span class="block m-t-xs"><strong class="font-bold" th:text="${user.userName}">用户</strong></span>
<span class="text-muted text-xs block"><span th:text="${user.dept?.deptName}">部门</span> <b class="caret"></b></span> </span> </a> <span class="text-muted text-xs block"><span th:text="${user.dept?.deptName}">部门</span> <b class="caret"></b></span> </span> </a>

@ -30,7 +30,7 @@ $(window).load(function() {
var options = { var options = {
thumbBox: '.thumbBox', thumbBox: '.thumbBox',
spinner: '.spinner', 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); var cropper = $('.imageBox').cropbox(options);
$('#avatar').on('change', $('#avatar').on('change',

@ -35,7 +35,7 @@
<div class="contact-box"> <div class="contact-box">
<div class="col-sm-4"> <div class="col-sm-4">
<div class="text-center"> <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 class="m-t-xs font-bold">[[${user.loginIp}]]</div>
</div> </div>
</div> </div>

Loading…
Cancel
Save