|
@@ -11,6 +11,11 @@ export default { |
|
@@ -11,6 +11,11 @@ export default { |
11
|
},
|
11
|
},
|
12
|
[Types.FETCH_ARTICLE_LIST_SUCCESS](state, {data}) {
|
12
|
[Types.FETCH_ARTICLE_LIST_SUCCESS](state, {data}) {
|
13
|
state.fetchArticleList = false;
|
13
|
state.fetchArticleList = false;
|
|
|
14
|
+ data.forEach(item => {
|
|
|
15
|
+ get(item, 'productList', []).forEach(product => {
|
|
|
16
|
+ product.favorite = false;
|
|
|
17
|
+ });
|
|
|
18
|
+ });
|
14
|
state.articleList = state.articleList.concat(data);
|
19
|
state.articleList = state.articleList.concat(data);
|
15
|
|
20
|
|
16
|
state.articleList.forEach((item, index) => {
|
21
|
state.articleList.forEach((item, index) => {
|
|
@@ -25,11 +30,6 @@ export default { |
|
@@ -25,11 +30,6 @@ export default { |
25
|
}
|
30
|
}
|
26
|
item.index = index;
|
31
|
item.index = index;
|
27
|
});
|
32
|
});
|
28
|
- data.forEach(item => {
|
|
|
29
|
- get(item, 'productList', []).forEach(product => {
|
|
|
30
|
- product.favorite = false;
|
|
|
31
|
- });
|
|
|
32
|
- });
|
|
|
33
|
},
|
33
|
},
|
34
|
[Types.FETCH_ARTICLE_LIST_FAILD](state) {
|
34
|
[Types.FETCH_ARTICLE_LIST_FAILD](state) {
|
35
|
state.fetchArticleList = false;
|
35
|
state.fetchArticleList = false;
|