Authored by 陈轩

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

... ... @@ -119,7 +119,7 @@ if (isProduction) {
api: 'http://api-test1.yohops.com:9999/',
service: 'http://service-test1.yohops.com:9999/',
singleApi: 'http://192.168.102.27:8092/'
singleApi: 'http://api-test1.yohops.com:9999/'
},
memcache: {
master: ['127.0.0.1:12111'],
... ...
... ... @@ -170,7 +170,7 @@ gulp.task('img', () => {
// copy font
gulp.task('font', () => {
return gulp.src('font/*')
return gulp.src('font/**/*')
.pipe(gulp.dest(dist.font));
});
... ...
... ... @@ -21,10 +21,10 @@
module.exports = {
props: {
'title': String,
'class': [String, Object, Array],
'fixed': Boolean,
'scrollFix': Boolean
title: String,
class: [String, Object, Array],
fixed: Boolean,
scrollFix: Boolean
},
methods: {
goBack() {
... ... @@ -36,15 +36,40 @@
<style>
.blk-header-wrap.ghost {
.blk-header {
background-color: transparent;
background-color: rgba(255, 255, 255, 0);
transition: 0.3s all;
border-bottom: 0;
}
.blk-header-title {
visibility: hidden;
opacity: 0;
}
}
.blk-header-wrap.ghost-2 {
.blk-header {
background-color: rgba(255, 255, 255, 0.4);
transition: 0.3s all;
border-bottom: 0;
}
.blk-header-title {
opacity: 0.3;
}
}
.blk-header-wrap.ghost-3 {
.blk-header {
background-color: rgba(255, 255, 255, 0.7);
transition: 0.3s all;
border-bottom: 0;
}
.blk-header-title {
opacity: 0.7;
}
}
.blk-header {
box-sizing: content-box;
position: fixed;
... ...
... ... @@ -134,6 +134,27 @@
}, 200);
});
return false;
},
toggle() {
let ghost = true;
let ghost2 = false;
let ghost3 = false;
if (window.scrollY > 40) {
ghost = false;
ghost2 = false;
ghost3 = false;
} else if (window.scrollY > 25) {
ghost = false;
ghost3 = true;
} else if (window.scrollY > 10) {
ghost = false;
ghost2 = true;
}
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);
}
},
ready() {
... ... @@ -144,14 +165,12 @@
return false;
});
window.addEventListener('scroll', () => {
let transparent = true;
if (window.scrollY > 20) {
transparent = false;
}
window.addEventListener('touchmove', () => {
this.toggle();
});
this.$refs.header.$el.classList.toggle('ghost', transparent);
window.addEventListener('scroll', () => {
this.toggle();
});
document.addEventListener('visibilitychange', () => {
... ...