|
@@ -11,7 +11,8 @@ var plusstar = {}, |
|
@@ -11,7 +11,8 @@ var plusstar = {}, |
11
|
var windowHeight = $(window).height();
|
11
|
var windowHeight = $(window).height();
|
12
|
var scrollFn,
|
12
|
var scrollFn,
|
13
|
scrollTop,
|
13
|
scrollTop,
|
14
|
- RECPOSE;
|
14
|
+ RECPOSE,
|
|
|
15
|
+ CID;
|
15
|
|
16
|
|
16
|
require('../common');
|
17
|
require('../common');
|
17
|
|
18
|
|
|
@@ -50,7 +51,19 @@ plusstar = { |
|
@@ -50,7 +51,19 @@ plusstar = { |
50
|
|
51
|
|
51
|
$(this).find('li').removeClass('focus');
|
52
|
$(this).find('li').removeClass('focus');
|
52
|
$liDom.addClass('focus');
|
53
|
$liDom.addClass('focus');
|
|
|
54
|
+ that.ParentLiDom = $liDom;// 保留当前tab先中的对象
|
53
|
that.tabNav($liDom.data('code'));
|
55
|
that.tabNav($liDom.data('code'));
|
|
|
56
|
+
|
|
|
57
|
+ // 点击潮流优选上方的TAB按钮时
|
|
|
58
|
+ if (window._yas && window._yas.sendCustomInfo) {
|
|
|
59
|
+ window._yas.sendCustomInfo({
|
|
|
60
|
+ op: 'YB_FASHION_HOME_L',
|
|
|
61
|
+ param: JSON.stringify({
|
|
|
62
|
+ C_ID: CID,
|
|
|
63
|
+ TAB_ID: $liDom.index() + 1
|
|
|
64
|
+ })
|
|
|
65
|
+ }, true);
|
|
|
66
|
+ }
|
54
|
});
|
67
|
});
|
55
|
|
68
|
|
56
|
// start -- 默认选中
|
69
|
// start -- 默认选中
|
|
@@ -64,9 +77,20 @@ plusstar = { |
|
@@ -64,9 +77,20 @@ plusstar = { |
64
|
that.tabNav($liDom.data('code'));
|
77
|
that.tabNav($liDom.data('code'));
|
65
|
|
78
|
|
66
|
// ent -- 默认选中
|
79
|
// ent -- 默认选中
|
|
|
80
|
+ that.ParentLiDom = $liDom;// 保留当前tab先中的对象
|
|
|
81
|
+ setTimeout(function() {
|
|
|
82
|
+ that._yas();
|
|
|
83
|
+ }, 1000);
|
|
|
84
|
+ },
|
|
|
85
|
+ _yas: function() {
|
|
|
86
|
+ var that = this;
|
|
|
87
|
+
|
|
|
88
|
+ if (!window._yas || !window._yas.sendCustomInfo) {
|
|
|
89
|
+ return false;
|
|
|
90
|
+ }
|
67
|
|
91
|
|
68
|
// 商品单击埋点
|
92
|
// 商品单击埋点
|
69
|
- RECPOSE = $liDom.index() === 0 ? 100014 : 100015;
|
93
|
+ RECPOSE = that.ParentLiDom.index() !== 0 ? 100015 : 100014;
|
70
|
$('.plusstar-resources').bind('click', function(event) {
|
94
|
$('.plusstar-resources').bind('click', function(event) {
|
71
|
|
95
|
|
72
|
var $goodInfo = $(event.target).closest('.good-info'),
|
96
|
var $goodInfo = $(event.target).closest('.good-info'),
|
|
@@ -83,6 +107,36 @@ plusstar = { |
|
@@ -83,6 +107,36 @@ plusstar = { |
83
|
page_num: Math.ceil(index / that.common.pagesize)
|
107
|
page_num: Math.ceil(index / that.common.pagesize)
|
84
|
});
|
108
|
});
|
85
|
});
|
109
|
});
|
|
|
110
|
+
|
|
|
111
|
+ // 潮流优选首页加载时
|
|
|
112
|
+ window._yas.sendCustomInfo({
|
|
|
113
|
+ op: 'YB_FASHION_HOME_L',
|
|
|
114
|
+ param: JSON.stringify({
|
|
|
115
|
+ C_ID: CID,
|
|
|
116
|
+ TAB_ID: that.ParentLiDom.index() + 1
|
|
|
117
|
+ })
|
|
|
118
|
+ }, true);
|
|
|
119
|
+
|
|
|
120
|
+ // 头部banner楼层埋点
|
|
|
121
|
+ $('.plusstar-resources .banner-top').find('ul').bind('click', function(event) {
|
|
|
122
|
+ var $dom = $(event.target).closest('.li'),
|
|
|
123
|
+ index;
|
|
|
124
|
+
|
|
|
125
|
+ index = $dom.index() + 1;
|
|
|
126
|
+ window._yas.sendCustomInfo({
|
|
|
127
|
+ op: 'YB_FASHION_HOME_L',
|
|
|
128
|
+ param: JSON.stringify({
|
|
|
129
|
+ C_ID: CID,
|
|
|
130
|
+ TAB_ID: that.ParentLiDom.index() + 1,
|
|
|
131
|
+ F_ID: $(this).data('id'),
|
|
|
132
|
+ F_NAME: '焦点图',
|
|
|
133
|
+ F_URL: $dom.find('a').attr('href'),
|
|
|
134
|
+ F_INDEX: 1,
|
|
|
135
|
+ I_INDEX: index
|
|
|
136
|
+ })
|
|
|
137
|
+ }, true);
|
|
|
138
|
+ });
|
|
|
139
|
+
|
86
|
},
|
140
|
},
|
87
|
tabNav: function(code) {
|
141
|
tabNav: function(code) {
|
88
|
var that = this;
|
142
|
var that = this;
|
|
@@ -215,6 +269,9 @@ scrollFn = debounce(function() { |
|
@@ -215,6 +269,9 @@ scrollFn = debounce(function() { |
215
|
}, 200);
|
269
|
}, 200);
|
216
|
|
270
|
|
217
|
$(function() {
|
271
|
$(function() {
|
|
|
272
|
+ // 男:1,女:2,潮童:3,创意生活:4
|
|
|
273
|
+ CID = window._ChannelVary[window.cookie('_Channel')] || 1;
|
|
|
274
|
+
|
218
|
if (!(window.queryString.app_version || window.queryString.appVersion)) {
|
275
|
if (!(window.queryString.app_version || window.queryString.appVersion)) {
|
219
|
$('.tab-nav').css({
|
276
|
$('.tab-nav').css({
|
220
|
position: 'relative'
|
277
|
position: 'relative'
|
|
@@ -233,5 +290,4 @@ $(function() { |
|
@@ -233,5 +290,4 @@ $(function() { |
233
|
$(window).scroll(function() {
|
290
|
$(window).scroll(function() {
|
234
|
scrollFn();
|
291
|
scrollFn();
|
235
|
});
|
292
|
});
|
236
|
-
|
|
|
237
|
}); |
293
|
}); |