Authored by lea guo

发现好货

1 { 1 {
2 "name": "yohobuywap-node-activity", 2 "name": "yohobuywap-node-activity",
3 - "version": "6.9.13-beta-2", 3 + "version": "6.9.13-beta-3",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -15,6 +15,11 @@ class GoodsShowYasRpter { @@ -15,6 +15,11 @@ class GoodsShowYasRpter {
15 this.reportCtl(); 15 this.reportCtl();
16 }); 16 });
17 }; 17 };
  18 + window.ontouchend = () => {
  19 + window.requestAnimationFrame(() => {
  20 + this.reportCtl();
  21 + });
  22 + };
18 } 23 }
19 24
20 reportCtl() { 25 reportCtl() {
@@ -66,8 +71,6 @@ class GoodsShowYasRpter { @@ -66,8 +71,6 @@ class GoodsShowYasRpter {
66 } 71 }
67 72
68 report() { 73 report() {
69 - let cacheTheShowSkns = []; // 暂存此次上报的商品,上报后复制给 lastReportSkns  
70 -  
71 $('.item-wrapper').each((i, itemElement) => { 74 $('.item-wrapper').each((i, itemElement) => {
72 let $item = $(itemElement); 75 let $item = $(itemElement);
73 let goodsRawArr = []; // 当前楼层的商品 76 let goodsRawArr = []; // 当前楼层的商品
@@ -101,14 +104,12 @@ class GoodsShowYasRpter { @@ -101,14 +104,12 @@ class GoodsShowYasRpter {
101 I_INDEX, 104 I_INDEX,
102 PRD_SKN, 105 PRD_SKN,
103 }); 106 });
104 - cacheTheShowSkns.push(PRD_SKN); 107 + this.lastShowSkns.push(PRD_SKN);
105 } 108 }
106 } 109 }
107 } 110 }
108 }); 111 });
109 112
110 - this.lastShowSkns = cacheTheShowSkns;  
111 -  
112 setTimeout(() => { 113 setTimeout(() => {
113 if ( 114 if (
114 typeof window._yas !== 'undefined' && 115 typeof window._yas !== 'undefined' &&