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