越权日志
This commit is contained in:
parent
696a09287e
commit
4afb0649bd
|
|
@ -242,7 +242,7 @@ var Ajax = function () {
|
|||
// post方式需要自己设置http的请求头,来模仿表单提交。
|
||||
// 放在open方法之后,send方法之前。
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
xhr.setRequestHeader('token', token);
|
||||
xhr.setRequestHeader('Authorization', token);
|
||||
//xhr.setRequestHeader("key","222"); //将token放在header 里面
|
||||
if (that.headers != '') {
|
||||
xhr.setRequestHeader("encrypt", that.headers);
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ function getLocalpath(){
|
|||
let usJosn=JSON.parse(us);
|
||||
let yq=getHtmlPermission(usJosn.menus,url[1]);
|
||||
console.log(yq)
|
||||
if(!yq){
|
||||
console.log(url[1])
|
||||
top.window.location.href = login_url;
|
||||
if(yq){
|
||||
addLogs(url,url[1],usJosn.nickName);
|
||||
//top.window.location.href = login_url;
|
||||
}
|
||||
}
|
||||
function getHtmlPermission(menus,html){
|
||||
|
|
@ -26,4 +26,20 @@ function getHtmlPermission(menus,html){
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function addLogs(url,urlParam,userName) {
|
||||
$.ajax({
|
||||
url: dataUrl + 'system/sys/logs/addLogs' ,
|
||||
headers: {
|
||||
'Authorization': localStorage.getItem("tokens")
|
||||
},
|
||||
data: {
|
||||
'userName': userName ,
|
||||
'operParam': url,
|
||||
'operMeth': urlParam
|
||||
},
|
||||
type: 'post',
|
||||
success: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -14,13 +14,13 @@ function error(event, xhr, settings, er){
|
|||
console.error(settings);
|
||||
console.error(er);
|
||||
}
|
||||
(() => {
|
||||
function ban() {
|
||||
setInterval(() => {
|
||||
debugger;
|
||||
}, 50);
|
||||
}
|
||||
try {
|
||||
ban();
|
||||
} catch (err) { }
|
||||
})();
|
||||
// (() => {
|
||||
// function ban() {
|
||||
// setInterval(() => {
|
||||
// debugger;
|
||||
// }, 50);
|
||||
// }
|
||||
// try {
|
||||
// ban();
|
||||
// } catch (err) { }
|
||||
// })();
|
||||
|
|
|
|||
Loading…
Reference in New Issue