|
@@ -184,21 +184,34 @@ togetherProductSource = $('#togetherProduct').html(); |
|
@@ -184,21 +184,34 @@ togetherProductSource = $('#togetherProduct').html(); |
184
|
togetherProductTemplate = Handlerbars.compile(togetherProductSource);
|
184
|
togetherProductTemplate = Handlerbars.compile(togetherProductSource);
|
185
|
|
185
|
|
186
|
function getTogetherProduct($obj, url, page) {
|
186
|
function getTogetherProduct($obj, url, page) {
|
|
|
187
|
+ var PRDID = [];
|
|
|
188
|
+
|
187
|
$.ajax({
|
189
|
$.ajax({
|
188
|
type: 'GET',
|
190
|
type: 'GET',
|
189
|
dataType: 'json',
|
191
|
dataType: 'json',
|
190
|
url: url,
|
192
|
url: url,
|
191
|
data: page
|
193
|
data: page
|
192
|
}).then(function(d) {
|
194
|
}).then(function(d) {
|
193
|
- if (d.code === 200) {
|
|
|
194
|
- if (d.data.item) {
|
|
|
195
|
- if (d.data.item.length > 0) {
|
|
|
196
|
- $obj.html(' ');
|
|
|
197
|
- togetherProductStr = togetherProductTemplate(d.data);
|
|
|
198
|
- $obj.append($(togetherProductStr));
|
|
|
199
|
- $('#orderProduct li:last').addClass('end');
|
|
|
200
|
- $('.gift').removeClass('none');
|
|
|
201
|
- }
|
195
|
+ if (d.code === 200 && d.data.item.length > 0) {
|
|
|
196
|
+ $obj.html(' ');
|
|
|
197
|
+ togetherProductStr = togetherProductTemplate(d.data);
|
|
|
198
|
+ $obj.append($(togetherProductStr));
|
|
|
199
|
+ $('#orderProduct li:last').addClass('end');
|
|
|
200
|
+ $('.gift').removeClass('none');
|
|
|
201
|
+
|
|
|
202
|
+ //为您优选埋点
|
|
|
203
|
+ if ($obj.hasClass('givePoint')) {
|
|
|
204
|
+ $.each(d.data.item, function(key, val) {
|
|
|
205
|
+ PRDID.push(val.id);
|
|
|
206
|
+ });
|
|
|
207
|
+
|
|
|
208
|
+ window.givePoint({
|
|
|
209
|
+ 'REC_POSE': 120003,
|
|
|
210
|
+ 'PRD_ID': PRDID.join(','),
|
|
|
211
|
+ 'PRD_NUM': d.data.item.length,
|
|
|
212
|
+ 'ACTION_ID': 0,
|
|
|
213
|
+ 'page_num': page && page.page ? page.page : 1
|
|
|
214
|
+ });
|
202
|
}
|
215
|
}
|
203
|
}
|
216
|
}
|
204
|
});
|
217
|
});
|