Authored by 梁志锋

增加加入购物车和点击收藏的统计代码

@@ -7,12 +7,13 @@ var $ = require('jquery'), @@ -7,12 +7,13 @@ var $ = require('jquery'),
7 Hammer = require('yoho.hammer'), 7 Hammer = require('yoho.hammer'),
8 tip = require('../../plugin/tip'); 8 tip = require('../../plugin/tip');
9 9
10 -var likeHammer = new Hammer(document.getElementById('likeBtn')); 10 +var likeHammer = new Hammer(document.getElementById('likeBtn')),
11 addToCartHammer = new Hammer(document.getElementById('addtoCart')); 11 addToCartHammer = new Hammer(document.getElementById('addtoCart'));
12 12
  13 +var productId = $('#productId').val();
  14 +
13 likeHammer.on('tap', function(e) { 15 likeHammer.on('tap', function(e) {
14 - var productId = $('#productId').val(),  
15 - opt, 16 + var opt,
16 favorite; 17 favorite;
17 18
18 19
@@ -445,5 +445,5 @@ $listNav.on('touchstart', 'li', function() { @@ -445,5 +445,5 @@ $listNav.on('touchstart', 'li', function() {
445 445
446 // 用于统计点击了商品列表的第几个商品,序号从1开始计算。 446 // 用于统计点击了商品列表的第几个商品,序号从1开始计算。
447 if (window._yas) { 447 if (window._yas) {
448 - window._yas(1 * new Date(), '1.0.13.1', 'yohobuy_m', uid, '#goods-container >div >div .good-thumb >img'); 448 + window._yas(1 * new Date(), '1.0.13.1', 'yohobuy_m', window._ozuid, '#goods-container >div >div .good-thumb >img');
449 } 449 }