Authored by 李奇

fixed:跳转商品详情时空参数排除

@@ -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