Authored by huangyCode

禁用刷新添加上报

... ... @@ -21,7 +21,7 @@ import ImgSize from '../../../components/img-size';
export default {
props: {
list: Array,
param: Object,
yasParams: Object,
},
data: function() {
return {
... ... @@ -30,7 +30,9 @@ export default {
},
methods: {
goDetail(product, index) {
this.yasDetail(product.id,index);
if (Object.keys(this.yasParams).length) {
this.yasDetail(product.id, index);
}
this.$router.push({
name: 'ProductDetail',
params: {
... ... @@ -74,9 +76,8 @@ export default {
let DATA = [];
list.map((value, i) => {
DATA.push({...this.param, I_INDEX: i + index, PRD_ID: value.id});
DATA.push({...this.yasParams, I_INDEX: i + index, PRD_ID: value.id});
});
console.log(DATA)
this.$store.dispatch('reportYas', {
params: {
param: {DATA},
... ... @@ -95,11 +96,10 @@ export default {
// 5.TAB_NAME:tab切名称,人气,价格,新品;
// 6.I_INDEX:商品顺序号,从1开始递增;
// 7.PRD_ID:商品id
console.log({...this.param, I_INDEX: index, PRD_ID: id })
this.$store.dispatch('reportYas', {
params: {
param: {...this.param, I_INDEX: index, PRD_ID: id },
appop: 'XY_UFO_SHOW_EVENT'
param: {...this.yasParams, I_INDEX: index, PRD_ID: id },
appop: 'XY_UFO_PRD_LIST_C'
}
});
}
... ...
... ... @@ -24,7 +24,7 @@
:data="productList.list"
@scroll-end="scrollHandler"
@pulling-up="onPullingUp">
<ProductList ref="product" :list="productList.list" :param="yasParams"></ProductList>
<ProductList ref="product" :list="productList.list" :yasParams="yasParams"></ProductList>
</Scroll>
<EmptyList class="empty-wrapper product-list" :tip="`暂无数据`" v-show="productList.isEmpty">
</EmptyList>
... ... @@ -50,7 +50,7 @@ export default {
Filtrate,
EmptyList
},
data: function () {
data: function() {
return {
scrollOptions: {
bounce: {
... ... @@ -94,7 +94,7 @@ export default {
},
};
},
activated: function() {
activated: async function() {
if (this.yoho.direction === 'forword') {
this.$refs.filtrate.hide();
Object.assign(this.$data, this.$options.data());
... ... @@ -110,7 +110,8 @@ export default {
this.title = '商品列表';
}
!params.order && (params.order = 'sale_desc');
this.fetchList({...params, isReset: true});
await this.fetchList({...params, isReset: true});
this.yasShowPage();
},
computed: {
... ... @@ -186,7 +187,7 @@ export default {
},
// 点击tab flag, 0: 推荐, 1: 价格, 2: 人气, 3: 新品
pressType(flag) {
async pressType(flag) {
if (flag === this.selectedType && flag !== 1) {
return;
}
... ... @@ -214,9 +215,11 @@ export default {
params.order = 'st_desc';
}
params.isReset = true;
this.fetchList(params);
await this.fetchList(params);
this.$refs.scroll.scrollTo(0, 0, 300);
this.changeArrow();
this.yasShowPage();
this.yasTab();
},
goSearch() {
this.$router.push({
... ... @@ -260,12 +263,34 @@ export default {
});
}
if(tab && typeof tab === 'object' && Object.keys(tab).length) {
if (tab && typeof tab === 'object' && Object.keys(tab).length) {
this.yasParams.TAB_ID = tab.index;
this.yasParams.TAB_NAME = tab.name;
}
},
yasShowPage() {
let {total, list} = this.productList;
let PRD_LIST = [];
for (let item of list) {
PRD_LIST.push(item.id);
}
PRD_LIST = PRD_LIST.toString();
this.$store.dispatch('reportYas', {
params: {
param: {...this.yasParams, TOTAL: total, PRD_LIST},
appop: 'XY_UFO_PRD_LIST_L'
}
});
},
yasTab() {
this.$store.dispatch('reportYas', {
params: {
param: {...this.yasParams},
appop: 'XY_UFO_PRD_LIST_TAB_C'
}
});
}
}
};
</script>
... ...