...
|
...
|
@@ -82,6 +82,8 @@ export default { |
|
|
if (+this.$route.params.id !== this.id) {
|
|
|
this.id = +this.$route.params.id;
|
|
|
this.init();
|
|
|
} else {
|
|
|
this.reportProductShow(this.articleInfo);
|
|
|
}
|
|
|
},
|
|
|
async serverPrefetch() {
|
...
|
...
|
@@ -113,6 +115,7 @@ export default { |
|
|
...mapMutations(['CHANGE_AUTHOR_FOLLOW']),
|
|
|
init() {
|
|
|
this.recommendArticles = {};
|
|
|
this.fetching = true;
|
|
|
this.syncServiceArticleDetail();
|
|
|
},
|
|
|
loadPreData(articleId) {
|
...
|
...
|
@@ -145,10 +148,13 @@ export default { |
|
|
this.listTitle = '';
|
|
|
|
|
|
setTimeout(() => {
|
|
|
this.fetching = false;
|
|
|
this.$refs.scroll.init();
|
|
|
}, 500);
|
|
|
}
|
|
|
|
|
|
this.reportProductShow(get(res, 'data.detailList[0]'));
|
|
|
|
|
|
if (this.share && this.setShareData) {
|
|
|
this.setShareData(get(res, 'data.detailList[0]', this.articleInfo));
|
|
|
}
|
...
|
...
|
@@ -209,6 +215,36 @@ export default { |
|
|
this.$refs.detailNote && ($detail = this.$refs.detailNote);
|
|
|
|
|
|
$detail.$refs.header && $detail.$refs.header.onBack();
|
|
|
},
|
|
|
reportProductShow(article) {
|
|
|
const productList = article.productList || [];
|
|
|
|
|
|
if (!productList.length) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
let name = this.$yoho.isiOS ? 'iFP_ArticleList' : 'aFP_ArticleList';
|
|
|
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
appop: YAS.eventName.show,
|
|
|
param: {
|
|
|
DATA: [
|
|
|
...productList.map((p, i) => {
|
|
|
return {
|
|
|
P_NAME: name,
|
|
|
P_PARAM: this.id,
|
|
|
I_INDEX: i,
|
|
|
ARTICLE_ID: this.id,
|
|
|
PRD_SKN: p.productSkn,
|
|
|
ATR_TYPE: article.sort == 2 ? 1 : 2,
|
|
|
PRD_TYPE: p.collage_activity_id ? 'collage_info' : ''
|
|
|
};
|
|
|
})
|
|
|
],
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
components: {
|
...
|
...
|
|