Authored by ccbikai

Merge branch 'develop'

... ... @@ -13,23 +13,15 @@
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
html {
height: 100%;
width: 100%;
overflow: hidden;
body {
width: 100%;
height: 100%;
overflow-y: scroll;
font-size: 24px;
font-family: "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
line-height: 1.4;
}
html,
body {
font-size: 24px;
font-family: "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
line-height: 1.4;
}
/* stylelint-disable */
.app::-webkit-scrollbar {
::-webkit-scrollbar {
display: none;
}
/* stylelint-enable */
... ...
... ... @@ -17,6 +17,10 @@
.resources {
margin-top: 100px;
.recommend-content-five a {
height: 186px;
}
}
</style>
<script>
... ...
... ... @@ -140,16 +140,14 @@
let ghost2 = false;
let ghost3 = false;
let myHeaderTop = $('.my-header').offset().top;
if (myHeaderTop < -40) {
if (window.scrollY > 40) {
ghost = false;
ghost2 = false;
ghost3 = false;
} else if (myHeaderTop < -25) {
} else if (window.scrollY > 25) {
ghost = false;
ghost3 = true;
} else if (myHeaderTop < -10) {
} else if (window.scrollY > 10) {
ghost = false;
ghost2 = true;
}
... ... @@ -167,17 +165,15 @@
return false;
});
let body = $('body');
body.on('touchmove', () => {
window.addEventListener('touchmove', () => {
this.toggle();
});
body.on('scroll', () => {
window.addEventListener('scroll', () => {
this.toggle();
});
body.on('visibilitychange', () => {
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.reload();
}
... ...
... ... @@ -19,7 +19,6 @@
<script>
const yoho = require('yoho');
const cheader = require('component/header.vue');
const $ = require('jquery');
module.exports = {
data() {
... ... @@ -46,15 +45,15 @@
},
created() {
$('body').on('scroll', () => {
window.onscroll = () => {
let transparent = true;
if ($('.image-carousel').offset().top < -20) {
if (window.scrollY > 20) {
transparent = false;
}
this.$refs.header.$el.classList.toggle('ghost', transparent);
});
};
}
};
</script>
... ...
... ... @@ -86,9 +86,9 @@
},
changeTopStatus() {
let topChange = true;
let topHeight = $('.brand-top-box').offset().top;
let topHeight = document.body.scrollTop;
if (topHeight < -200) {
if (topHeight > 100) {
topChange = false;
}
... ... @@ -99,7 +99,7 @@
this.domain = this.shareData.domain;
if (this.shareData.isBlkShop) {
$('body').on('scroll', this.changeTopStatus);
window.onscroll = this.changeTopStatus;
}
}
};
... ...