Authored by 邱骏

Merge branch 'feature/2019/1230-community-article' of http://git.yoho.cn/fe/xian…

…yu-ufo-app-web into feature/2019/1230-community-article
... ... @@ -12,7 +12,7 @@
</div>
<div class="slide-container">
<associated-item :items="detailInfo.productList"></associated-item>
<associated-item :items="detailInfo.productList" :articleId="articleId"></associated-item>
</div>
<div class="note-container">
... ... @@ -117,15 +117,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({
... ...
... ... @@ -33,13 +33,29 @@ export default {
default() {
return [];
}
},
articleId: {
type: Number,
default: ''
}
},
methods: {
imageformatError() {
console.log(6666);
},
goToDetail(item) {
goToDetail(item, index) {
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_STROLL_ARC_RLT_PRD_C',
param: {
P_NAME: 'XY_UFOArticleDetail',
P_PARAM: this.articleId,
I_INDEX: index + 1,
PRD_ID: item.productSkn
},
},
});
this.$router.push({
name: 'ProductDetail',
params: {
... ... @@ -48,8 +64,6 @@ export default {
});
}
},
mounted() {
}
};
</script>
... ...