!function(a,b){function c(c){function d(){function a(c,d){function e(c,d,e){var f=[];return c=e===b?c:e+"["+c+"]","object"==typeof d&&null!==d?f=f.concat(a(d,c)):(c=encodeURIComponent(c),d=encodeURIComponent(d),f.push(c+"="+d)),f}var g,f=[];if("[object Array]"==Object.prototype.toString.call(c))for(var h=0,i=c.length;i>h;h++)g=c[h],f=f.concat(e("object"==typeof g?h:"",g,d));else if("[object Object]"==Object.prototype.toString.call(c))for(var j in c)g=c[j],f=f.concat(e(j,g,d));return f}function c(a){for(var b=a.split("&"),c=0,d=b.length;d>c;c++)name=encodeURIComponent(b[c].split("=")[0]),value=encodeURIComponent(b[c].split("=")[1]),b[c]=name+"="+value;return b}j&&("string"==typeof j?j=c(j):"object"==typeof j&&(j=a(j)),j=j.join("&").replace("/%20/g","+"),("get"===i||"jsonp"===l)&&(h+=h.indexOf("?")>-1?h.indexOf("=")>-1?"&"+j:j:"?"+j))}function e(){var b=document.createElement("script"),c=(new Date).getTime()+Math.round(1e3*Math.random()),d="JSONP_"+c;a[d]=function(a){clearTimeout(s),document.body.removeChild(b),q(a)},b.src=h+(h.indexOf("?")>-1?"&":"?")+"callback="+d,b.type="text/javascript",document.body.appendChild(b),f(d,b)}function f(c,d){n!==b&&(s=setTimeout(function(){"jsonp"===l?(delete a[c],document.body.removeChild(d)):(r=!0,t&&t.abort()),console.log("timeout")},n))}function g(){function c(){if(a.XMLHttpRequest)return new XMLHttpRequest;for(var b=["Microsoft","msxm3","msxml2","msxml1"],c=0;c=200&&t.status<300||304==t.status?q(t.responseText):p(t.status,t.statusText)}},t.send("get"===i?null:j),f()}var h=c.url||"",i=(c.type||"get").toLowerCase(),j=c.data||null,k=c.contentType||"",l=c.dataType||"",m=c.async===b?!0:c.async,n=c.timeOut,o=c.before||function(){},p=c.error||function(){},q=c.success||function(){},r=!1,s=null,t=null;d(),o(),"jsonp"===l?e():g()}a.ajax=c}(window); var url=window.location.href var title = document.title var referrer=document.referrer var screen_height=window.screen.height var screen_width=window.screen.width function setCookie(key,value,day){ var cookie=key+'='+encodeURIComponent(value); if(day>0){ var date=new Date(); date.setDate(date.getDate()+day); cookie+=';expires='+date; } document.cookie=cookie; } function getCookies(key){ var name = key + "="; var ca = document.cookie.split(';'); for(var i=0; i { let key_val_arr = key_val.split("="); params[key_val_arr[0]] = key_val_arr[1]; }); return params; } const _charStr = 'abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789'; function RandomIndex(min, max, i){ let index = Math.floor(Math.random()*(max-min+1)+min), numStart = _charStr.length - 10; if(i==0&&index>=numStart){ index = RandomIndex(min, max, i); } return index; } function getRandomString(len){ let min = 0, max = _charStr.length-1, _str = ''; //判断是否指定长度,否则默认长度为15 len = len || 15; //循环生成字符串 for(var i = 0, index; i < len; i++){ index = RandomIndex(min, max, i); _str += _charStr[index]; } return _str; } var visitor_code=getCookies("visitor_code") if(visitor_code=="" || visitor_code==undefined){ visitor_code=getRandomString(12) setCookie("visitor_code",visitor_code,3650) } setTimeout(function(){ ajax({ type:"post", data:{ "website_id":"161e8f3b", "url":url, "title":title, "referrer":referrer, "screen_height":screen_height, "screen_width":screen_width, "visitor_code":visitor_code, "member_id":getCookies("member_id"), }, url:"https://middle.bo-tm.com/middle.php/Middle/Log/visitorLog", timeOut:10000, before:function(){ }, success:function(str){ }, error:function(){ } }); },500)