...
|
...
|
@@ -28,7 +28,7 @@ |
|
|
v-for="(item, index) in itemSub.sub"
|
|
|
:key="index"
|
|
|
:data-id="item.id"
|
|
|
ref="index">
|
|
|
:ref="index">
|
|
|
<LayoutLink :href="item.url" >
|
|
|
<div class="item-imge-div" @click="goProductList(item,index, itemSub)">
|
|
|
<ImgSize
|
...
|
...
|
@@ -76,13 +76,15 @@ export default { |
|
|
}
|
|
|
};
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
},
|
|
|
async activated(){
|
|
|
await this.fetchCategoryParentList();
|
|
|
await this.fetchBrandList({});
|
|
|
Promise.all([this.fetchBrandList({}),this.fetchCategoryParentList()]).then(()=> {
|
|
|
this.reportYas(0);
|
|
|
})
|
|
|
},
|
|
|
// activated(){
|
|
|
// this.reportYas(0);
|
|
|
// },
|
|
|
methods: {
|
|
|
...mapActions(['fetchCategoryParentList', 'selectCategoryParent', 'fetchBrandList', 'fetchCategorySubList']),
|
|
|
onScrollEndHandler({y}) {
|
...
|
...
|
@@ -95,8 +97,8 @@ export default { |
|
|
this.categorySubList.forEach((item) => {
|
|
|
let subItemList = item.sub;
|
|
|
subItemList.forEach((val, index) => {
|
|
|
let eleTop = this.$refs.index[index].offsetTop;
|
|
|
let eleHeight = this.$refs.index[index].offsetHeight;
|
|
|
let eleTop = this.$refs[index][0].offsetTop;
|
|
|
let eleHeight = this.$refs[index][0].offsetHeight;
|
|
|
// console.log(eleHeight+'item'+scrollY)
|
|
|
let firstHeight = 0;
|
|
|
if(scrollY > eleHeight){
|
...
|
...
|
|