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