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

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

上级 1a3b05ab
......@@ -438,7 +438,7 @@ layui.config({
if(clickType == "folder"){
winui.window.msg("目前仅支持分享笔记", {icon: 2,time: 2000});
}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 html = getDataUseHandlebars(getFileContent('tpl/note/shareNoteTemplate.tpl'), json);
layer.open({
......
......@@ -29,7 +29,7 @@ layui.config({
$("#leaveTime").hide();
$("#leaveReason").hide();
}
$("#userPhoto").attr("src", fileBasePath + json.bean.userPhoto);
$("#userPhoto").attr("src", systemCommonUtil.getFilePath(json.bean.userPhoto));
matchingLanguage();
form.render();
}
......
......@@ -78,7 +78,7 @@ layui.config({
if(isNull(d.userPhoto)){
return '<img src="../../assets/images/os_windows.png" class="photo-img">';
}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){
......@@ -136,7 +136,7 @@ layui.config({
closeBtn:0,
skin: 'demo-class',
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
});
}else if (layEvent === 'details') { //员工详情
......
......@@ -51,7 +51,7 @@ var fileBasePath;
var reqBasePath; // 总项目
var shopBasePath; // 商城项目
var flowableBasePath; // 工作流相关功能的项目
var homePagePath; // 前端请求地址
var webSocketPath;//聊天socket-开发
function initBaseParams(){
......@@ -61,6 +61,7 @@ function initBaseParams(){
shopBasePath = sysMainMation.shopBasePath;
webSocketPath = sysMainMation.webSocketPath;
flowableBasePath = sysMainMation.flowableBasePath;
homePagePath = sysMainMation.homePagePath;
}
// 编辑加载自定义的js文件
......
......@@ -255,11 +255,24 @@ var systemCommonUtil = {
*
* @param url
*/
getHasVersionUrl: function (url){
getHasVersionUrl: function (url) {
// 判断是否有问号
url += (url.indexOf("?") == -1 ? "?" : "&");
url = url + 'v='+ skyeyeVersion;
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.
先完成此消息的编辑!
想要评论请 注册