|
@@ -119,6 +119,14 @@ layui.define(['laytpl', 'layer'], function (exports) { |
|
@@ -119,6 +119,14 @@ layui.define(['laytpl', 'layer'], function (exports) { |
119
|
// // : (layui.data(setter.tableName)[request.tokenName] || '');
|
119
|
// // : (layui.data(setter.tableName)[request.tokenName] || '');
|
120
|
// }
|
120
|
// }
|
121
|
|
121
|
|
|
|
122
|
+ let userId = localStorage.getItem("userId");
|
|
|
123
|
+ let userName = localStorage.getItem("lgn");
|
|
|
124
|
+ let nickName = localStorage.getItem("nickName");
|
|
|
125
|
+ let hash = btoa(localStorage.getItem("page_url"));
|
|
|
126
|
+
|
|
|
127
|
+ options.data['MjUserId'] = userId;
|
|
|
128
|
+ options.data['MjUserName'] = userName;
|
|
|
129
|
+ options.data['MjHash'] = hash;
|
122
|
|
130
|
|
123
|
if(options.method == 'post' || options.method == 'POST' || options.type == 'post' || options.type == 'POST'
|
131
|
if(options.method == 'post' || options.method == 'POST' || options.type == 'post' || options.type == 'POST'
|
124
|
|| options.type == 'delete' || options.method == 'delete' || options.type == 'DELETE' || options.method == 'DELETE'){
|
132
|
|| options.type == 'delete' || options.method == 'delete' || options.type == 'DELETE' || options.method == 'DELETE'){
|
|
@@ -127,6 +135,9 @@ layui.define(['laytpl', 'layer'], function (exports) { |
|
@@ -127,6 +135,9 @@ layui.define(['laytpl', 'layer'], function (exports) { |
127
|
let tokenVal = common.getMjToken();
|
135
|
let tokenVal = common.getMjToken();
|
128
|
let tokenKey = common.getMjTokenKey();
|
136
|
let tokenKey = common.getMjTokenKey();
|
129
|
options.headers['AuthorizationMj'] = "BearerMj " + tokenVal;
|
137
|
options.headers['AuthorizationMj'] = "BearerMj " + tokenVal;
|
|
|
138
|
+ options.headers['MjUserId'] = userId;
|
|
|
139
|
+ options.headers['MjUserName'] = userName;
|
|
|
140
|
+ options.headers['MjHash'] = hash;
|
130
|
});
|
141
|
});
|
131
|
} else if (request.tokenName) {
|
142
|
} else if (request.tokenName) {
|
132
|
let tokenVal = options.data[request.tokenName];
|
143
|
let tokenVal = options.data[request.tokenName];
|