...
|
...
|
@@ -109,8 +109,8 @@ export default { |
|
|
let article = (result.getArticle = (data && data.data) || {});
|
|
|
|
|
|
let promises = [
|
|
|
this.$api.get('/api/guang/article/content', { article_id }),
|
|
|
this.$api.get('/api/guang/article/zan', { articleId: grass_id })
|
|
|
this.$api.post('/api/guang/article/content', { article_id }),
|
|
|
this.$api.post('/api/guang/article/zan', { articleId: grass_id })
|
|
|
];
|
|
|
|
|
|
const [content, zan] = await Promise.all(promises);
|
...
|
...
|
@@ -120,12 +120,12 @@ export default { |
|
|
|
|
|
// 插入商品
|
|
|
const [goodsList, favsList] = await Promise.all([
|
|
|
this.$api.get('/api/guang/article/queryGoods', {
|
|
|
this.$api.post('/api/guang/article/queryGoods', {
|
|
|
query: processContents.allgoods.join(','),
|
|
|
order: 's_t_desc',
|
|
|
limit: processContents.allgoods.length || 1
|
|
|
}),
|
|
|
this.$api.get('/api/favorite/batchCheckIsFavorite', {
|
|
|
this.$api.post('/api/favorite/batchCheckIsFavorite', {
|
|
|
favIds: processContents.allgoods.join(','),
|
|
|
type: 'product'
|
|
|
})
|
...
|
...
|
@@ -155,7 +155,7 @@ export default { |
|
|
result.getAuthor.name = zan.data.authorName;
|
|
|
result.getAuthor.avatar = zan.data.authorHeadIco;
|
|
|
result.getAuthor.authorType = zan.data.authorType;
|
|
|
result.getAuthor.follow = get(zan, 'data.hasAttention', false);
|
|
|
result.getAuthor.follow = get(zan, 'data.hasAttention', false) === 'Y';
|
|
|
}
|
|
|
|
|
|
if (article && article.tags) {
|
...
|
...
|
|