Authored by TaoHuang

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -16,21 +16,10 @@ export default {
},
watch: {
'report': function(newVal) {
// console.log(newVal);
},
},
// activated() {
// console.log(this.report);
// console.log("this.report");
// },
methods: {
jumpTo() {
this.$store.dispatch('reportYas', {
params: {
appop: this.reportEvent,
param:this.report
}
});
if (!this.href) {
return;
... ... @@ -39,6 +28,13 @@ export default {
this.$xianyu.goXianyuNewPage({
url: this.href
});
this.$store.dispatch('reportYas', {
params: {
appop: this.reportEvent,
param:this.report
}
});
}
}
};
... ...
... ... @@ -138,6 +138,12 @@ export default {
this.sortItem = item;
let id = item.id;
let name = item.name;
let subList ;
if (id === '-1') {
subList = this.fetchBrandList({ id });
} else {
subList = this.fetchCategorySubList({ id, name });
}
this.$store.dispatch('reportYas', {
params: {
... ... @@ -148,13 +154,7 @@ export default {
}
}
});
this.reportYas(scrollHeight);
let subList ;
if (id === '-1') {
subList = this.fetchBrandList({ id });
} else {
subList = this.fetchCategorySubList({ id, name });
}
this.reportYas(0);
}
},
goProductList(item, index, itemSub) {
... ... @@ -175,33 +175,6 @@ export default {
}
});
},
reportPaser(subList) {
// console.log('reportPaser')
// console.log(...subList);
if(subList && subList.length > 0){
let reportSub = [];
subList.forEach((val, index) => {
val.su
let reportItem = {
CATE_ID: this.sortItem.id || '',
CATE_NM: this.sortItem.name || '',
CATE_INDEX: this.sortItem.index || '',
F_ID: index,
F_NAME: val.name,
F_INDEX: index,
I_INDEX: index,
TO_TYPE: 'brand',
TO_ID: val.id,
}
reportSub.push(subItem);
});
}
}
},
computed: {
...mapState(['categoryParent', 'categorySubList']),
... ...
... ... @@ -112,18 +112,24 @@ export default {
computed: {
...mapState(['channelList']),
navList() {
this.$nextTick(() => {
this.refreshProductList(this.active);
});
return get(find(this.channelList.list, ['template_name', 'guessLike']), 'data') || [];
}
},
watch: {
'channelList.list': function() {
this.init();
},
navList() {
this.$nextTick(() => {
this.refreshProductList(this.active);
});
}
},
activated() {
if (!this.channelList.list || !this.channelList.list.length) {
this.fetchChannelList();
}
this.init();
this.PAGE_URL = window.location.href;
// 首页进入上报
this.$store.dispatch('reportYas', {
... ... @@ -132,14 +138,13 @@ export default {
appop: 'XY_UFO_MAIN_START'
}
});
if (!this.channelList.list || !this.channelList.list.length) {
this.fetchChannelList();
}
this.init();
},
async serverPrefetch() {
return this.fetchChannelList();
},
mounted() {
this.refreshProductList(this.active);
},
methods: {
...mapActions(['fetchChannelList']),
...mapActionsList(['fetchProductList']),
... ... @@ -195,7 +200,7 @@ export default {
},
reportYas(scrollY) {
this.getReportEle(scrollY)
console.log(this.homeYasParams)
// console.log(this.homeYasParams)
this.$store.dispatch('reportYas', {
params: {
param: this.homeYasParams,
... ... @@ -205,7 +210,7 @@ export default {
},
setYasParam: function(params) {
let {total, list} = this.productList;
if (params && typeof params === 'object' && Object.keys(params).length) {
let P_NAME = 'XY_UFOSearchList', TYPE_ID = 1, P_PARAM = '', PRD_LIST = [];
for (let item of list) {
... ... @@ -276,7 +281,7 @@ export default {
// this.$refs.scroll.forceUpdate();
// return;
// }
await this.fetchList(this.selectedCategory);
this.$refs.scroll.forceUpdate();
},
... ... @@ -455,7 +460,7 @@ export default {
position: relative;
z-index: 1;
}
.channel-no-item {
padding-top: 200px;
}
... ...
... ... @@ -183,8 +183,7 @@ export default {
list.list && list.list.length ? list.isEmpty = false : list.isEmpty = true;
this.productList =Object.freeze(list);
this.productList = list;
}
},
... ...