...
|
...
|
@@ -114,6 +114,8 @@ export default { |
|
|
|
|
|
if (author && author.code === 200 && author.data) {
|
|
|
result.getAuthor = author.data;
|
|
|
result.getAuthor.authorUid = result.getAuthor.author_id;
|
|
|
result.getAuthor.fellow = get(zan, 'data.hasAttention', false);
|
|
|
}
|
|
|
|
|
|
if (content && content.code === 200 && content.data) {
|
...
|
...
|
@@ -127,15 +129,18 @@ export default { |
|
|
const processContents = guangProcess.processArticleDetail(content.data);
|
|
|
|
|
|
// 插入商品
|
|
|
const goodsList = await this.$api.get('/api/guang/article/queryGoods', {
|
|
|
const [goodsList, favsList] = await Promise.all([this.$api.get('/api/guang/article/queryGoods', {
|
|
|
query: processContents.allgoods.join(','),
|
|
|
order: 's_t_desc',
|
|
|
limit: processContents.allgoods.length || 1
|
|
|
}).then(res => {
|
|
|
return get(res, 'data.product_list', []);
|
|
|
}), this.$api.get('/api/favorite/batchCheckIsFavorite', {
|
|
|
favIds: processContents.allgoods.join(','),
|
|
|
type: 'product'
|
|
|
})]).then(([res1, res2]) => {
|
|
|
return [get(res1, 'data.product_list', []), get(res2, 'data', [])];
|
|
|
});
|
|
|
|
|
|
result.getArticleContent = guangProcess.pushGoodsInfo(processContents.finalDetail, goodsList);
|
|
|
result.getArticleContent = guangProcess.pushGoodsInfo(processContents.finalDetail, goodsList, favsList);
|
|
|
}
|
|
|
|
|
|
if (zan && zan.code === 200 && zan.data) {
|
...
|
...
|
|