Authored by 毕凯

Update layout.hbs

... ... @@ -26,7 +26,7 @@
window._timeStart = Date.now();
{{#ifand isProduction wap.open.bughd}}
!function(r){function e(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return r[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var t={};e.m=r,e.c=t,e.p="",e(0)}([function(r,e,t){var i=t(1),n=t(2),o="_errLog",s={writeError:function(r,e,t,s,p){var c=JSON.parse(i(o)||"[]");c.push({tp:"err",msg:r,sc:e,ln:t,cn:s,pt:location.href,u:n.getUid(),ud:n.getUdid(),rid:n.getReqId(),st:JSON.stringify(p&&p.stack)}),i(o,JSON.stringify(c)),c.length>=5&&this.reportError()},clearError:function(){i(o,"[]")},reportError:function(){var r=this,e=JSON.parse(i(o)||"[]"),t=n.stringify(e);n.report(t,function(){r.clearError()})},init:function(){window.onerror=this.writeError.bind(this),this.reportError()}};s.init(),r.exports=s},function(r,e){r.exports=function(r,e,t){if(void 0===e){var i=null;if(document.cookie)for(var n=document.cookie.split(";"),o=0;o<n.length;o++){var s=(n[o]||"").trim();if(s.substring(0,r.length+1)==r+"="){i=decodeURIComponent(s.substring(r.length+1));break}}return i}t=t||{},null===e&&(e="",t.expires=-1);var p="";if(t.expires&&("number"==typeof t.expires||t.expires.toUTCString)){var c;"number"==typeof t.expires?(c=new Date,c.setTime(c.getTime()+24*t.expires*60*60*1e3)):c=t.expires,p="; expires="+c.toUTCString()}var u=t.path?"; path="+t.path:"",a=t.domain?"; domain="+t.domain:"",f=t.secure?"; secure":"";document.cookie=[r,"=",encodeURIComponent(e),p,u,a,f].join("")}},function(r,e,t){var i=t(1),n={config:{reportUrl:"//badjs.yoho.cn/apm/yas.gif"},stringify:function(r){for(var e=[],t=0;t<r.length;t++){var i=r[t],n=[];for(var o in i)i.hasOwnProperty(o)&&n.push(o+"::"+i[o]);e.push(n.join("$$"))}return e.join("**")},report:function(r,e){if(r){(new Image).src=this.config.reportUrl+"?l="+r+"&t="+(new Date).getTime(),e&&e()}},getUdid:function(){return(i("yohobuy_session")||"").slice(2).split(".")[0]||0},getUid:function(){return(i("_UID")||"").split("::")[1]||0},getReqId:function(){return i("docreqid")||0}};r.exports=n}]);
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n=r(13),o=r(14);n.init(),o.init()},function(e,t){e.exports=function(e,t,r){if("undefined"==typeof t){var n=null;if(document.cookie)for(var o=document.cookie.split(";"),i=0;i<o.length;i++){var a=(o[i]||"").trim();if(a.substring(0,e.length+1)==e+"="){n=decodeURIComponent(a.substring(e.length+1));break}}return n}r=r||{},null===t&&(t="",r.expires=-1);var d="";if(r.expires&&("number"==typeof r.expires||r.expires.toUTCString)){var s;"number"==typeof r.expires?(s=new Date,s.setTime(s.getTime()+24*r.expires*60*60*1e3)):s=r.expires,d="; expires="+s.toUTCString()}var u=r.path?"; path="+r.path:"",c=r.domain?"; domain="+r.domain:"",p=r.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(t),d,u,c,p].join("")}},,function(e,t,r){var n=r(1),o={config:{reportUrl:"//badjs.yoho.cn/apm/yas.gif"},stringify:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r],o=[];for(var i in n)n.hasOwnProperty(i)&&o.push(i+"::"+n[i]);t.push(o.join("$$"))}return t.join("**")},report:function(e,t){if(e){var r=new Image;r.src=this.config.reportUrl+"?l="+e+"&t="+(new Date).getTime(),t&&t()}},getUdid:function(){var e=(n("yohobuy_session")||"").slice(2).split(".")[0];return e||0},getUid:function(){var e=(n("_UID")||"").split("::")[1];return e||0},getReqId:function(){return n("docreqid")||0}};e.exports=o},,,,,,,,,,function(e,t,r){var n=r(1),o=r(3),i="_errLog",a={writeError:function(e,t,r,a,d){var s=JSON.parse(n(i)||"[]");s.push({tp:"err",msg:e,sc:t,ln:r,cn:a,pt:location.href,u:o.getUid(),ud:o.getUdid(),rid:o.getReqId(),st:JSON.stringify(d&&d.stack)}),n(i,JSON.stringify(s)),s.length>=5&&this.reportError()},clearError:function(){n(i,"[]")},reportError:function(){var e=this,t=JSON.parse(n(i)||"[]"),r=o.stringify(t);o.report(r,function(){e.clearError()})},init:function(){window.onerror=this.writeError.bind(this),this.reportError()}};e.exports=a},function(e,t,r){function n(e){var t=e.offsetTop;return null!==e.offsetParent&&(t+=n(e.offsetParent)),t}var o=r(3),i=window.screen.height,a=[],d=!1,s=!1,u=0,c=setInterval(function(){var e,t;if(d){if(a.length)for(e=0;e<a.length;e++){if(t=a[e],!t.complete){s=!1;break}s=!0}else s=!0;s&&(u=(new Date).getTime()-_timeStart,clearInterval(c))}else{var r=document.body.querySelector("img")||[];for(e=0;e<r.length;e++){t=r[e];var o=n(t);if(o>i){d=!0;break}o<=i&&!t.hasPushed&&(t.hasPushed=1,a.push(t))}}},0),p={reportTime:function(e){var t=o.stringify(e);o.report(t)},addEvent:function(){var e=this,t=[],r=location.href,n=o.getUid(),i=o.getUdid(),a=o.getReqId(),p=window.performance&&window.performance.timing.navigationStart||0;_timeStart=window._timeStart||0,console.log("绑定 DOMContentLoaded"),document.addEventListener&&document.addEventListener("DOMContentLoaded",function(e){console.log("执行 DOMContentLoaded"),t.push({tp:"dcl",t:(new Date).getTime()-_timeStart,pt:r,u:n,ud:i,rid:a});var o=document.body.querySelector("img")||[];o.length||(d=!0)},!1),console.log("绑定 load"),window.addEventListener&&window.addEventListener("load",function(o){console.log("执行 load"),t.push({tp:"ld",t:(new Date).getTime()-_timeStart,pt:r,u:n,ud:i,rid:a}),s=!0,d=!0,c&&clearInterval(c),u&&t.push({tp:"fs",t:u,pt:r,u:n,ud:i,rid:a}),t.push({tp:"pf",dcl:(window.performance&&window.performance.timing.domComplete||0)-p,ld:(window.performance&&window.performance.timing.loadEventStart||0)-p,pt:r,u:n,ud:i,rid:a}),e.reportTime(t)},!1)},init:function(){this.addEvent()}};e.exports=p}]);
{{/ifand}}
</script>
... ...