...
|
...
|
@@ -673,7 +673,7 @@ bindEvent.add(function() { |
|
|
}
|
|
|
|
|
|
// 加入购物车埋点
|
|
|
yas.givePoint('YB_GDS_DT_ADD_TO_SC', {PRD_ID: getSku(), PRD_NUM: getNum()});
|
|
|
yas.givePoint('YB_GDS_DT_ADD_TO_SC', {PRD_ID: +$('.main').data('id'), PRD_NUM: getNum()});
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
...
|
...
|
@@ -1694,5 +1694,104 @@ $(function() { |
|
|
});
|
|
|
});
|
|
|
|
|
|
/*获取商品编码*/
|
|
|
function getPrdId(){
|
|
|
return +$('.main').data('id');
|
|
|
}
|
|
|
|
|
|
$('#buy-now').click(function(){
|
|
|
var num = +$('#num').text();
|
|
|
var option = {
|
|
|
PRD_ID : getPrdId(),
|
|
|
PRD_NUM : num,
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
/*点击商品详情页商品角度图时埋点*/
|
|
|
$('#thumbs > .thumb-wrap').on('click', '.thumb', function(){
|
|
|
var $this = $(this);
|
|
|
var $index = $this.index()+1;
|
|
|
yas.givePoint('YB_GDS_PICTURE_C', {PRD_ID: getPrdId(), PIC_INDEX: $index});
|
|
|
|
|
|
});
|
|
|
|
|
|
/*点击商品分享渠道时埋点*/
|
|
|
$('.share-row .share-to i').on('click',function(){
|
|
|
var $this = $(this);
|
|
|
var $index = $this.index()+1;
|
|
|
yas.givePoint('YB_GDS_SHARE_TYPE_C', {PRD_ID: getPrdId(), TYPE_ID: $index});
|
|
|
|
|
|
});
|
|
|
|
|
|
$('.chose-color .colors').on('click', 'li', function(){
|
|
|
|
|
|
});
|
|
|
|
|
|
/*点击商品详情页尺寸时埋点*/
|
|
|
$('#sizes .size').on('click', 'li', function(){
|
|
|
var $this = $(this);
|
|
|
yas.givePoint('YB_GDS_SIZE_C', {PRD_ID: getPrdId(), SIZE: $this.data('name')});
|
|
|
});
|
|
|
|
|
|
/*点击商品详情页模块导航时埋点*/
|
|
|
$('.shoppingCar .shoppingCar-nav ul').on('click', 'li', function(){
|
|
|
var $this = $(this);
|
|
|
var $index = $this.index()+1;
|
|
|
yas.givePoint('YB_GDS_NAVIGATION_C', {PRD_ID: getPrdId(), NAV_INDE: $index});
|
|
|
});
|
|
|
|
|
|
/*点击商品评价模块中的全部/有图/图片时埋点*/
|
|
|
$('.cc-content .comment-tabs').on('click', 'h2', function(){
|
|
|
var $this = $(this);
|
|
|
var $index = $this.index()+1;
|
|
|
yas.givePoint('YB_GDS_REVIEWS_TAB_C', {PRD_ID: getPrdId(), POS_ID: $index});
|
|
|
});
|
|
|
|
|
|
$('.comments').on('click', '.img-preview .img-thumb', function() {
|
|
|
yas.givePoint('YB_GDS_REVIEWS_TAB_C', {PRD_ID: getPrdId(), POS_ID: 3});
|
|
|
});
|
|
|
|
|
|
/*点击商品详情页中的【我要咨询】时埋点*/
|
|
|
$('#submit-consult').click(function(){
|
|
|
yas.givePoint('YB_GDS_CONSULT_C', {PRD_ID: getPrdId()});
|
|
|
});
|
|
|
|
|
|
/*点击商品详情页底部店铺推荐和最近浏览TAB时埋点*/
|
|
|
$('.bottom-tab p').on('click', 'span', function(){
|
|
|
var $this = $(this);
|
|
|
var $index = $this.index()+1;
|
|
|
if( $index !== 3){
|
|
|
yas.givePoint('YB_GDS_RECOMMEND_REVIEW_TAB_C', {PRD_ID: getPrdId(), TAB_ID: $index});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/*点击商品详情页底部店铺推荐和最近浏览中的商品时*/
|
|
|
$('.recommend-content .img-list').on('click', 'li', function(){
|
|
|
var $this = $(this);
|
|
|
var relatedID = +$this.find('.goods-id').text();
|
|
|
var option = {
|
|
|
PRD_ID: getPrdId(),
|
|
|
RELATED_ID: relatedID,
|
|
|
TAB_ID : 1
|
|
|
};
|
|
|
yas.givePoint('YB_GDS_RECOMMEND_REVIEW_GOODS_C', option);
|
|
|
});
|
|
|
|
|
|
$('#latest-walk-goods').on('click', '.good', function(){
|
|
|
var $this = $(this);
|
|
|
var relatedID = +$this.find('a').attr('href').split('_')[1];
|
|
|
var option = {
|
|
|
PRD_ID: getPrdId(),
|
|
|
RELATED_ID: relatedID,
|
|
|
TAB_ID : 2
|
|
|
};
|
|
|
yas.givePoint('YB_GDS_RECOMMEND_REVIEW_GOODS_C', option);
|
|
|
});
|
|
|
|
|
|
// $('#package').click(function(){
|
|
|
// getPrdId();
|
|
|
// });
|
|
|
// 数据懒加载
|
|
|
dataLazyLoad.init({cls: '.datalazyload', threshold: 0}); |
...
|
...
|
|