...
|
...
|
@@ -35,7 +35,7 @@ |
|
|
:data="data.data"
|
|
|
:share="share"
|
|
|
:article-id="data.data.articleId"
|
|
|
:user-head-ico="userHeadIco"
|
|
|
:user-head-ico="yoho.context.userHeadIco"
|
|
|
:pos-id="posId"
|
|
|
@on-follow="follow => onFollow(data.data, follow)"
|
|
|
@on-resize="onResize"
|
...
|
...
|
@@ -52,7 +52,7 @@ |
|
|
|
|
|
<a v-if="publishUrl && !share" class="publish-btn hover-opacity" :class="{'scroll-opacity': scrolling}" :href="publishUrl">
|
|
|
<span class="avatar-block">
|
|
|
<WidgetAvatar class="avatar" :src="userHeadIco" :width="70" :height="70"></WidgetAvatar>
|
|
|
<WidgetAvatar class="avatar" :src="yoho.context.userHeadIco" :width="70" :height="70"></WidgetAvatar>
|
|
|
</span>
|
|
|
立即参与
|
|
|
</a>
|
...
|
...
|
@@ -82,7 +82,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 {createNamespacedHelpers} from 'vuex';
|
|
|
import {mapState as mapYohoState, mapActions as mapYohoActions, createNamespacedHelpers} from 'vuex';
|
|
|
const {mapState, mapMutations, mapActions} = createNamespacedHelpers('article');
|
|
|
|
|
|
const throttleTime = 40;
|
...
|
...
|
@@ -121,8 +121,8 @@ export default { |
|
|
}
|
|
|
}
|
|
|
|
|
|
if (this.$cookie && this.$cookie.get) {
|
|
|
this.userHeadIco = this.$cookie.get('_head_ico');
|
|
|
if (!this.yoho.context.userHeadIco) {
|
|
|
this.fetchUserProfile();
|
|
|
}
|
|
|
this.scrollEvent = throttle(this.onDounceScroll.bind(this), throttleTime);
|
|
|
this.reportShow = this.startReportShow();
|
...
|
...
|
@@ -145,11 +145,11 @@ export default { |
|
|
scrollTop: 0,
|
|
|
currentId: 0,
|
|
|
colWidthForTwo: 0,
|
|
|
userHeadIco: '',
|
|
|
scrolling: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
...mapYohoState(['yoho']),
|
|
|
...mapState(['topicInfo']),
|
|
|
publishUrl() {
|
|
|
return this.topicId ? `?openby:yohobuy={"action":"go.grasspublish","params":{"topicId":"${this.topicId}","topicName":"${this.topicName}"}}` : '';
|
...
|
...
|
@@ -162,6 +162,7 @@ export default { |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
...mapYohoActions(['fetchUserProfile']),
|
|
|
...mapActions(['fetchTopicSimpleInfo', 'fetchTopicRelatedArticles', 'fetchArticleProductFavs']),
|
|
|
...mapMutations(['ASYNC_ARTICLE_COMMENT', 'CHANGE_AUTHOR_FOLLOW', 'CHANGE_TOPIC_FOLLOW']),
|
|
|
onShowComment({articleId, index}) {
|
...
|
...
|
|