...
|
...
|
@@ -93,6 +93,20 @@ bindEvent.add(function() { |
|
|
|
|
|
var $couponItem = $('.coupon-item');
|
|
|
|
|
|
function randomString(len) {
|
|
|
var $chars = 'ABCDEFGHJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-';
|
|
|
|
|
|
var maxPos = $chars.length,
|
|
|
pwd = '',
|
|
|
i;
|
|
|
|
|
|
for (i = 0; i < len; i++) {
|
|
|
pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
|
|
|
}
|
|
|
|
|
|
return pwd;
|
|
|
}
|
|
|
|
|
|
function openCouponDialog(e) {
|
|
|
var $coupons = $couponItem.map(function(i) {
|
|
|
var $this = $(this);
|
...
|
...
|
@@ -1150,3 +1164,46 @@ bindEvent.fire(); |
|
|
|
|
|
// 数据懒加载
|
|
|
dataLazyLoad.init({cls: '.datalazyload', threshold: 0});
|
|
|
|
|
|
/*
|
|
|
* 页面加载完
|
|
|
*/
|
|
|
$(function() {
|
|
|
var $goodsIdArr = [],
|
|
|
loadYas = {};
|
|
|
|
|
|
$('.recommend-slider .img-item .goods-id').each(function() {
|
|
|
$goodsIdArr.push($(this).html());
|
|
|
});
|
|
|
|
|
|
loadYas = {
|
|
|
REC_POSE: 100013,
|
|
|
REC_ID: randomString(40),
|
|
|
PRD_ID: $goodsIdArr.join(','),
|
|
|
PRD_NUM: $goodsIdArr.length,
|
|
|
ACTION_ID: 0,
|
|
|
PAGE_NUM: 1
|
|
|
};
|
|
|
|
|
|
|
|
|
// 关键词搜索结果页展示时
|
|
|
yas.givePoint('YB_CHOOSE_FOR_YOU_Y', loadYas);
|
|
|
});
|
|
|
|
|
|
// 点击为您推荐商品埋点
|
|
|
$('.recommend-slider .img-item').click(function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
var loadYas = {
|
|
|
REC_POSE: 100013,
|
|
|
REC_ID: randomString(40),
|
|
|
PRD_ID: $this.find('.goods-id').html(),
|
|
|
PRD_NUM: $this.index(),
|
|
|
ACTION_ID: 1,
|
|
|
PAGE_NUM: 1
|
|
|
};
|
|
|
|
|
|
|
|
|
// 关键词搜索结果页展示时
|
|
|
yas.givePoint('YB_CHOOSE_FOR_YOU_Y', loadYas);
|
|
|
}); |
...
|
...
|
|