Authored by TaoHuang

hotfix(second): add report

... ... @@ -47,7 +47,7 @@ export default {
* 1.P_NAME:页面名称,UFOProductDetail_LIST;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id;
* 4.PRD_ID:商品id;
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
recommendYasParams: {
... ... @@ -95,7 +95,7 @@ export default {
* 1.P_NAME:页面名称,XY_UFOProductDetail;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id
* 4.PRD_ID:商品id
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
this.yasTargets[id] = {
... ... @@ -103,7 +103,7 @@ export default {
offsetTop: productElList[idx].offsetTop,
offsetHeight: productElList[idx].offsetHeight,
},
yasParams: {...this.recommendYasParams, I_INDEX: idx + 1, PRD_SKN: item.id},
yasParams: {...this.recommendYasParams, I_INDEX: idx + 1, PRD_ID: item.id},
};
}
});
... ...
... ... @@ -5,7 +5,7 @@
<div @click="onAllClick">全部 <i class="cubeic-arrow"></i></div>
</div>
<div class="row">
<div class="col" v-for="(product, idx) in viewList" :key="idx" @click="onItemClick(product)">
<div class="col" v-for="(product, idx) in viewList" :key="idx" @click="onItemClick(product, idx)">
<div class="product-item">
<square-img :src="product.default_images" :width="600" :height="600" />
</div>
... ... @@ -36,8 +36,8 @@ export default {
},
},
methods: {
onItemClick(item) {
this.$emit('itemClick', item);
onItemClick(item, index) {
this.$emit('itemClick', { product:item, index });
},
onAllClick() {
this.$emit('allClick');
... ...
... ... @@ -171,7 +171,7 @@ export default {
* 1.P_NAME:页面名称,XY_UFOProductDetail;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id;
* 4.PRD_ID:商品id;
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
recommendYasParams: {
... ... @@ -434,13 +434,13 @@ export default {
* 1.P_NAME:页面名称,XY_UFOProductDetail;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id
* 4.PRD_ID:商品id
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
this.topList.slice(0, 3).forEach((value, i) => {
this.yasTargets[`topList${i}`] = {
el: elInfo,
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_SKN: value.id, POS_ID: 1 },
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_ID: value.id, POS_ID: 1 },
};
});
}
... ... @@ -459,7 +459,7 @@ export default {
offsetTop: productElList[i].offsetTop,
offsetHeight: productElList[i].offsetHeight,
},
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_SKN: item.id },
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_ID: item.id },
};
}
});
... ... @@ -524,13 +524,31 @@ export default {
},
// 进入商品详情
gotoProduct(product) {
gotoProduct({product, index}) {
this.$router.push({
name: this.$route.name,
params: {
productId: product.id,
productInfo: product,
},
yasParams: {
P_NAME: 'XY_UFOProductDetail',
P_PARAM: this.productId,
POS_ID: 1,
}
}
});
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_PRD_LIST_C',
param: {
P_NAME: 'XY_UFOProductDetail',
P_PARAM: this.productId,
POS_ID: 1,
I_INDEX: index,
PRD_ID: product.id
}
}
});
},
... ...