Showing
1 changed file
with
11 additions
and
24 deletions
@@ -22,6 +22,14 @@ | @@ -22,6 +22,14 @@ | ||
22 | <link rel="dns-prefetch" href="{{this}}"> | 22 | <link rel="dns-prefetch" href="{{this}}"> |
23 | {{/dnsPrefetch.hosts}} | 23 | {{/dnsPrefetch.hosts}} |
24 | 24 | ||
25 | + <script> | ||
26 | + window._timeStart = Date.now(); | ||
27 | + | ||
28 | + {{#ifand isProduction wap.open.bughd}} | ||
29 | + !function (r) { function e(n) { if (t[n]) return t[n].exports; var o = t[n] = { exports: {}, id: n, loaded: !1 }; return r[n].call(o.exports, o, o.exports, e), o.loaded = !0, o.exports } var t = {}; return e.m = r, e.c = t, e.p = "", e(0) }([function (r, e, t) { var n = t(1), o = t(2), i = "_errLog", s = function () { var r = (n("yohobuy_session") || "").slice(2).split(".")[0]; return r || 0 }, p = function () { var r = (n("_UID") || "").split("::")[1]; return r || 0 }, u = function () { return n("docreqid") || 0 }, a = { writeError: function (r, e, t, o, a) { var c = JSON.parse(n(i) || "[]"); c.push({ tp: "err", msg: r, sc: e, ln: t, cn: o, pt: location.href, u: p(), ud: s(), rid: u(), st: JSON.stringify(a && a.stack) }), n(i, JSON.stringify(c)), c.length >= 5 && this.reportError() }, clearError: function () { n(i, "[]") }, reportError: function () { var r = this, e = JSON.parse(n(i) || "[]"), t = o.stringify(e); o.report(t, function () { r.clearError() }) }, init: function () { window.onerror = this.writeError.bind(this), this.reportError() } }; a.init(), r.exports = a }, function (r, e) { r.exports = function (r, e, t) { if ("undefined" == typeof e) { var n = null; if (document.cookie) for (var o = document.cookie.split(";"), i = 0; i < o.length; i++) { var s = (o[i] || "").trim(); if (s.substring(0, r.length + 1) == r + "=") { n = decodeURIComponent(s.substring(r.length + 1)); break } } return n } t = t || {}, null === e && (e = "", t.expires = -1); var p = ""; if (t.expires && ("number" == typeof t.expires || t.expires.toUTCString)) { var u; "number" == typeof t.expires ? (u = new Date, u.setTime(u.getTime() + 24 * t.expires * 60 * 60 * 1e3)) : u = t.expires, p = "; expires=" + u.toUTCString() } var a = t.path ? "; path=" + t.path : "", c = t.domain ? "; domain=" + t.domain : "", f = t.secure ? "; secure" : ""; document.cookie = [r, "=", encodeURIComponent(e), p, a, c, f].join("") } }, function (r, e) { var t = { config: { reportUrl: "//badjs.yoho.cn/apm/yas.gif" }, stringify: function (r) { for (var e = [], t = 0; t < r.length; t++) { var n = r[t], o = []; for (var i in n) n.hasOwnProperty(i) && o.push(i + "::" + n[i]); e.push(o.join("$$")) } return e.join("**") }, report: function (r, e) { if (r) { var t = new Image; t.src = this.config.reportUrl + "?l=" + r + "&t=" + (new Date).getTime(), e && e() } } }; r.exports = t }]); | ||
30 | + {{/ifand}} | ||
31 | + </script> | ||
32 | + | ||
25 | {{!-- Android机器页面不再受到用户字体缩放强制改变大小 'http://m.blog.csdn.net/article/details?id=51275080' --}} | 33 | {{!-- Android机器页面不再受到用户字体缩放强制改变大小 'http://m.blog.csdn.net/article/details?id=51275080' --}} |
26 | <script type="text/javascript"> | 34 | <script type="text/javascript"> |
27 | var isWechat = /micromessenger/i.test(navigator.userAgent || ''); | 35 | var isWechat = /micromessenger/i.test(navigator.userAgent || ''); |
@@ -97,20 +105,6 @@ | @@ -97,20 +105,6 @@ | ||
97 | {{#if nodownload}} | 105 | {{#if nodownload}} |
98 | <input type="hidden" id="no-download" value="no-download"> | 106 | <input type="hidden" id="no-download" value="no-download"> |
99 | {{/if}} | 107 | {{/if}} |
100 | - {{#ifand isProduction wap.open.bughd}} | ||
101 | - <script type="text/javascript" src="//cdn.yoho.cn/tool/bj-report-tryjs.min.js?t={{startTime}}" crossOrigin="anonymous"></script> | ||
102 | - <script type="text/javascript"> | ||
103 | - if (BJ_REPORT && BJ_REPORT.init) { | ||
104 | - BJ_REPORT.init({ | ||
105 | - id: 2, | ||
106 | - url: "//badjs.yoho.cn/badjs", | ||
107 | - ignore: [/Script error/i], | ||
108 | - offlineLog: false, | ||
109 | - offlineLogAuto: false | ||
110 | - }); | ||
111 | - } | ||
112 | - </script> | ||
113 | - {{/ifand}} | ||
114 | {{#wechatShare}} | 108 | {{#wechatShare}} |
115 | <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> | 109 | <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> |
116 | {{/wechatShare}} | 110 | {{/wechatShare}} |
@@ -121,18 +115,11 @@ | @@ -121,18 +115,11 @@ | ||
121 | <script src="//{{devHost}}:5001/{{module}}.{{page}}.js"></script> | 115 | <script src="//{{devHost}}:5001/{{module}}.{{page}}.js"></script> |
122 | {{^}} | 116 | {{^}} |
123 | <script>var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/m-yohobuy-node/assets';</script> | 117 | <script>var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/m-yohobuy-node/assets';</script> |
124 | - <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/libs.js?t={{startTime}}"></script> | ||
125 | - {{#ifand isProduction wap.open.bughd}} | ||
126 | - <script> | ||
127 | - if (BJ_REPORT && BJ_REPORT.tryJs) { | ||
128 | - BJ_REPORT.tryJs().spyAll(); | ||
129 | - } | ||
130 | - </script> | ||
131 | - {{/ifand}} | ||
132 | - <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}"></script> | 118 | + <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/libs.js?t={{startTime}}" crossorigin="anonymous"></script> |
119 | + <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}" crossorigin="anonymous"></script> | ||
133 | {{/if}} | 120 | {{/if}} |
134 | {{#loadJs}} | 121 | {{#loadJs}} |
135 | - <script type="text/javascript" src="{{src}}"></script> | 122 | + <script type="text/javascript" src="{{src}}" crossorigin="anonymous"></script> |
136 | {{/loadJs}} | 123 | {{/loadJs}} |
137 | {{#unless devEnv}} | 124 | {{#unless devEnv}} |
138 | {{> analysis}} | 125 | {{> analysis}} |
-
Please register or login to post a comment