diff --git a/common/src/main/resources/template/js/sysenclosure/enclosureupload.js b/common/src/main/resources/template/js/sysenclosure/enclosureupload.js
index 5331d3498c326c05afcf4263ecc8a614a8c7103b..f883610cc05b03e092430b9230a62ec65fdf954c 100644
--- a/common/src/main/resources/template/js/sysenclosure/enclosureupload.js
+++ b/common/src/main/resources/template/js/sysenclosure/enclosureupload.js
@@ -134,7 +134,7 @@ function loadUploadMethod(){
}});
}
});
-
+
// 实例化
uploader = WebUploader.create({
pick: {
@@ -142,7 +142,6 @@ function loadUploadMethod(){
label: '选择文件'
},
formData: {
- userToken: getCookie('userToken'),
loginPCIp: returnCitySN["cip"],
folderId: folderId
},
@@ -209,7 +208,7 @@ function loadUploadMethod(){
});
uploader.on('uploadBeforeSend', function(block, data, headers) {
headers['X-Requested-With']= 'XMLHttpRequest';
- data.userToken = getCookie('userToken');
+ $.extend(headers, getRequestHeaders());
data.loginPCIp = returnCitySN["cip"];
data.folderId = folderId;
data.md5 = md5;
diff --git a/disk-cloud/src/main/resources/template/js/commonFile/fileConsoleListCommon.js b/disk-cloud/src/main/resources/template/js/commonFile/fileConsoleListCommon.js
index fe6593dc6c3ef6656b242a04b8e7142e6c989ae4..8b2fa07340e05f63bb4bb2c6c7bcacfbbd669457 100644
--- a/disk-cloud/src/main/resources/template/js/commonFile/fileConsoleListCommon.js
+++ b/disk-cloud/src/main/resources/template/js/commonFile/fileConsoleListCommon.js
@@ -81,10 +81,10 @@ function createHtmlFile(folderId, callBack){
}
// 创建文件夹
-function createFolder(folderId, refreshCallBack, initDragCallBack){
+function createFolder(folderId, refreshCallBack, initDragCallBack, currentUserId){
AjaxPostUtil.request({url:reqBasePath + "fileconsole002", params: {parentId: folderId, catalogName: '新建文件夹'}, type: 'json', callback: function(json){
if(json.returnCode == 0){
- initNewFolder(json.bean.id, json.bean.catalogName, json.bean.logoPath, true);
+ initNewFolder(json.bean.id, json.bean.catalogName, json.bean.logoPath, true, currentUserId);
// 刷新节点
if(typeof(refreshCallBack) == "function") {
refreshCallBack();
@@ -100,7 +100,7 @@ function createFolder(folderId, refreshCallBack, initDragCallBack){
}
// 加载新建的文件夹
-function initNewFolder(id, folderName, icon, isEdit){
+function initNewFolder(id, folderName, icon, isEdit, currentUserId){
$("#file-content").find("div[class='filename-edit']").hide();
$("#file-content").find("div[class='filename']").show();
var json = {
@@ -109,7 +109,7 @@ function initNewFolder(id, folderName, icon, isEdit){
name: folderName,
icon: icon,
isShow: 'none',
- createId: getCookie('userToken')
+ createId: currentUserId
}
};
var html = getDataUseHandlebars(folderTemplate, json);
diff --git a/disk-cloud/src/main/resources/template/js/fileconsole/fileconsolelist.js b/disk-cloud/src/main/resources/template/js/fileconsole/fileconsolelist.js
index 43610a35a641f0f639be83797d1fa95c8e7ad41e..794e3ff4cd1e0d42d0cbcc8992870d1b7100d261 100644
--- a/disk-cloud/src/main/resources/template/js/fileconsole/fileconsolelist.js
+++ b/disk-cloud/src/main/resources/template/js/fileconsole/fileconsolelist.js
@@ -746,14 +746,14 @@ layui.config({
// 新建文件夹
$("body").on("click", "#createNewFolder", function(e){
hideRMenu();
- createFolder(folderId, refreshTreePointNode, initMenuToBox);
+ createFolder(folderId, refreshTreePointNode, initMenuToBox, currentUserId);
});
// 树操作--新建文件夹
$("body").on("click", ".treecreateNewFolder", function(e){
hideRMenu();
loadThisFolderChild();
- createFolder(folderId, refreshTreePointNode, initMenuToBox);
+ createFolder(folderId, refreshTreePointNode, initMenuToBox, currentUserId);
});
// 树操作--刷新
@@ -1464,7 +1464,7 @@ layui.config({
text: "新建文件夹",
img: "../../assets/images/create-folder-icon.png",
callback: function() {
- createFolder(folderId, refreshTreePointNode, initMenuToBox);
+ createFolder(folderId, refreshTreePointNode, initMenuToBox, currentUserId);
}
}, { // 菜单项
text: "新建文件",
@@ -1792,7 +1792,6 @@ layui.config({
// 实例化
uploader = WebUploader.create({
formData: {
- userToken: getCookie('userToken'),
loginPCIp: returnCitySN["cip"],
folderId: folderId
},
@@ -1858,7 +1857,7 @@ layui.config({
});
uploader.on('uploadBeforeSend', function(block, data, headers) {
headers['X-Requested-With']= 'XMLHttpRequest';
- data.userToken = getCookie('userToken');
+ $.extend(headers, getRequestHeaders());
data.loginPCIp = returnCitySN["cip"];
data.folderId = folderId;
data.md5 = md5;
diff --git a/disk-cloud/src/main/resources/template/js/fileconsole/fileconsoleupload.js b/disk-cloud/src/main/resources/template/js/fileconsole/fileconsoleupload.js
index 4ea5125695ce188a281414b7b02bfe7a0b09037a..89e6dbd08a187ab0614076afd4e1822ef92a3f40 100644
--- a/disk-cloud/src/main/resources/template/js/fileconsole/fileconsoleupload.js
+++ b/disk-cloud/src/main/resources/template/js/fileconsole/fileconsoleupload.js
@@ -133,7 +133,6 @@ function loadUploadMethod(){
label: '选择文件'
},
formData: {
- userToken: getCookie('userToken'),
loginPCIp: returnCitySN["cip"],
folderId: parent.folderId
},
@@ -200,7 +199,7 @@ function loadUploadMethod(){
});
uploader.on('uploadBeforeSend', function(block, data, headers) {
headers['X-Requested-With']= 'XMLHttpRequest';
- data.userToken = getCookie('userToken');
+ $.extend(headers, getRequestHeaders());
data.loginPCIp = returnCitySN["cip"];
data.folderId = parent.folderId;
data.md5 = md5;
diff --git a/disk-cloud/src/main/resources/template/js/fileconsole/filefolderupload.js b/disk-cloud/src/main/resources/template/js/fileconsole/filefolderupload.js
index 0b7fa9115fc4c71012ca44f66410d9bd091504c7..102fe41baa580d0e4402969d0c70c5a61591e5b0 100644
--- a/disk-cloud/src/main/resources/template/js/fileconsole/filefolderupload.js
+++ b/disk-cloud/src/main/resources/template/js/fileconsole/filefolderupload.js
@@ -134,7 +134,6 @@ function loadUploadMethod(){
webkitdirectory: true
},
formData: {
- userToken: getCookie('userToken'),
loginPCIp: returnCitySN["cip"],
folderId: parent.folderId
},
@@ -201,7 +200,7 @@ function loadUploadMethod(){
});
uploader.on('uploadBeforeSend', function(block, data, headers) {
headers['X-Requested-With']= 'XMLHttpRequest';
- data.userToken = getCookie('userToken');
+ $.extend(headers, getRequestHeaders());
data.loginPCIp = returnCitySN["cip"];
data.folderId = parent.folderId;
data.md5 = md5;
diff --git a/disk-cloud/src/main/resources/template/js/shareFile/shareFileList.js b/disk-cloud/src/main/resources/template/js/shareFile/shareFileList.js
index efaaae49bc22ce908e58b710e667e0afe99face9..cb1ea619e4bf6d6be87558f2f4f0a94de0d91c1a 100644
--- a/disk-cloud/src/main/resources/template/js/shareFile/shareFileList.js
+++ b/disk-cloud/src/main/resources/template/js/shareFile/shareFileList.js
@@ -58,21 +58,17 @@ layui.config({
//加载用户信息
function loadUserMation(){
- if(!isNull(getCookie('userToken'))){
- // 获取当前登录员工信息
- systemCommonUtil.getSysCurrentLoginUserMation(function (data){
- var str = ''
- + '' + data.bean.userName + ''
- + '控制台'
- + '退出';
- $("#operatorBtn").html(str);
- $("#file-operator").html('');
- }, function (){
- $("#operatorBtn").html('登陆');
- });
- }else{
+ // 获取当前登录员工信息
+ systemCommonUtil.getSysCurrentLoginUserMation(function (data){
+ var str = ''
+ + '' + data.bean.userName + ''
+ + '控制台'
+ + '退出';
+ $("#operatorBtn").html(str);
+ $("#file-operator").html('');
+ }, function (){
$("#operatorBtn").html('登陆');
- }
+ });
loadFileMation();
}
diff --git a/forum/src/main/resources/template/js/forumshow/forumitem.js b/forum/src/main/resources/template/js/forumshow/forumitem.js
index 2aaa017df88bc1b6ff41c4cb982d89de9d39b552..1dbe6c6843287d4f867928e2e8dce938c16b85d3 100644
--- a/forum/src/main/resources/template/js/forumshow/forumitem.js
+++ b/forum/src/main/resources/template/js/forumshow/forumitem.js
@@ -9,10 +9,8 @@ layui.config({
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
-
winui.renderColor();
var $ = layui.$;
-
var commentTemplate = $('#commentTemplate').html();
var replyTemplate = $('#replyTemplate').html();
var textareaTemplate = $('#textareaTemplate').html();
@@ -23,12 +21,18 @@ layui.config({
$("body").append(getFileContent("tpl/forumshow/commonmenu.tpl"));
rowId = GetUrlParam("id");
- var userToken = getCookie('userToken');
-
+
+ var currentUserId = "";
+ // 获取当前登录员工信息
+ systemCommonUtil.getSysCurrentLoginUserMation(function (data){
+ currentUserId = data.bean.id;
+ });
+
//帖子信息展示
AjaxPostUtil.request({url:reqBasePath + "forumcontent006", params: {rowId:rowId}, type: 'json', callback: function(json){
if(json.returnCode == 0){
- if(json.bean.createId != userToken){//如果不是用户自己的帖子,则显示举报按钮
+ if(json.bean.createId != currentUserId){
+ // 如果不是用户自己的帖子,则显示举报按钮
$("#forumReport").removeClass("layui-hide");
}
$("#content").html(json.bean.content);
diff --git a/knowlg/src/main/resources/template/js/knowledgecontent/filefolderupload.js b/knowlg/src/main/resources/template/js/knowledgecontent/filefolderupload.js
index 15038bebbc17659bc1f5169f8b6cc0f5d96d0a89..5d849292f20bddca47fe9e2bbd06fd3ec3cbde39 100644
--- a/knowlg/src/main/resources/template/js/knowledgecontent/filefolderupload.js
+++ b/knowlg/src/main/resources/template/js/knowledgecontent/filefolderupload.js
@@ -133,7 +133,6 @@ function loadUploadMethod(){
label: '选择文件',
},
formData: {
- userToken: getCookie('userToken'),
loginPCIp: returnCitySN["cip"],
},
dnd: '#uploader .queueList',
@@ -204,7 +203,7 @@ function loadUploadMethod(){
});
uploader.on('uploadBeforeSend', function(block, data, headers) {
headers['X-Requested-With']= 'XMLHttpRequest';
- data.userToken = getCookie('userToken');
+ $.extend(headers, getRequestHeaders());
data.loginPCIp = returnCitySN["cip"];
data.md5 = md5;
data.chunk = block.chunk;
diff --git a/note/src/main/resources/template/js/note/shareNote.js b/note/src/main/resources/template/js/note/shareNote.js
index a5cc21daa4fa79d8ad9e28ffaff45ecd5a7e1f53..cce049c9bf4b2c2bc6854313348e1e12b5274a82 100644
--- a/note/src/main/resources/template/js/note/shareNote.js
+++ b/note/src/main/resources/template/js/note/shareNote.js
@@ -20,19 +20,17 @@ layui.config({
loadUserMation();
function loadUserMation(){
- if(!isNull(getCookie('userToken'))){
- // 获取当前登录员工信息
- systemCommonUtil.getSysCurrentLoginUserMation(function (data){
- var str = ''
- + '' + data.bean.userName + ''
- + '控制台'
- + '退出';
- $("#operatorBtn").html(str);
- loadNote();
- });
- }else{
+ // 获取当前登录员工信息
+ systemCommonUtil.getSysCurrentLoginUserMation(function (data){
+ var str = ''
+ + '' + data.bean.userName + ''
+ + '控制台'
+ + '退出';
+ $("#operatorBtn").html(str);
+ loadNote();
+ }, function (){
location.href = "../../tpl/index/login.html?url=" + escape("../../tpl/note/shareNote.html?id=" + rowId);
- }
+ });
}
function loadNote(){
diff --git a/web/src/main/resources/template/assets/lib/layui/lay/modules/dtree/dtree.js b/web/src/main/resources/template/assets/lib/layui/lay/modules/dtree/dtree.js
index 1fb655b9c81f7b59a1fddffd392bd480b563e797..c79a7d942bd3e2da1e2dc0d3f21ddde607f60f63 100644
--- a/web/src/main/resources/template/assets/lib/layui/lay/modules/dtree/dtree.js
+++ b/web/src/main/resources/template/assets/lib/layui/lay/modules/dtree/dtree.js
@@ -141,8 +141,8 @@ layui.define(['jquery','layer','element','form'], function(exports) {
request : function(config) {
var data = config.data ? config.data : {};
var async = (typeof (config.async) === "boolean") ? config.async : true;
- data.userToken = getCookie('userToken');
data.loginPCIp = returnCitySN["cip"];
+ $.extend(config.headers, getRequestHeaders());
$.ajax({
type : config.type ? config.type : "POST",
headers : config.headers,
diff --git a/web/src/main/resources/template/assets/lib/layui/lay/modules/treetable/treeGrid.js b/web/src/main/resources/template/assets/lib/layui/lay/modules/treetable/treeGrid.js
index cae7760cb7bfa239acc4f108851aa3e067dca358..40dd3bea7b9b518329819ef3fdf99350f9fe2150 100644
--- a/web/src/main/resources/template/assets/lib/layui/lay/modules/treetable/treeGrid.js
+++ b/web/src/main/resources/template/assets/lib/layui/lay/modules/treetable/treeGrid.js
@@ -1486,12 +1486,12 @@ layui.config({}).extend({}).define(['laytpl', 'laypage', 'layer', 'form'], funct
params[request.limitName] = options.limit;
that.filterRulesSet(params); //行内过滤条件
that.sortSet(params); //排序条件
- options.where.userToken = getCookie('userToken');
options.where.loginPCIp = returnCitySN["cip"];
$.ajax({
type: options.method || 'get',
url: options.url,
data: $.extend(params, options.where),
+ headers: getRequestHeaders(),
dataType: 'json',
success: function(res) {
//移除请求遮罩层
diff --git a/web/src/main/resources/template/assets/lib/winui/js/winui.window.js b/web/src/main/resources/template/assets/lib/winui/js/winui.window.js
index cb81736b7b52ec24202a30e92a2117d2e514b9c1..cfee3788705d1cd254a64c0af6f197b916535a39 100644
--- a/web/src/main/resources/template/assets/lib/winui/js/winui.window.js
+++ b/web/src/main/resources/template/assets/lib/winui/js/winui.window.js
@@ -640,7 +640,7 @@ layui.define(['layer', 'winui'], function (exports) {
id: 'winui-sys-notice',
type: 2,
title: title,
- content: '../../tpl/mymessage/myNoticeList.html?userToken=' + getCookie("userToken"),
+ content: '../../tpl/mymessage/myNoticeList.html',
loadBottomMenuIcon: loadBottomMenuIcon,
iconTitle: iconTitle
});
diff --git a/web/src/main/resources/template/js/common/enclosureupload.js b/web/src/main/resources/template/js/common/enclosureupload.js
index 8438569503c1ec790ad9b420534cae89f2b31efb..9aa1d122b47b2787f007d01a432a8b4a0ce874fd 100644
--- a/web/src/main/resources/template/js/common/enclosureupload.js
+++ b/web/src/main/resources/template/js/common/enclosureupload.js
@@ -261,7 +261,6 @@ function loadUploadMethod(){
label: '选择文件'
},
formData: {
- userToken: getCookie('userToken'),
loginPCIp: returnCitySN["cip"],
folderId: folderId
},
@@ -328,7 +327,7 @@ function loadUploadMethod(){
});
uploader.on('uploadBeforeSend', function(block, data, headers) {
headers['X-Requested-With']= 'XMLHttpRequest';
- data.userToken = getCookie('userToken');
+ $.extend(headers, getRequestHeaders());
data.loginPCIp = returnCitySN["cip"];
data.folderId = folderId;
data.md5 = md5;
diff --git a/web/src/main/resources/template/js/index/index.js b/web/src/main/resources/template/js/index/index.js
index a62c23326a6da53a85a5f30d01567224c1566367..d9e5051f4cf0f7a70841dec549b6c47808d7d939 100644
--- a/web/src/main/resources/template/js/index/index.js
+++ b/web/src/main/resources/template/js/index/index.js
@@ -546,11 +546,11 @@ layui.config({
title: '天眼',
init: {
url: reqBasePath + "companychat001",
- data: {userToken: getCookie('userToken'), loginPCIp: returnCitySN["cip"]}
+ data: {loginPCIp: returnCitySN["cip"]}
},//好友接口
members: {
url: reqBasePath + 'companytalkgroup007',
- data: {userToken: getCookie('userToken'), loginPCIp: returnCitySN["cip"]}
+ data: {loginPCIp: returnCitySN["cip"]}
},//群员借口
uploadImage: {
url: reqBasePath + "common003?type=9", //(返回的数据格式见下文)