...
|
...
|
@@ -11,7 +11,8 @@ var plusstar = {}, |
|
|
var windowHeight = $(window).height();
|
|
|
var scrollFn,
|
|
|
scrollTop,
|
|
|
RECPOSE;
|
|
|
RECPOSE,
|
|
|
CID;
|
|
|
|
|
|
require('../common');
|
|
|
|
...
|
...
|
@@ -50,7 +51,19 @@ plusstar = { |
|
|
|
|
|
$(this).find('li').removeClass('focus');
|
|
|
$liDom.addClass('focus');
|
|
|
that.ParentLiDom = $liDom;// 保留当前tab先中的对象
|
|
|
that.tabNav($liDom.data('code'));
|
|
|
|
|
|
// 点击潮流优选上方的TAB按钮时
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_FASHION_HOME_L',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: CID,
|
|
|
TAB_ID: $liDom.index() + 1
|
|
|
})
|
|
|
}, true);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// start -- 默认选中
|
...
|
...
|
@@ -64,9 +77,20 @@ plusstar = { |
|
|
that.tabNav($liDom.data('code'));
|
|
|
|
|
|
// ent -- 默认选中
|
|
|
that.ParentLiDom = $liDom;// 保留当前tab先中的对象
|
|
|
setTimeout(function() {
|
|
|
that._yas();
|
|
|
}, 1000);
|
|
|
},
|
|
|
_yas: function() {
|
|
|
var that = this;
|
|
|
|
|
|
if (!window._yas || !window._yas.sendCustomInfo) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
// 商品单击埋点
|
|
|
RECPOSE = $liDom.index() === 0 ? 100014 : 100015;
|
|
|
RECPOSE = that.ParentLiDom.index() !== 0 ? 100015 : 100014;
|
|
|
$('.plusstar-resources').bind('click', function(event) {
|
|
|
|
|
|
var $goodInfo = $(event.target).closest('.good-info'),
|
...
|
...
|
@@ -83,6 +107,36 @@ plusstar = { |
|
|
page_num: Math.ceil(index / that.common.pagesize)
|
|
|
});
|
|
|
});
|
|
|
|
|
|
// 潮流优选首页加载时
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_FASHION_HOME_L',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: CID,
|
|
|
TAB_ID: that.ParentLiDom.index() + 1
|
|
|
})
|
|
|
}, true);
|
|
|
|
|
|
// 头部banner楼层埋点
|
|
|
$('.plusstar-resources .banner-top').find('ul').bind('click', function(event) {
|
|
|
var $dom = $(event.target).closest('.li'),
|
|
|
index;
|
|
|
|
|
|
index = $dom.index() + 1;
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_FASHION_HOME_L',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: CID,
|
|
|
TAB_ID: that.ParentLiDom.index() + 1,
|
|
|
F_ID: $(this).data('id'),
|
|
|
F_NAME: '焦点图',
|
|
|
F_URL: $dom.find('a').attr('href'),
|
|
|
F_INDEX: 1,
|
|
|
I_INDEX: index
|
|
|
})
|
|
|
}, true);
|
|
|
});
|
|
|
|
|
|
},
|
|
|
tabNav: function(code) {
|
|
|
var that = this;
|
...
|
...
|
@@ -215,6 +269,9 @@ scrollFn = debounce(function() { |
|
|
}, 200);
|
|
|
|
|
|
$(function() {
|
|
|
// 男:1,女:2,潮童:3,创意生活:4
|
|
|
CID = window._ChannelVary[window.cookie('_Channel')] || 1;
|
|
|
|
|
|
if (!(window.queryString.app_version || window.queryString.appVersion)) {
|
|
|
$('.tab-nav').css({
|
|
|
position: 'relative'
|
...
|
...
|
@@ -233,5 +290,4 @@ $(function() { |
|
|
$(window).scroll(function() {
|
|
|
scrollFn();
|
|
|
});
|
|
|
|
|
|
}); |
...
|
...
|
|