Authored by 李奇

Merge branch 'feature/tracking' into feature/context-and-tracking

@@ -85,12 +85,13 @@ function GoodHrefBinding(el, binding) { @@ -85,12 +85,13 @@ function GoodHrefBinding(el, binding) {
85 } 85 }
86 let href = `/product/pro_${product_id}_${goods_id}/${cn_alphabet || 'item'}.html`; 86 let href = `/product/pro_${product_id}_${goods_id}/${cn_alphabet || 'item'}.html`;
87 87
  88 + const prefix = yoho.isiOS ? 'i' : (yoho.isAndroid ? 'a' : '');
88 if (yoho.isYohoBuy) { 89 if (yoho.isYohoBuy) {
89 let goParams = { 90 let goParams = {
90 action: 'go.productDetail', 91 action: 'go.productDetail',
91 params: { 92 params: {
92 product_skn: product_skn, 93 product_skn: product_skn,
93 - from_page_name, 94 + from_page_name: `${prefix}${from_page_name}`,
94 from_page_param 95 from_page_param
95 } 96 }
96 }; 97 };
@@ -32,12 +32,26 @@ export default { @@ -32,12 +32,26 @@ export default {
32 let {product_skn} = product; 32 let {product_skn} = product;
33 let href = `/product/pro_${product_skn}.html`; 33 let href = `/product/pro_${product_skn}.html`;
34 34
  35 + const pageNameMap = {
  36 + 'channel.home': 'FP_BLK_Home_h5',
  37 + 'channel.channelHome.channelMen': 'FP_BLK_MenHome_h5',
  38 + 'channel.channelHome.channelWomen': 'FP_BLK_WomenHome_h5'
  39 + };
  40 +
  41 + let from_page_name = this.$route.name;
  42 +
  43 + if (this.yoho) {
  44 + const prefix = this.yoho.env.isiOS ? 'i' : (this.yoho.env.isAndroid ? 'a' : '');
  45 + from_page_name = pageNameMap[this.$route.name] ? `${prefix}${pageNameMap[this.$route.name]}` :
  46 + this.$route.name;
  47 + }
  48 +
35 if ((this.$yoho && this.$yoho.isYohoBuy) || this.yoho.env.isYohoBuy) { 49 if ((this.$yoho && this.$yoho.isYohoBuy) || this.yoho.env.isYohoBuy) {
36 let goParams = { 50 let goParams = {
37 action: 'go.productDetail', 51 action: 'go.productDetail',
38 params: { 52 params: {
39 product_skn: product_skn, 53 product_skn: product_skn,
40 - from_page_name: this.$route.name, 54 + from_page_name: from_page_name,
41 from_page_param: this.$route.query 55 from_page_param: this.$route.query
42 } 56 }
43 }; 57 };
@@ -66,7 +66,7 @@ export default { @@ -66,7 +66,7 @@ export default {
66 methods: { 66 methods: {
67 report(param) { 67 report(param) {
68 68
69 - const prefix = this.yoho.isiOS ? 'i' : (this.yoho.isAndroid ? 'a' : ''); 69 + const prefix = this.yoho.env.isiOS ? 'i' : (this.yoho.env.isAndroid ? 'a' : '');
70 _.each(param, item => { 70 _.each(param, item => {
71 if (this.pageNameMap[item.P_NAME]) { 71 if (this.pageNameMap[item.P_NAME]) {
72 item.P_NAME = this.pageNameMap[item.P_NAME]; 72 item.P_NAME = this.pageNameMap[item.P_NAME];