...
|
...
|
@@ -56,7 +56,7 @@ import ArticleActionSheet from './components/detail/article-action-sheet'; |
|
|
import MoreActionSheet from './components/detail/more-action-sheet';
|
|
|
import TopicHeader from './components/topic/header';
|
|
|
import TopicBanner from './components/topic/banner';
|
|
|
import {mapState as mapYohoState, mapActions as mapYohoActions, createNamespacedHelpers} from 'vuex';
|
|
|
import {mapState as mapYohoState, mapActions as mapYohoActions, mapMutations as mapYohoMutations, createNamespacedHelpers} from 'vuex';
|
|
|
const {mapMutations, mapActions} = createNamespacedHelpers('article');
|
|
|
|
|
|
const throttleTime = 40;
|
...
|
...
|
@@ -85,7 +85,7 @@ export default { |
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.topicName = this.$route.query.topicName;
|
|
|
this.topicName = this.$route.params.topicName;
|
|
|
},
|
|
|
activated() {
|
|
|
if (this.scrollTop && this.yoho.direction === 'back') {
|
...
|
...
|
@@ -94,7 +94,7 @@ export default { |
|
|
|
|
|
if (+this.$route.params.topicId !== this.topicId) {
|
|
|
this.topicId = +this.$route.params.topicId;
|
|
|
this.topicName = this.$route.query.topicName;
|
|
|
this.topicName = this.$route.params.topicName;
|
|
|
this.reload = true;
|
|
|
this.init();
|
|
|
}
|
...
|
...
|
@@ -118,6 +118,10 @@ export default { |
|
|
|
|
|
this.scrollEvent = throttle(this.onDounceScroll.bind(this), throttleTime);
|
|
|
this.colWidthForTwo = Math.floor(this.$el.offsetWidth / 2);
|
|
|
|
|
|
this.SET_STATUS_BAR_COLOR({
|
|
|
color: 'white'
|
|
|
});
|
|
|
},
|
|
|
computed: {
|
|
|
...mapYohoState(['yoho']),
|
...
|
...
|
@@ -133,6 +137,7 @@ export default { |
|
|
},
|
|
|
methods: {
|
|
|
...mapYohoActions(['fetchUserProfile']),
|
|
|
...mapYohoMutations(['SET_STATUS_BAR_COLOR']),
|
|
|
...mapActions(['fetchTopicSimpleInfo', 'fetchTopicRelatedArticles', 'fetchArticleProductFavs']),
|
|
|
...mapMutations(['ASYNC_ARTICLE_COMMENT', 'CHANGE_AUTHOR_FOLLOW']),
|
|
|
onShowComment({articleId, index}) {
|
...
|
...
|
|