作者:三号天宫 | 来源:互联网 | 2023-10-10 00:36
跳转过程前手动存取当前页面信息$(function(){varaListdocument.querySelectorAll(a);for(vari0;i<aLis
跳转过程前手动存取当前页面信息
$(function(){
var aList = document.querySelectorAll("a");
for (var i=0;i aEvent(i)
}
function aEvent(i){
$(aList[i]).click(function(){
window.localStorage.Referer=document.URL.split("/www/wap/")[1];
})
}
})
新页面ajax 手动设置
...
params.beforeSend = function(request) {
request.setRequestHeader("From", "App");
// console.log(window.localStorage.Referer);
request.setRequestHeader("Lysource", window.localStorage.Referer);
...
百度统计
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?f9f63abe1b3f7c5882ca575ed9fa85e3";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();