提交 62c9a54a 编写于 作者: Skyeye云's avatar Skyeye云

解决新员工头像默认不展示的问题

上级 1a3b05ab
...@@ -438,7 +438,7 @@ layui.config({ ...@@ -438,7 +438,7 @@ layui.config({
if(clickType == "folder"){ if(clickType == "folder"){
winui.window.msg("目前仅支持分享笔记", {icon: 2,time: 2000}); winui.window.msg("目前仅支持分享笔记", {icon: 2,time: 2000});
}else{ }else{
var shareUrl = sysMainMation.homePagePath + "tpl/note/shareNote.html?id=" + clickId; var shareUrl = homePagePath + "tpl/note/shareNote.html?id=" + clickId;
var json = {"bean":{"shareUrl":shareUrl}}; var json = {"bean":{"shareUrl":shareUrl}};
var html = getDataUseHandlebars(getFileContent('tpl/note/shareNoteTemplate.tpl'), json); var html = getDataUseHandlebars(getFileContent('tpl/note/shareNoteTemplate.tpl'), json);
layer.open({ layer.open({
......
...@@ -29,7 +29,7 @@ layui.config({ ...@@ -29,7 +29,7 @@ layui.config({
$("#leaveTime").hide(); $("#leaveTime").hide();
$("#leaveReason").hide(); $("#leaveReason").hide();
} }
$("#userPhoto").attr("src", fileBasePath + json.bean.userPhoto); $("#userPhoto").attr("src", systemCommonUtil.getFilePath(json.bean.userPhoto));
matchingLanguage(); matchingLanguage();
form.render(); form.render();
} }
......
...@@ -78,7 +78,7 @@ layui.config({ ...@@ -78,7 +78,7 @@ layui.config({
if(isNull(d.userPhoto)){ if(isNull(d.userPhoto)){
return '<img src="../../assets/images/os_windows.png" class="photo-img">'; return '<img src="../../assets/images/os_windows.png" class="photo-img">';
}else{ }else{
return '<img src="' + fileBasePath + d.userPhoto + '" class="photo-img" lay-event="userPhoto">'; return '<img src="' + systemCommonUtil.getFilePath(d.userPhoto) + '" class="photo-img" lay-event="userPhoto">';
} }
}}, }},
{ field: 'userId', title: '系统账号', rowspan: '3', align: 'center', width: 80, templet: function(d){ { field: 'userId', title: '系统账号', rowspan: '3', align: 'center', width: 80, templet: function(d){
...@@ -136,7 +136,7 @@ layui.config({ ...@@ -136,7 +136,7 @@ layui.config({
closeBtn:0, closeBtn:0,
skin: 'demo-class', skin: 'demo-class',
shadeClose:true, shadeClose:true,
content:'<img src="' + fileBasePath + data.userPhoto + '" style="max-height:600px;max-width:100%;">', content:'<img src="' + systemCommonUtil.getFilePath(data.userPhoto) + '" style="max-height:600px;max-width:100%;">',
scrollbar:false scrollbar:false
}); });
}else if (layEvent === 'details') { //员工详情 }else if (layEvent === 'details') { //员工详情
......
...@@ -51,7 +51,7 @@ var fileBasePath; ...@@ -51,7 +51,7 @@ var fileBasePath;
var reqBasePath; // 总项目 var reqBasePath; // 总项目
var shopBasePath; // 商城项目 var shopBasePath; // 商城项目
var flowableBasePath; // 工作流相关功能的项目 var flowableBasePath; // 工作流相关功能的项目
var homePagePath; // 前端请求地址
var webSocketPath;//聊天socket-开发 var webSocketPath;//聊天socket-开发
function initBaseParams(){ function initBaseParams(){
...@@ -61,6 +61,7 @@ function initBaseParams(){ ...@@ -61,6 +61,7 @@ function initBaseParams(){
shopBasePath = sysMainMation.shopBasePath; shopBasePath = sysMainMation.shopBasePath;
webSocketPath = sysMainMation.webSocketPath; webSocketPath = sysMainMation.webSocketPath;
flowableBasePath = sysMainMation.flowableBasePath; flowableBasePath = sysMainMation.flowableBasePath;
homePagePath = sysMainMation.homePagePath;
} }
// 编辑加载自定义的js文件 // 编辑加载自定义的js文件
......
...@@ -255,11 +255,24 @@ var systemCommonUtil = { ...@@ -255,11 +255,24 @@ var systemCommonUtil = {
* *
* @param url * @param url
*/ */
getHasVersionUrl: function (url){ getHasVersionUrl: function (url) {
// 判断是否有问号 // 判断是否有问号
url += (url.indexOf("?") == -1 ? "?" : "&"); url += (url.indexOf("?") == -1 ? "?" : "&");
url = url + 'v='+ skyeyeVersion; url = url + 'v='+ skyeyeVersion;
return url; return url;
},
/**
* 获取路径的访问地址
*
* @param url
*/
getFilePath: function (url) {
if (url.startsWith("../../assets/")) {
return homePagePath + url;
} else {
return fileBasePath + url;
}
} }
}; };
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册