Authored by shuaiguo

feat(article/detail): 文章详情点赞埋点 reviewed by qiuj

... ... @@ -114,15 +114,27 @@ export default {
...mapActions(['updatePraiseStatus', 'fetchRecommendArticle']),
async onPraise({articleId, hasPraise}) {
const user = await this.$sdk.getUser(true);
const status = hasPraise === 'Y' ? 1 : 0;
if (user && user.uid) {
this.updatePraiseStatus({
articleId,
status: hasPraise === 'Y' ? 1 : 0
status
});
} else {
this.$yoho.auth();
}
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_STROLL_ATC_LIKE_C',
param: {
POS_ID: 102,
ARTICLE_ID: this.articleId,
STATUS: status,
},
},
});
},
onUpdatePraise({articleId, status}) {
this.updatePraiseStatus({
... ...