From 62c9a54a23a3332bf12720ed9520a001121c9679 Mon Sep 17 00:00:00 2001
From: weizhiqiang <598748873@qq.com>
Date: Tue, 19 Apr 2022 17:32:09 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B0=E5=91=98=E5=B7=A5?=
=?UTF-8?q?=E5=A4=B4=E5=83=8F=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=B1=95=E7=A4=BA?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/template/js/index/myNote.js | 2 +-
.../js/syseveuserstaff/sysEveUserStaffDetails.js | 2 +-
.../js/syseveuserstaff/syseveuserstafflist.js | 4 ++--
.../resources/template/assets/lib/layui/custom.js | 3 ++-
.../assets/lib/layui/customer/systemCommonUtil.js | 15 ++++++++++++++-
5 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/note/src/main/resources/template/js/index/myNote.js b/note/src/main/resources/template/js/index/myNote.js
index 00529a142..cd63c22aa 100644
--- a/note/src/main/resources/template/js/index/myNote.js
+++ b/note/src/main/resources/template/js/index/myNote.js
@@ -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({
diff --git a/userauth/src/main/resources/template/js/syseveuserstaff/sysEveUserStaffDetails.js b/userauth/src/main/resources/template/js/syseveuserstaff/sysEveUserStaffDetails.js
index 08b475c02..b7e956ea4 100644
--- a/userauth/src/main/resources/template/js/syseveuserstaff/sysEveUserStaffDetails.js
+++ b/userauth/src/main/resources/template/js/syseveuserstaff/sysEveUserStaffDetails.js
@@ -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();
}
diff --git a/userauth/src/main/resources/template/js/syseveuserstaff/syseveuserstafflist.js b/userauth/src/main/resources/template/js/syseveuserstaff/syseveuserstafflist.js
index 6dfc4fd10..07607d16a 100644
--- a/userauth/src/main/resources/template/js/syseveuserstaff/syseveuserstafflist.js
+++ b/userauth/src/main/resources/template/js/syseveuserstaff/syseveuserstafflist.js
@@ -78,7 +78,7 @@ layui.config({
if(isNull(d.userPhoto)){
return '';
}else{
- return '';
+ return '';
}
}},
{ 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:'',
+ content:'',
scrollbar:false
});
}else if (layEvent === 'details') { //员工详情
diff --git a/web/src/main/resources/template/assets/lib/layui/custom.js b/web/src/main/resources/template/assets/lib/layui/custom.js
index 420496ff3..c4f2cd4e0 100644
--- a/web/src/main/resources/template/assets/lib/layui/custom.js
+++ b/web/src/main/resources/template/assets/lib/layui/custom.js
@@ -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文件
diff --git a/web/src/main/resources/template/assets/lib/layui/customer/systemCommonUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/systemCommonUtil.js
index 9d30e17bf..2d8dafd49 100644
--- a/web/src/main/resources/template/assets/lib/layui/customer/systemCommonUtil.js
+++ b/web/src/main/resources/template/assets/lib/layui/customer/systemCommonUtil.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
--
GitLab