...
|
...
|
@@ -27,7 +27,7 @@ |
|
|
<ProductGroup :data="recomendProduct" model="2"></ProductGroup>
|
|
|
</div>
|
|
|
|
|
|
<LayoutTitle class="rec-article-title">{{listTitle}}</LayoutTitle>
|
|
|
<LayoutTitle v-if="listTitle" class="rec-article-title">{{listTitle}}</LayoutTitle>
|
|
|
</div>
|
|
|
<ArticleDetailFooter class="detail-fixed-footer" v-bind="footerData" @on-comment-click="onComment">
|
|
|
<template v-slot:after>
|
...
|
...
|
@@ -54,7 +54,7 @@ import ArticleItemHeader from '../article/article-item-header'; |
|
|
import ArticleItemTopics from '../article/article-item-topics';
|
|
|
import ArticleDetailFooter from './article-footer';
|
|
|
import ArticleDetailHeader from './article-header';
|
|
|
import {mapState} from 'vuex';
|
|
|
import {mapState, mapMutations} from 'vuex';
|
|
|
|
|
|
export default {
|
|
|
name: 'ArticleDetailLong',
|
...
|
...
|
@@ -67,7 +67,7 @@ export default { |
|
|
},
|
|
|
listTitle: String,
|
|
|
scrollTop: Number,
|
|
|
share: Boolean,
|
|
|
share: Boolean
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
...
|
...
|
@@ -131,7 +131,12 @@ export default { |
|
|
} else if (this.scrollTop > 0) {
|
|
|
let step = Math.round(this.scrollTop - 10 / (this.coverHeight - 10) * 100);
|
|
|
|
|
|
return Math.max(Math.min(step, 100), 0);
|
|
|
step = Math.max(Math.min(step, 100), 0);
|
|
|
this.SET_STATUS_BAR_COLOR({
|
|
|
color: step > 55 ? 'black' : 'white'
|
|
|
});
|
|
|
|
|
|
return step;
|
|
|
} else {
|
|
|
return 0;
|
|
|
}
|
...
|
...
|
@@ -143,7 +148,7 @@ export default { |
|
|
if (this.$refs && this.$refs.header) {
|
|
|
scrollTop += this.$refs.header.$el.offsetHeight;
|
|
|
}
|
|
|
console.log(scrollTop, top, height)
|
|
|
|
|
|
if (top && height) {
|
|
|
if (scrollTop >= top + height) {
|
|
|
return 100;
|
...
|
...
|
@@ -191,6 +196,7 @@ console.log(scrollTop, top, height) |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(['SET_STATUS_BAR_COLOR']),
|
|
|
onClick() {
|
|
|
if (this.share) {
|
|
|
return this.$links.toDownloadApp();
|
...
|
...
|
|