|
|
<script>
|
|
|
{{!--(function(w, d, s, j, f) {
|
|
|
(function(w, d, s, j, f) {
|
|
|
var a = d.createElement(s);
|
|
|
var m = d.getElementsByTagName(s)[0];
|
|
|
|
|
|
w.YohoAcquisitionObject = f;
|
|
|
|
|
|
w[f] = function() {
|
|
|
w[f].p = arguments;
|
|
|
};
|
|
|
|
|
|
a.async = 1;
|
|
|
a.src = j;
|
|
|
m.parentNode.insertBefore(a, m);
|
|
|
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.1.2/yas.js', '_yas'));
|
|
|
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.2/yas.js', '_yas'));
|
|
|
|
|
|
(function() {
|
|
|
function getUid() {
|
...
|
...
|
@@ -18,12 +20,12 @@ |
|
|
name = '_UID',
|
|
|
cookies = (document.cookie && document.cookie.split(';')) || [];
|
|
|
|
|
|
cookies.forEach(function(c) {
|
|
|
if (c.indexOf(name) > -1) {
|
|
|
uid = decodeURIComponent(c.replace(name + '=', '').trim());
|
|
|
return;
|
|
|
for (var i = 0; i < cookies.length; i++) {
|
|
|
if (cookies[i].indexOf(name) > -1) {
|
|
|
uid = decodeURIComponent(cookies[i].replace(name + '=', '').trim());
|
|
|
break;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (!uid) return 0;
|
|
|
|
...
|
...
|
@@ -48,13 +50,26 @@ |
|
|
}
|
|
|
|
|
|
var uid = getUid() || queryString().uid;
|
|
|
var isYohoBuy = /YohoBuy/i.test(navigator.userAgent || '');
|
|
|
var isIos = /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || '');
|
|
|
var isAndroid = /Android/i.test(navigator.userAgent || '');
|
|
|
|
|
|
uid = uid === 0 ? '' : uid;
|
|
|
window._ozuid = uid; // 暴露ozuid
|
|
|
if (window._yas) {
|
|
|
window._yas(1 * new Date(), '2.1.2', 'yohoblk_m', uid, '', '');
|
|
|
let ak = 'yohoblk_m';
|
|
|
|
|
|
if (isYohoBuy) {
|
|
|
if (isIos) {
|
|
|
ak = 'yohobuy_ios';
|
|
|
} else if (isAndroid) {
|
|
|
ak = 'yohobuy_android';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
window._yas(1 * new Date(), '2.4.2', ak, uid, '', '');
|
|
|
}
|
|
|
}());--}}
|
|
|
}());
|
|
|
var _hmt = _hmt || [];
|
|
|
(function() {
|
|
|
var hm = document.createElement("script");
|
...
|
...
|
|