...
|
...
|
@@ -59,6 +59,7 @@ export default { |
|
|
PAGE_URL: '',
|
|
|
listYasParams: {},
|
|
|
homeYasParams: [],
|
|
|
guessLikeId: 0,
|
|
|
listScrollY: 0,
|
|
|
options: {
|
|
|
pullUpLoad: true,
|
...
|
...
|
@@ -80,7 +81,7 @@ export default { |
|
|
isFetching: false,
|
|
|
error: null,
|
|
|
page: 0, // 当前页
|
|
|
page_size: 10, // 每页数量
|
|
|
page_size: 20, // 每页数量
|
|
|
page_total: 0, // 总共多少页
|
|
|
total: 0, // 总共多少条
|
|
|
endReached: false, // 到达底部
|
...
|
...
|
@@ -162,6 +163,13 @@ export default { |
|
|
appop: 'XY_UFO_MAIN_START'
|
|
|
}
|
|
|
});
|
|
|
// 初始化 选中类目
|
|
|
const [firstNav] = this.navList;
|
|
|
if(firstNav) {
|
|
|
const {url = ''} = firstNav;
|
|
|
this.selectedCategory = queryString.parse(url);
|
|
|
}
|
|
|
|
|
|
this.refreshProductList(this.active);
|
|
|
},
|
|
|
methods: {
|
...
|
...
|
@@ -238,11 +246,26 @@ export default { |
|
|
// console.log(this.homeYasParams)
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
param: this.homeYasParams,
|
|
|
param: {DATA:this.homeYasParams},
|
|
|
appop: 'XY_UFO_SHOW_EVENT'
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
reportTabYas() {
|
|
|
let guessLikeTabParams = this.listYasParams;
|
|
|
delete guessLikeTabParams.I_INDEX;
|
|
|
// 防止重复上报
|
|
|
if(this.guessLikeId !== guessLikeTabParams.TAB_ID) {
|
|
|
this.guessLikeId = guessLikeTabParams.TAB_ID
|
|
|
console.log('guesslisttab',guessLikeTabParams)
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
param: guessLikeTabParams,
|
|
|
appop: 'XY_UFO_MAIN_EVENT'
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
async guessLikeListParams(params) {
|
|
|
if (params && typeof params === 'object' && Object.keys(params).length) {
|
|
|
this.listYasParams = Object.assign({}, {
|
...
|
...
|
@@ -259,8 +282,9 @@ export default { |
|
|
this.selectedCategory = params;
|
|
|
this.active = Number(index);
|
|
|
this.isShow && this.$refs.scroll.scrollTo(this.navTop);
|
|
|
// this.setYasParam({index, ...params});
|
|
|
await this.guessLikeListParams({index, ...params});
|
|
|
// tab点击
|
|
|
this.reportTabYas()
|
|
|
// 商品列表曝光
|
|
|
this.productList.list.length > 0 && this.listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.yasHeight);
|
|
|
},
|
...
|
...
|
@@ -294,7 +318,6 @@ export default { |
|
|
await this.fetchList(this.searchParams);
|
|
|
|
|
|
// 列表上报数据
|
|
|
// this.setYasParam({index: 0, ...this.searchParams});
|
|
|
this.guessLikeListParams({index: 0, ...this.searchParams});
|
|
|
},
|
|
|
|
...
|
...
|
|