...
|
...
|
@@ -10,7 +10,8 @@ var plusstar = {}, |
|
|
|
|
|
var windowHeight = $(window).height();
|
|
|
var scrollFn,
|
|
|
scrollTop;
|
|
|
scrollTop,
|
|
|
RECPOSE;
|
|
|
|
|
|
require('../common');
|
|
|
|
...
|
...
|
@@ -63,6 +64,25 @@ plusstar = { |
|
|
that.tabNav($liDom.data('code'));
|
|
|
|
|
|
// ent -- 默认选中
|
|
|
|
|
|
// 商品单击埋点
|
|
|
RECPOSE = $liDom.index() === 0 ? 100014 : 100015;
|
|
|
$('.plusstar-resources').bind('click', function(event) {
|
|
|
|
|
|
var $goodInfo = $(event.target).closest('.good-info'),
|
|
|
index;
|
|
|
|
|
|
index = $goodInfo.index() + 1;
|
|
|
|
|
|
window.givePoint({
|
|
|
REC_POSE: RECPOSE,
|
|
|
PRD_ID: $goodInfo.data('id'),
|
|
|
ORDER_CODE: '',
|
|
|
PRD_NUM: index % that.common.pagesize === 0 ? that.common.pagesize : index % that.common.pagesize,
|
|
|
ACTION_ID: 1,
|
|
|
page_num: Math.ceil(index / that.common.pagesize)
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
tabNav: function(code) {
|
|
|
var that = this;
|
...
|
...
|
@@ -70,8 +90,6 @@ plusstar = { |
|
|
this.common.codeDefault = code;// 记住最后一次的tab code
|
|
|
this.common.page = 1;// 商品列表从第一页开始
|
|
|
|
|
|
loading.showLoadingMask();
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/guang/plusstar/resources-template',
|
...
|
...
|
@@ -92,7 +110,6 @@ plusstar = { |
|
|
|
|
|
that.resInit();
|
|
|
|
|
|
loading.hideLoadingMask();
|
|
|
lazyLoad($('img.lazy'));
|
|
|
|
|
|
// 处理左右滑动,未加载的图片
|
...
|
...
|
@@ -114,7 +131,6 @@ plusstar = { |
|
|
if (productSkns) {
|
|
|
that.common.productSkns = productSkns.split(',');
|
|
|
}
|
|
|
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开连接了~');
|
...
|
...
|
@@ -150,6 +166,16 @@ plusstar = { |
|
|
}
|
|
|
|
|
|
loading.showLoadingMask();
|
|
|
|
|
|
window.givePoint({
|
|
|
REC_POSE: RECPOSE,
|
|
|
PRD_ID: skn.join(','),
|
|
|
ORDER_CODE: '',
|
|
|
PRD_NUM: skn.length,
|
|
|
ACTION_ID: 0,
|
|
|
page_num: that.common.page
|
|
|
});
|
|
|
|
|
|
that.common.page++;
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
...
|
...
|
|