|
@@ -29,7 +29,7 @@ |
|
@@ -29,7 +29,7 @@ |
29
|
<TopicBanner v-if="data.data.topicHead" ref="topicHead" :data="topicInfo" @on-follow="onFollowTopic"></TopicBanner>
|
29
|
<TopicBanner v-if="data.data.topicHead" ref="topicHead" :data="topicInfo" @on-follow="onFollowTopic"></TopicBanner>
|
30
|
<ArticleItem
|
30
|
<ArticleItem
|
31
|
v-else
|
31
|
v-else
|
32
|
- :type="type"
|
32
|
+ type="topic"
|
33
|
:index="data.index"
|
33
|
:index="data.index"
|
34
|
:data="data.data"
|
34
|
:data="data.data"
|
35
|
:share="share"
|
35
|
:share="share"
|
|
@@ -79,18 +79,6 @@ const throttleTime = 40; |
|
@@ -79,18 +79,6 @@ const throttleTime = 40; |
79
|
|
79
|
|
80
|
export default {
|
80
|
export default {
|
81
|
name: 'TopicPage',
|
81
|
name: 'TopicPage',
|
82
|
- props: {
|
|
|
83
|
- share: Boolean,
|
|
|
84
|
- type: String,
|
|
|
85
|
- thumbs: {
|
|
|
86
|
- type: Array,
|
|
|
87
|
- default() {
|
|
|
88
|
- return [];
|
|
|
89
|
- }
|
|
|
90
|
- },
|
|
|
91
|
- posId: Number,
|
|
|
92
|
- userUid: Number
|
|
|
93
|
- },
|
|
|
94
|
created() {
|
82
|
created() {
|
95
|
this.topicName = this.$route.params.topicName;
|
83
|
this.topicName = this.$route.params.topicName;
|
96
|
},
|
84
|
},
|
|
@@ -120,29 +108,20 @@ export default { |
|
@@ -120,29 +108,20 @@ export default { |
120
|
},
|
108
|
},
|
121
|
data() {
|
109
|
data() {
|
122
|
return {
|
110
|
return {
|
|
|
111
|
+ share: false,
|
|
|
112
|
+ thumbs: [],
|
|
|
113
|
+ posId: YAS.scene.topicList,
|
123
|
topicId: 0,
|
114
|
topicId: 0,
|
124
|
topicName: '',
|
115
|
topicName: '',
|
125
|
headerAnimateStep: 0,
|
116
|
headerAnimateStep: 0,
|
126
|
-
|
|
|
127
|
articleId: 0,
|
117
|
articleId: 0,
|
128
|
articleIndex: -1,
|
118
|
articleIndex: -1,
|
129
|
showCommentAction: false,
|
119
|
showCommentAction: false,
|
130
|
showCommentActioning: false,
|
120
|
showCommentActioning: false,
|
131
|
showArticleDetailAction: false,
|
121
|
showArticleDetailAction: false,
|
132
|
showMoreAction: true,
|
122
|
showMoreAction: true,
|
133
|
- inx: 0,
|
|
|
134
|
scrollTop: 0,
|
123
|
scrollTop: 0,
|
135
|
- showHeader: false,
|
|
|
136
|
- currentId: 0,
|
|
|
137
|
- currentAuthor: {
|
|
|
138
|
- authorUid: 0,
|
|
|
139
|
- authorName: '',
|
|
|
140
|
- authorHeadIco: '',
|
|
|
141
|
- hasAttention: 'N',
|
|
|
142
|
- isAuthor: 'N',
|
|
|
143
|
- isShare: false,
|
|
|
144
|
- authorType: 1
|
|
|
145
|
- }
|
124
|
+ currentId: 0
|
146
|
};
|
125
|
};
|
147
|
},
|
126
|
},
|
148
|
computed: {
|
127
|
computed: {
|
|
@@ -157,21 +136,6 @@ export default { |
|
@@ -157,21 +136,6 @@ export default { |
157
|
methods: {
|
136
|
methods: {
|
158
|
...mapActions(['fetchTopicSimpleInfo', 'fetchTopicRelatedArticles', 'fetchArticleProductFavs']),
|
137
|
...mapActions(['fetchTopicSimpleInfo', 'fetchTopicRelatedArticles', 'fetchArticleProductFavs']),
|
159
|
...mapMutations(['ASYNC_ARTICLE_COMMENT', 'CHANGE_AUTHOR_FOLLOW', 'CHANGE_TOPIC_FOLLOW']),
|
138
|
...mapMutations(['ASYNC_ARTICLE_COMMENT', 'CHANGE_AUTHOR_FOLLOW', 'CHANGE_TOPIC_FOLLOW']),
|
160
|
- toUserPage() {
|
|
|
161
|
- if (this.share) {
|
|
|
162
|
- return this.$links.toDownloadApp();
|
|
|
163
|
- }
|
|
|
164
|
-
|
|
|
165
|
- this.$router.push({
|
|
|
166
|
- name: 'author',
|
|
|
167
|
- params: {
|
|
|
168
|
- type: this.currentAuthor.authorType,
|
|
|
169
|
- id: this.currentAuthor.authorUid
|
|
|
170
|
- }
|
|
|
171
|
- });
|
|
|
172
|
-
|
|
|
173
|
- this.reportClickAvatar();
|
|
|
174
|
- },
|
|
|
175
|
onShowComment({articleId, index}) {
|
139
|
onShowComment({articleId, index}) {
|
176
|
this.articleId = articleId;
|
140
|
this.articleId = articleId;
|
177
|
this.articleIndex = index;
|
141
|
this.articleIndex = index;
|
|
@@ -302,9 +266,6 @@ export default { |
|
@@ -302,9 +266,6 @@ export default { |
302
|
}
|
266
|
}
|
303
|
},
|
267
|
},
|
304
|
onFollow(data, follow) {
|
268
|
onFollow(data, follow) {
|
305
|
- if (data.authorUid === this.currentAuthor.authorUid) {
|
|
|
306
|
- this.currentAuthor.hasAttention = follow ? 'Y' : 'N';
|
|
|
307
|
- }
|
|
|
308
|
this.CHANGE_AUTHOR_FOLLOW({authorUid: data.authorUid, follow, type: this.type});
|
269
|
this.CHANGE_AUTHOR_FOLLOW({authorUid: data.authorUid, follow, type: this.type});
|
309
|
},
|
270
|
},
|
310
|
onFollowTopic(follow) {
|
271
|
onFollowTopic(follow) {
|
|
@@ -321,17 +282,6 @@ export default { |
|
@@ -321,17 +282,6 @@ export default { |
321
|
this.$refs.actionSheet.show(params);
|
282
|
this.$refs.actionSheet.show(params);
|
322
|
});
|
283
|
});
|
323
|
},
|
284
|
},
|
324
|
- reportClickAvatar() {
|
|
|
325
|
- this.$store.dispatch('reportYas', {
|
|
|
326
|
- params: {
|
|
|
327
|
- appop: YAS.eventName.avatar,
|
|
|
328
|
- param: {
|
|
|
329
|
- AUTH_ID: this.currentAuthor.authorUid,
|
|
|
330
|
- POS_ID: this.posId
|
|
|
331
|
- }
|
|
|
332
|
- }
|
|
|
333
|
- });
|
|
|
334
|
- },
|
|
|
335
|
startReportShow() {
|
285
|
startReportShow() {
|
336
|
let preview = null;
|
286
|
let preview = null;
|
337
|
let name = this.$yoho.isiOS ? 'iFP_ArticleList' : 'aFP_ArticleList';
|
287
|
let name = this.$yoho.isiOS ? 'iFP_ArticleList' : 'aFP_ArticleList';
|