...
|
...
|
@@ -119,6 +119,14 @@ layui.define(['laytpl', 'layer'], function (exports) { |
|
|
// // : (layui.data(setter.tableName)[request.tokenName] || '');
|
|
|
// }
|
|
|
|
|
|
let userId = localStorage.getItem("userId");
|
|
|
let userName = localStorage.getItem("lgn");
|
|
|
let nickName = localStorage.getItem("nickName");
|
|
|
let hash = btoa(localStorage.getItem("page_url"));
|
|
|
|
|
|
options.data['MjUserId'] = userId;
|
|
|
options.data['MjUserName'] = userName;
|
|
|
options.data['MjHash'] = hash;
|
|
|
|
|
|
if(options.method == 'post' || options.method == 'POST' || options.type == 'post' || options.type == 'POST'
|
|
|
|| options.type == 'delete' || options.method == 'delete' || options.type == 'DELETE' || options.method == 'DELETE'){
|
...
|
...
|
@@ -127,6 +135,9 @@ layui.define(['laytpl', 'layer'], function (exports) { |
|
|
let tokenVal = common.getMjToken();
|
|
|
let tokenKey = common.getMjTokenKey();
|
|
|
options.headers['AuthorizationMj'] = "BearerMj " + tokenVal;
|
|
|
options.headers['MjUserId'] = userId;
|
|
|
options.headers['MjUserName'] = userName;
|
|
|
options.headers['MjHash'] = hash;
|
|
|
});
|
|
|
} else if (request.tokenName) {
|
|
|
let tokenVal = options.data[request.tokenName];
|
...
|
...
|
|