Authored by Rock Zhang

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

... ... @@ -158,6 +158,21 @@ function reMarginFooter(fixedElement) {
$footer.removeClass('hide');
}());
(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', 'http://cdn.yoho.cn/yas-jssdk/1.0.13.6.3/yas-debug.js', '_yas');
(function() {
var uid = getUid();
... ... @@ -166,7 +181,7 @@ function reMarginFooter(fixedElement) {
window._ozuid = uid;//暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '1.0.13.2', 'yohobuy_m', uid, '');
window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', uid, '', '');
}
}());
... ...
... ... @@ -30,6 +30,7 @@ if (likeHammer) {
opt = 'ok';
favorite = 1;
}
$.ajax({
type: 'POST',
url: '/product/opt/favoriteProduct',
... ... @@ -51,19 +52,19 @@ if (likeHammer) {
} else {
tip.show(data.message);
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
// 统计代码:用于统计用户加入或取消商品收藏的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
fa: favorite
});
}, true);
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
});
}
... ... @@ -75,7 +76,7 @@ if (addToCartHammer) {
window._yas.sendCustomInfo({
pd: productId,
by: 1
});
}, false);
}
});
}
... ...
... ... @@ -8,6 +8,7 @@ var $ = require('jquery'),
Hammer = require('yoho.hammer'),
lazyLoad = require('yoho.lazyload');
//品牌页参数
var $brandHeader = $('#brand-header'),
$introBox = $('#intro-box');
... ... @@ -231,6 +232,25 @@ function search(opt) {
loading.hideLoadingMask();
window.rePosFooter();
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if (window._yas) {
switch (navType) {
case 'newest':
window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', window._ozuid,
'', '.new-goods .good-info .good-detail-img .good-thumb');
break;
case 'price':
window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', window._ozuid,
'', '.new-goods .good-info .good-detail-img .good-thumb');
break;
case 'discount':
window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', window._ozuid,
'', '.new-goods .good-info .good-detail-img .good-thumb');
break;
}
}
}
});
... ... @@ -455,8 +475,3 @@ $listNav.on('touchstart', 'li', function() {
$listNav.find('li').removeClass('bytouch');
});
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if (window._yas) {
window._yas(1 * new Date(), '1.0.13.2', 'yohobuy_m', window._ozuid,
'', '#goods-container >div >div .good-thumb >img');
}
\ No newline at end of file
... ...
... ... @@ -13,6 +13,7 @@
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
... ... @@ -22,6 +23,7 @@
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
... ...
... ... @@ -19,18 +19,7 @@
<script src="http://localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: 'http://localhost:8000/'});</script>
{{/if}}
<script type="text/javascript">
(function(w,d,s,j,f){
w['YohoAcquisitionObject']=f;
w[f]=function(){w[f].p=arguments;};
var a=d.createElement(s);
var m=d.getElementsByTagName(s)[0];
a.async=1;
a.src=j;
m.parentNode.insertBefore(a,m);
})(window,document,'script','http://cdn.yoho.cn/yas-jssdk/{{yas_version}}/yas.js','_yas');
</script>
{{> layout/use}}
{{> layout/use}}
{{> layout/analysis}}
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.2.1"
; JS统计代码的版本号
application.yas.version = "1.0.13.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.2.1"
; JS统计代码的版本号
application.yas.version = "1.0.13.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.2.1"
; JS统计代码的版本号
application.yas.version = "1.0.13.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.2.1"
; JS统计代码的版本号
application.yas.version = "1.0.13.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...