...
|
...
|
@@ -91,21 +91,38 @@ |
|
|
this.$parent.$refs.filter.isVisible = !this.$parent.$refs.filter.isVisible;
|
|
|
},
|
|
|
changeTopStatus() {
|
|
|
let topChange = true;
|
|
|
let topHeight = document.body.scrollTop;
|
|
|
let ghost = true;
|
|
|
let ghost2 = false;
|
|
|
let ghost3 = false;
|
|
|
|
|
|
if (topHeight > 100) {
|
|
|
topChange = false;
|
|
|
if (window.scrollY > 100) {
|
|
|
ghost = false;
|
|
|
ghost2 = false;
|
|
|
ghost3 = false;
|
|
|
} else if (window.scrollY > 70) {
|
|
|
ghost = false;
|
|
|
ghost3 = true;
|
|
|
} else if (window.scrollY > 30) {
|
|
|
ghost = false;
|
|
|
ghost2 = true;
|
|
|
}
|
|
|
|
|
|
this.$refs.header.$el.classList.toggle('ghost', topChange);
|
|
|
this.$refs.header.$el.classList.toggle('ghost', ghost);
|
|
|
this.$refs.header.$el.classList.toggle('ghost-2', ghost2);
|
|
|
this.$refs.header.$el.classList.toggle('ghost-3', ghost3);
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.domain = this.shareData.domain;
|
|
|
|
|
|
if (this.shareData.isBlkShop) {
|
|
|
window.onscroll = this.changeTopStatus;
|
|
|
window.addEventListener('touchmove', () => {
|
|
|
this.changeTopStatus();
|
|
|
});
|
|
|
|
|
|
window.addEventListener('scroll', () => {
|
|
|
this.changeTopStatus();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|