Showing
4 changed files
with
45 additions
and
4 deletions
@@ -41,13 +41,13 @@ Component({ | @@ -41,13 +41,13 @@ Component({ | ||
41 | floor_item_index | 41 | floor_item_index |
42 | } = e.currentTarget.dataset; | 42 | } = e.currentTarget.dataset; |
43 | 43 | ||
44 | - this.triggerEvent('clickreport', { | 44 | + let repParams = { |
45 | F_ID: floor_id, | 45 | F_ID: floor_id, |
46 | F_NAME: floor_name, | 46 | F_NAME: floor_name, |
47 | F_URL: floor_url, | 47 | F_URL: floor_url, |
48 | F_INDEX: floor_index, | 48 | F_INDEX: floor_index, |
49 | I_INDEX: floor_item_index | 49 | I_INDEX: floor_item_index |
50 | - }); | 50 | + }; |
51 | 51 | ||
52 | // 店铺装修楼层URL规则解析 | 52 | // 店铺装修楼层URL规则解析 |
53 | if (this.data.urlRule === 'shopDecor') { | 53 | if (this.data.urlRule === 'shopDecor') { |
@@ -85,9 +85,14 @@ Component({ | @@ -85,9 +85,14 @@ Component({ | ||
85 | break; | 85 | break; |
86 | } | 86 | } |
87 | } | 87 | } |
88 | + | ||
89 | + repParams.F_URL = url; | ||
90 | + this.triggerEvent('clickreport', repParams); | ||
88 | return global.router.go(url, params); | 91 | return global.router.go(url, params); |
89 | } | 92 | } |
90 | 93 | ||
94 | + repParams.F_URL = this.data.url; | ||
95 | + this.triggerEvent('clickreport', repParams); | ||
91 | return global.router.goUrl(this.data.url); | 96 | return global.router.goUrl(this.data.url); |
92 | } | 97 | } |
93 | } | 98 | } |
@@ -7,6 +7,20 @@ Component({ | @@ -7,6 +7,20 @@ Component({ | ||
7 | properties: { | 7 | properties: { |
8 | type: Object, | 8 | type: Object, |
9 | value: {} | 9 | value: {} |
10 | + }, | ||
11 | + | ||
12 | + // use for floors' click report | ||
13 | + floorId: { | ||
14 | + type: String, | ||
15 | + value: '' | ||
16 | + }, | ||
17 | + floorName: { | ||
18 | + type: String, | ||
19 | + value: '' | ||
20 | + }, | ||
21 | + floorIndex: { | ||
22 | + type: String, // start from 1 | ||
23 | + value: '' | ||
10 | } | 24 | } |
11 | }, | 25 | }, |
12 | methods: { | 26 | methods: { |
@@ -34,6 +34,9 @@ Page({ | @@ -34,6 +34,9 @@ Page({ | ||
34 | yas = new Yas(app); | 34 | yas = new Yas(app); |
35 | }, | 35 | }, |
36 | onShow: function() { | 36 | onShow: function() { |
37 | + yas.pageOpenReport(); | ||
38 | + yas.report('YB_MAIN_TAB_C', {TAB_ID: 1}); | ||
39 | + | ||
37 | const shopId = app.getShopId(); | 40 | const shopId = app.getShopId(); |
38 | 41 | ||
39 | wx.setNavigationBarTitle({ | 42 | wx.setNavigationBarTitle({ |
@@ -81,13 +84,31 @@ Page({ | @@ -81,13 +84,31 @@ Page({ | ||
81 | }, | 84 | }, |
82 | 85 | ||
83 | toSearch() { | 86 | toSearch() { |
87 | + yas.report('YB_SEARCH_C', {SEARCH_POS: 1}); | ||
84 | router.go('productSearch'); | 88 | router.go('productSearch'); |
85 | }, | 89 | }, |
86 | 90 | ||
87 | - resourceClickReport: function(e) { | 91 | + decorFloorReport: function(e) { |
88 | yas.report('YB_MAIN_EVENT', e.detail); | 92 | yas.report('YB_MAIN_EVENT', e.detail); |
89 | }, | 93 | }, |
90 | 94 | ||
95 | + // 商品点击 | ||
96 | + productReport: function(params) { | ||
97 | + const gender = this.data.gender; | ||
98 | + | ||
99 | + const repParams = { | ||
100 | + F_ID: '20180718', | ||
101 | + F_NAME: 'shopGoods', | ||
102 | + F_URL: `/pages/goodsDetail/goodsDetail?fromPage=home&productSkn=${params.detail.productSkn}`, | ||
103 | + F_INDEX: this.data.decorFloors.length, | ||
104 | + I_INDEX: params.detail.idx + '', | ||
105 | + TAB_ID: this.data.order, | ||
106 | + GENDER: gender ? (gender === '1,3' ? '1' : '2') : '0' // eslint-disable-line | ||
107 | + }; | ||
108 | + | ||
109 | + yas.report('YB_MAIN_EVENT', repParams); | ||
110 | + }, | ||
111 | + | ||
91 | recordHeight: function() { | 112 | recordHeight: function() { |
92 | const query = wx.createSelectorQuery(); | 113 | const query = wx.createSelectorQuery(); |
93 | 114 |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <resources | 17 | <resources |
18 | floors="{{decorFloors}}" | 18 | floors="{{decorFloors}}" |
19 | floor-index="1" | 19 | floor-index="1" |
20 | - bindclickreport="resourceClickReport"> | 20 | + bindclickreport="decorFloorReport"> |
21 | </resources> | 21 | </resources> |
22 | <view class="product-list"> | 22 | <view class="product-list"> |
23 | <view class="header-filter {{floatFilter ? 'float' : ''}}"> | 23 | <view class="header-filter {{floatFilter ? 'float' : ''}}"> |
@@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
28 | <view class="filter-stand-in" hidden="{{!floatFilter}}"></view> | 28 | <view class="filter-stand-in" hidden="{{!floatFilter}}"></view> |
29 | <view class="list"> | 29 | <view class="list"> |
30 | <product-list | 30 | <product-list |
31 | + bindproductclick="productReport" | ||
31 | list="{{shopProductList}}" | 32 | list="{{shopProductList}}" |
32 | show-no-more="{{allLoaded}}" | 33 | show-no-more="{{allLoaded}}" |
33 | show-loading="{{showLoading}}"> | 34 | show-loading="{{showLoading}}"> |
-
Please register or login to post a comment