Merge branch 'feature/tracking' into feature/context-and-tracking
Showing
3 changed files
with
15 additions
and
2 deletions
@@ -34,6 +34,7 @@ | @@ -34,6 +34,7 @@ | ||
34 | </style> | 34 | </style> |
35 | <script> | 35 | <script> |
36 | import $ from 'jquery'; | 36 | import $ from 'jquery'; |
37 | + import _ from 'lodash'; | ||
37 | import yoho from 'yoho'; | 38 | import yoho from 'yoho'; |
38 | import qs from 'yoho-qs/parse'; | 39 | import qs from 'yoho-qs/parse'; |
39 | import bus from 'common/vue-bus'; | 40 | import bus from 'common/vue-bus'; |
@@ -198,6 +199,13 @@ | @@ -198,6 +199,13 @@ | ||
198 | if (result.code === 200) { | 199 | if (result.code === 200) { |
199 | this.page = result.data.page; | 200 | this.page = result.data.page; |
200 | this.totalPage = result.data.pageTotal; | 201 | this.totalPage = result.data.pageTotal; |
202 | + | ||
203 | + // yas report param injection | ||
204 | + _.each(result.data.productList, item => { | ||
205 | + item.from_page_name = this.pageName; | ||
206 | + item.from_page_param = this.pageParam; | ||
207 | + }); | ||
208 | + | ||
201 | this.productList = this.productList.concat(result.data.productList); | 209 | this.productList = this.productList.concat(result.data.productList); |
202 | if (!this.filterConfig) { | 210 | if (!this.filterConfig) { |
203 | this.filterConfig = result.data.filter; | 211 | this.filterConfig = result.data.filter; |
@@ -46,13 +46,14 @@ export default { | @@ -46,13 +46,14 @@ export default { | ||
46 | this.$route.name; | 46 | this.$route.name; |
47 | } | 47 | } |
48 | 48 | ||
49 | + let from_page_param = Object.keys(this.$route.query).length ? this.$route.query : void 0; | ||
49 | if ((this.$yoho && this.$yoho.isYohoBuy) || this.yoho.env.isYohoBuy) { | 50 | if ((this.$yoho && this.$yoho.isYohoBuy) || this.yoho.env.isYohoBuy) { |
50 | let goParams = { | 51 | let goParams = { |
51 | action: 'go.productDetail', | 52 | action: 'go.productDetail', |
52 | params: { | 53 | params: { |
53 | product_skn: product_skn, | 54 | product_skn: product_skn, |
54 | from_page_name: from_page_name, | 55 | from_page_name: from_page_name, |
55 | - from_page_param: this.$route.query | 56 | + from_page_param |
56 | } | 57 | } |
57 | }; | 58 | }; |
58 | 59 |
@@ -33,7 +33,7 @@ export default { | @@ -33,7 +33,7 @@ export default { | ||
33 | } | 33 | } |
34 | }, | 34 | }, |
35 | ['yoho.visible'](visible) { | 35 | ['yoho.visible'](visible) { |
36 | - if (visible && this.$yoho && this.$yoho.isiOS) { | 36 | + if (visible && this.$yoho) { |
37 | this.checkReport(void 0, true); | 37 | this.checkReport(void 0, true); |
38 | } | 38 | } |
39 | } | 39 | } |
@@ -93,6 +93,10 @@ export default { | @@ -93,6 +93,10 @@ export default { | ||
93 | }); | 93 | }); |
94 | }, | 94 | }, |
95 | record(component, index, isInit) { | 95 | record(component, index, isInit) { |
96 | + if (isInit) { | ||
97 | + this.componentStatus = {}; | ||
98 | + } | ||
99 | + | ||
96 | const reportData = _.get(component, '$options.propsData.value'); | 100 | const reportData = _.get(component, '$options.propsData.value'); |
97 | 101 | ||
98 | // 区分不通组件记录以楼层内item为单位、而不是以整个楼层为单位组织数据上报 | 102 | // 区分不通组件记录以楼层内item为单位、而不是以整个楼层为单位组织数据上报 |
-
Please register or login to post a comment