Showing
1 changed file
with
31 additions
and
5 deletions
@@ -10,7 +10,8 @@ var plusstar = {}, | @@ -10,7 +10,8 @@ var plusstar = {}, | ||
10 | 10 | ||
11 | var windowHeight = $(window).height(); | 11 | var windowHeight = $(window).height(); |
12 | var scrollFn, | 12 | var scrollFn, |
13 | - scrollTop; | 13 | + scrollTop, |
14 | + RECPOSE; | ||
14 | 15 | ||
15 | require('../common'); | 16 | require('../common'); |
16 | 17 | ||
@@ -63,6 +64,25 @@ plusstar = { | @@ -63,6 +64,25 @@ plusstar = { | ||
63 | that.tabNav($liDom.data('code')); | 64 | that.tabNav($liDom.data('code')); |
64 | 65 | ||
65 | // ent -- 默认选中 | 66 | // ent -- 默认选中 |
67 | + | ||
68 | + // 商品单击埋点 | ||
69 | + RECPOSE = $liDom.index() === 0 ? 100014 : 100015; | ||
70 | + $('.plusstar-resources').bind('click', function(event) { | ||
71 | + | ||
72 | + var $goodInfo = $(event.target).closest('.good-info'), | ||
73 | + index; | ||
74 | + | ||
75 | + index = $goodInfo.index() + 1; | ||
76 | + | ||
77 | + window.givePoint({ | ||
78 | + REC_POSE: RECPOSE, | ||
79 | + PRD_ID: $goodInfo.data('id'), | ||
80 | + ORDER_CODE: '', | ||
81 | + PRD_NUM: index % that.common.pagesize === 0 ? that.common.pagesize : index % that.common.pagesize, | ||
82 | + ACTION_ID: 1, | ||
83 | + page_num: Math.ceil(index / that.common.pagesize) | ||
84 | + }); | ||
85 | + }); | ||
66 | }, | 86 | }, |
67 | tabNav: function(code) { | 87 | tabNav: function(code) { |
68 | var that = this; | 88 | var that = this; |
@@ -70,8 +90,6 @@ plusstar = { | @@ -70,8 +90,6 @@ plusstar = { | ||
70 | this.common.codeDefault = code;// 记住最后一次的tab code | 90 | this.common.codeDefault = code;// 记住最后一次的tab code |
71 | this.common.page = 1;// 商品列表从第一页开始 | 91 | this.common.page = 1;// 商品列表从第一页开始 |
72 | 92 | ||
73 | - loading.showLoadingMask(); | ||
74 | - | ||
75 | $.ajax({ | 93 | $.ajax({ |
76 | type: 'GET', | 94 | type: 'GET', |
77 | url: '/guang/plusstar/resources-template', | 95 | url: '/guang/plusstar/resources-template', |
@@ -92,7 +110,6 @@ plusstar = { | @@ -92,7 +110,6 @@ plusstar = { | ||
92 | 110 | ||
93 | that.resInit(); | 111 | that.resInit(); |
94 | 112 | ||
95 | - loading.hideLoadingMask(); | ||
96 | lazyLoad($('img.lazy')); | 113 | lazyLoad($('img.lazy')); |
97 | 114 | ||
98 | // 处理左右滑动,未加载的图片 | 115 | // 处理左右滑动,未加载的图片 |
@@ -114,7 +131,6 @@ plusstar = { | @@ -114,7 +131,6 @@ plusstar = { | ||
114 | if (productSkns) { | 131 | if (productSkns) { |
115 | that.common.productSkns = productSkns.split(','); | 132 | that.common.productSkns = productSkns.split(','); |
116 | } | 133 | } |
117 | - | ||
118 | }, | 134 | }, |
119 | error: function() { | 135 | error: function() { |
120 | tip.show('网络断开连接了~'); | 136 | tip.show('网络断开连接了~'); |
@@ -150,6 +166,16 @@ plusstar = { | @@ -150,6 +166,16 @@ plusstar = { | ||
150 | } | 166 | } |
151 | 167 | ||
152 | loading.showLoadingMask(); | 168 | loading.showLoadingMask(); |
169 | + | ||
170 | + window.givePoint({ | ||
171 | + REC_POSE: RECPOSE, | ||
172 | + PRD_ID: skn.join(','), | ||
173 | + ORDER_CODE: '', | ||
174 | + PRD_NUM: skn.length, | ||
175 | + ACTION_ID: 0, | ||
176 | + page_num: that.common.page | ||
177 | + }); | ||
178 | + | ||
153 | that.common.page++; | 179 | that.common.page++; |
154 | $.ajax({ | 180 | $.ajax({ |
155 | type: 'POST', | 181 | type: 'POST', |
-
Please register or login to post a comment