|
@@ -15,7 +15,7 @@ export default { |
|
@@ -15,7 +15,7 @@ export default { |
15
|
content_code: '05e4f5782dfc3a5e10d39b8f04a7dcb9',
|
15
|
content_code: '05e4f5782dfc3a5e10d39b8f04a7dcb9',
|
16
|
};
|
16
|
};
|
17
|
}
|
17
|
}
|
18
|
- return this.$api.get(`/api/ufo/product${path}`, params).then(result => {
|
18
|
+ return this.$api.post(`/api/ufo/product${path}`, params).then(result => {
|
19
|
if (result.code === 200) {
|
19
|
if (result.code === 200) {
|
20
|
return result.data;
|
20
|
return result.data;
|
21
|
} else {
|
21
|
} else {
|
|
@@ -35,7 +35,7 @@ export default { |
|
@@ -35,7 +35,7 @@ export default { |
35
|
}));
|
35
|
}));
|
36
|
},
|
36
|
},
|
37
|
async fetchRecommendProduct({ commit }, { productId }) {
|
37
|
async fetchRecommendProduct({ commit }, { productId }) {
|
38
|
- const result = await this.$api.get('/api/ufo/product/recommend', { product_id: productId })
|
38
|
+ const result = await this.$api.post('/api/ufo/product/recommend', { product_id: productId })
|
39
|
|
39
|
|
40
|
return result?.data?.product_list ?? []
|
40
|
return result?.data?.product_list ?? []
|
41
|
},
|
41
|
},
|
|
@@ -52,7 +52,7 @@ export default { |
|
@@ -52,7 +52,7 @@ export default { |
52
|
return false;
|
52
|
return false;
|
53
|
}
|
53
|
}
|
54
|
|
54
|
|
55
|
- const isFav = await this.$api.get('/api/ufo/product/fav', { productId }).then(result => {
|
55
|
+ const isFav = await this.$api.post('/api/ufo/product/fav', { productId }).then(result => {
|
56
|
if (result.code === 200) {
|
56
|
if (result.code === 200) {
|
57
|
return result.data;
|
57
|
return result.data;
|
58
|
} else {
|
58
|
} else {
|
|
@@ -63,7 +63,7 @@ export default { |
|
@@ -63,7 +63,7 @@ export default { |
63
|
commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav });
|
63
|
commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav });
|
64
|
},
|
64
|
},
|
65
|
async fetchTop3({ commit }, { productId }) {
|
65
|
async fetchTop3({ commit }, { productId }) {
|
66
|
- const result = await this.$api.get('/api/ufo/product/top', { product_id: productId });
|
66
|
+ const result = await this.$api.post('/api/ufo/product/top', { product_id: productId });
|
67
|
|
67
|
|
68
|
if (result.code === 200) {
|
68
|
if (result.code === 200) {
|
69
|
const productList = result.data.product_list || [];
|
69
|
const productList = result.data.product_list || [];
|
|
@@ -72,7 +72,7 @@ export default { |
|
@@ -72,7 +72,7 @@ export default { |
72
|
}
|
72
|
}
|
73
|
},
|
73
|
},
|
74
|
async toggleFav({ commit }, { productId, isFav }) {
|
74
|
async toggleFav({ commit }, { productId, isFav }) {
|
75
|
- const result = await this.$api.get(`/api/ufo/product/favorite/${isFav ? 'add' : 'cancel'}`, { productId });
|
75
|
+ const result = await this.$api.post(`/api/ufo/product/favorite/${isFav ? 'add' : 'cancel'}`, { productId });
|
76
|
|
76
|
|
77
|
if (result && result.code === 200) {
|
77
|
if (result && result.code === 200) {
|
78
|
commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav });
|
78
|
commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav });
|
|
@@ -106,7 +106,7 @@ export default { |
|
@@ -106,7 +106,7 @@ export default { |
106
|
async requestSize({ state }, { product_id, goods_id, size_ids }) {
|
106
|
async requestSize({ state }, { product_id, goods_id, size_ids }) {
|
107
|
const selectedProduct = state.selectedProductInfo;
|
107
|
const selectedProduct = state.selectedProductInfo;
|
108
|
|
108
|
|
109
|
- await this.$api.get('/api/ufo/product/addsize', {
|
109
|
+ await this.$api.post('/api/ufo/product/addsize', {
|
110
|
product_id,
|
110
|
product_id,
|
111
|
goods_id,
|
111
|
goods_id,
|
112
|
size_ids,
|
112
|
size_ids,
|