Authored by 张文文

添加二手筛选埋点 review by lea.guo

... ... @@ -322,7 +322,7 @@ export default {
this.$store.dispatch('reportYas', {
params: {
param,
appop: 'XY_UFO_SECONDHAND_LIST_SCREEN_C'
appop: 'XY_UFO_PRD_LIST_SCREEN_C'
}
});
}
... ...
... ... @@ -113,9 +113,10 @@ export default {
},
yasDetail({ item, index }) {
const prdType = item.pre_sale_flag === 5 ? 2 : 1;
this.$store.dispatch('reportYas', {
params: {
param: { ...this.yasParams, I_INDEX: index + 1, PRD_ID: item.product_id, PRD_SKUP: item.skup },
param: { ...this.yasParams, I_INDEX: index + 1, PRD_ID: item.product_id, PRD_SKUP: item.skup, PRD_TYPE: prdType },
appop: this.yasEventName
}
});
... ...
... ... @@ -79,13 +79,7 @@ export default {
isFetch: true,
scrollY: 0,
isShowEmpty: false,
yasParams: {
P_NAME: 'XY_UFOSecondList',
TYPE_ID: 5,
TAB_ID: '',
TAB_NAME: '',
P_PARAM: [].toString()
},
yasParams: { P_NAME: 'XY_UFOSecondList', TYPE_ID: 5, P_PARAM: [].toString() },
selectedType: 2, // tab类型高亮,1价格,2推荐
priceDesc: true,
... ... @@ -248,7 +242,7 @@ export default {
this.$refs.scroll.scrollTo(0, 0, 300);
},
// 点击Tab, 1:价格,2:默认
// 点击Tab, 1:价格,2:推荐
async pressType(flag) {
if (flag === this.selectedType && flag !== 1) {
return;
... ... @@ -270,9 +264,11 @@ export default {
}
if (flag === 1) {
this.setYasParam({tab: {index: 2, name: '价格'}});
this.priceDesc = !this.priceDesc;
params.order = this.priceDesc ? 'price:asc' : 'price:desc';
} else if (flag === 2) {
this.setYasParam({tab: {index: 5, name: '推荐'}});
this.priceDesc = true;
params.order = 'id:desc';
}
... ... @@ -282,6 +278,8 @@ export default {
params.isReset = true;
await this.fetchList(params);
this.yasTab();
this.$refs.scroll.scrollTo(0, 0, 300);
this.yasShowPage();
},
... ... @@ -426,6 +424,7 @@ export default {
},
goFilter() {
this.yasTab(true);
this.$refs.filtrate.show();
this.$refs.filtrate.setFilterParam(this.seletedFilterParams);
this.$refs.filtrate.setTempParam(this.selectedFilterNameParams);
... ... @@ -449,6 +448,27 @@ export default {
}
});
},
setYasParam: function({tab}) {
if (tab && typeof tab === 'object' && Object.keys(tab).length) {
this.yasParams.TAB_ID = tab.index;
this.yasParams.TAB_NAME = tab.name;
}
},
yasTab(isFilter = false) {
let param = {...this.yasParams};
if (isFilter) {
param.TAB_ID = 4;
param.TAB_NAME = '筛选';
}
this.$store.dispatch('reportYas', {
params: {
param,
appop: 'XY_UFO_PRD_LIST_TAB_C'
}
});
}
},
beforeRouteLeave (to, from, next) {
this.isFetch = to.name !== 'SecondProductDetail'
... ... @@ -476,6 +496,8 @@ export default {
}
this.filterParams = filterParams;
this.setYasParam({tab: {index: 5, name: '推荐'}});
} else {
this.scrollY && this.$refs.scroll.scrollTo(this.scrollY);
}
... ...