|
发表于
2023-2-28 09:43:03
|
显示全部楼层
还是不行啊,例如下面的代码 加上filter 之后,一直停留在hook 上转圈圈,一个网址都都hook不到了
- let a = {
- hook_send_severs:function(){
- // let hookurl = /omni\/inventory\/itemInv\/query$/
- ajaxHooker.filter([
- {url:'https://g.cainiao.com/omni/inventory/itemInv/query' ,method: 'POST'},
- // {type: 'xhr', url:'https://g.cainiao.com/omni/inventory/itemInv/query' , method: 'POST'},
- // {type: 'fetch', url:'https://g.cainiao.com/omni/inventory/itemInv/query' , method: 'POST'},
- // {url: /^http/},
- ]);
- ajaxHooker.hook(function(request){
- console.log("汉 → url:",request.url);
- // console.log("汉 → data:",request.data);
- // console.log("汉 → respons:",request.response);
- });
- },
- };
- (function(){
- if(document.location.href.match(/warehouse-inventory-query-v2/)){
- a.hook_send_severs();
- };
- })()
复制代码 |
|