...
|
...
|
@@ -29,7 +29,7 @@ |
|
|
<TopicBanner v-if="data.data.topicHead" ref="topicHead" :data="topicInfo" @on-follow="onFollowTopic"></TopicBanner>
|
|
|
<ArticleItem
|
|
|
v-else
|
|
|
:type="type"
|
|
|
type="topic"
|
|
|
:index="data.index"
|
|
|
:data="data.data"
|
|
|
:share="share"
|
...
|
...
|
@@ -79,18 +79,6 @@ const throttleTime = 40; |
|
|
|
|
|
export default {
|
|
|
name: 'TopicPage',
|
|
|
props: {
|
|
|
share: Boolean,
|
|
|
type: String,
|
|
|
thumbs: {
|
|
|
type: Array,
|
|
|
default() {
|
|
|
return [];
|
|
|
}
|
|
|
},
|
|
|
posId: Number,
|
|
|
userUid: Number
|
|
|
},
|
|
|
created() {
|
|
|
this.topicName = this.$route.params.topicName;
|
|
|
},
|
...
|
...
|
@@ -120,29 +108,20 @@ export default { |
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
share: false,
|
|
|
thumbs: [],
|
|
|
posId: YAS.scene.topicList,
|
|
|
topicId: 0,
|
|
|
topicName: '',
|
|
|
headerAnimateStep: 0,
|
|
|
|
|
|
articleId: 0,
|
|
|
articleIndex: -1,
|
|
|
showCommentAction: false,
|
|
|
showCommentActioning: false,
|
|
|
showArticleDetailAction: false,
|
|
|
showMoreAction: true,
|
|
|
inx: 0,
|
|
|
scrollTop: 0,
|
|
|
showHeader: false,
|
|
|
currentId: 0,
|
|
|
currentAuthor: {
|
|
|
authorUid: 0,
|
|
|
authorName: '',
|
|
|
authorHeadIco: '',
|
|
|
hasAttention: 'N',
|
|
|
isAuthor: 'N',
|
|
|
isShare: false,
|
|
|
authorType: 1
|
|
|
}
|
|
|
currentId: 0
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -157,21 +136,6 @@ export default { |
|
|
methods: {
|
|
|
...mapActions(['fetchTopicSimpleInfo', 'fetchTopicRelatedArticles', 'fetchArticleProductFavs']),
|
|
|
...mapMutations(['ASYNC_ARTICLE_COMMENT', 'CHANGE_AUTHOR_FOLLOW', 'CHANGE_TOPIC_FOLLOW']),
|
|
|
toUserPage() {
|
|
|
if (this.share) {
|
|
|
return this.$links.toDownloadApp();
|
|
|
}
|
|
|
|
|
|
this.$router.push({
|
|
|
name: 'author',
|
|
|
params: {
|
|
|
type: this.currentAuthor.authorType,
|
|
|
id: this.currentAuthor.authorUid
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.reportClickAvatar();
|
|
|
},
|
|
|
onShowComment({articleId, index}) {
|
|
|
this.articleId = articleId;
|
|
|
this.articleIndex = index;
|
...
|
...
|
@@ -302,9 +266,6 @@ export default { |
|
|
}
|
|
|
},
|
|
|
onFollow(data, follow) {
|
|
|
if (data.authorUid === this.currentAuthor.authorUid) {
|
|
|
this.currentAuthor.hasAttention = follow ? 'Y' : 'N';
|
|
|
}
|
|
|
this.CHANGE_AUTHOR_FOLLOW({authorUid: data.authorUid, follow, type: this.type});
|
|
|
},
|
|
|
onFollowTopic(follow) {
|
...
|
...
|
@@ -321,17 +282,6 @@ export default { |
|
|
this.$refs.actionSheet.show(params);
|
|
|
});
|
|
|
},
|
|
|
reportClickAvatar() {
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
appop: YAS.eventName.avatar,
|
|
|
param: {
|
|
|
AUTH_ID: this.currentAuthor.authorUid,
|
|
|
POS_ID: this.posId
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
startReportShow() {
|
|
|
let preview = null;
|
|
|
let name = this.$yoho.isiOS ? 'iFP_ArticleList' : 'aFP_ArticleList';
|
...
|
...
|
|