...
|
...
|
@@ -11,6 +11,11 @@ export default { |
|
|
},
|
|
|
[Types.FETCH_ARTICLE_LIST_SUCCESS](state, {data}) {
|
|
|
state.fetchArticleList = false;
|
|
|
data.forEach(item => {
|
|
|
get(item, 'productList', []).forEach(product => {
|
|
|
product.favorite = false;
|
|
|
});
|
|
|
});
|
|
|
state.articleList = state.articleList.concat(data);
|
|
|
|
|
|
state.articleList.forEach((item, index) => {
|
...
|
...
|
@@ -25,11 +30,6 @@ export default { |
|
|
}
|
|
|
item.index = index;
|
|
|
});
|
|
|
data.forEach(item => {
|
|
|
get(item, 'productList', []).forEach(product => {
|
|
|
product.favorite = false;
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
[Types.FETCH_ARTICLE_LIST_FAILD](state) {
|
|
|
state.fetchArticleList = false;
|
...
|
...
|
|