Showing
1 changed file
with
10 additions
and
3 deletions
@@ -2,6 +2,7 @@ import * as Types from './types'; | @@ -2,6 +2,7 @@ import * as Types from './types'; | ||
2 | import { get } from 'lodash'; | 2 | import { get } from 'lodash'; |
3 | import * as guangProcess from './guangProcess'; | 3 | import * as guangProcess from './guangProcess'; |
4 | import * as sleep from '../../utils/sleep'; | 4 | import * as sleep from '../../utils/sleep'; |
5 | +import sdk from 'common/sdk'; | ||
5 | 6 | ||
6 | export default { | 7 | export default { |
7 | async fetchArticleList({ commit }, { articleId, authorUid, authorType, limit = 5, page = 1, thumb = false }) { | 8 | async fetchArticleList({ commit }, { articleId, authorUid, authorType, limit = 5, page = 1, thumb = false }) { |
@@ -178,9 +179,15 @@ export default { | @@ -178,9 +179,15 @@ export default { | ||
178 | order: 's_t_desc', | 179 | order: 's_t_desc', |
179 | limit: processContents.allgoods.skn.length || 1 | 180 | limit: processContents.allgoods.skn.length || 1 |
180 | }), | 181 | }), |
181 | - this.$api.post('/api/favorite/batchCheckIsFavorite', { | ||
182 | - favIds: processContents.allgoods.id.join(','), | ||
183 | - type: 'product' | 182 | + sdk.getUser().then((u) => { |
183 | + if (u && u.uid) { | ||
184 | + return this.$api.post('/api/favorite/batchCheckIsFavorite', { | ||
185 | + favIds: processContents.allgoods.id.join(','), | ||
186 | + type: 'product' | ||
187 | + }); | ||
188 | + } else { | ||
189 | + return {}; | ||
190 | + } | ||
184 | }), | 191 | }), |
185 | this.$api.post('/api/guang/article/zan', { articleId: grass_id }), | 192 | this.$api.post('/api/guang/article/zan', { articleId: grass_id }), |
186 | this.$api.get('/api/guang/article/detail', { article_id }) | 193 | this.$api.get('/api/guang/article/detail', { article_id }) |
-
Please register or login to post a comment