...
|
...
|
@@ -184,21 +184,34 @@ togetherProductSource = $('#togetherProduct').html(); |
|
|
togetherProductTemplate = Handlerbars.compile(togetherProductSource);
|
|
|
|
|
|
function getTogetherProduct($obj, url, page) {
|
|
|
var PRDID = [];
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
dataType: 'json',
|
|
|
url: url,
|
|
|
data: page
|
|
|
}).then(function(d) {
|
|
|
if (d.code === 200) {
|
|
|
if (d.data.item) {
|
|
|
if (d.data.item.length > 0) {
|
|
|
$obj.html(' ');
|
|
|
togetherProductStr = togetherProductTemplate(d.data);
|
|
|
$obj.append($(togetherProductStr));
|
|
|
$('#orderProduct li:last').addClass('end');
|
|
|
$('.gift').removeClass('none');
|
|
|
}
|
|
|
if (d.code === 200 && d.data.item.length > 0) {
|
|
|
$obj.html(' ');
|
|
|
togetherProductStr = togetherProductTemplate(d.data);
|
|
|
$obj.append($(togetherProductStr));
|
|
|
$('#orderProduct li:last').addClass('end');
|
|
|
$('.gift').removeClass('none');
|
|
|
|
|
|
//为您优选埋点
|
|
|
if ($obj.hasClass('givePoint')) {
|
|
|
$.each(d.data.item, function(key, val) {
|
|
|
PRDID.push(val.id);
|
|
|
});
|
|
|
|
|
|
window.givePoint({
|
|
|
'REC_POSE': 120003,
|
|
|
'PRD_ID': PRDID.join(','),
|
|
|
'PRD_NUM': d.data.item.length,
|
|
|
'ACTION_ID': 0,
|
|
|
'page_num': page && page.page ? page.page : 1
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
...
|
...
|
|