Authored by baoss

Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop

1 <template> 1 <template>
2 <div id="app"> 2 <div id="app">
3 - <transition  
4 - :name="`route-view-${yoho.direction}`">  
5 - <keep-alive :max="20">  
6 - <router-view :key="routerViewKey"></router-view>  
7 - </keep-alive>  
8 - </transition> 3 + <keep-alive :max="20">
  4 + <router-view :key="routerViewKey"></router-view>
  5 + </keep-alive>
9 </div> 6 </div>
10 </template> 7 </template>
11 8
@@ -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,
@@ -232,7 +232,7 @@ export default function(mergeState = {}) { @@ -232,7 +232,7 @@ export default function(mergeState = {}) {
232 let isEnabled = !!state.sysConfig.enableQiugou; 232 let isEnabled = !!state.sysConfig.enableQiugou;
233 233
234 if (state.sysConfig.enableQiugou === null) { 234 if (state.sysConfig.enableQiugou === null) {
235 - const resp = await this.$api.get('/api/sys/config', { 235 + const resp = await this.$api.post('/api/sys/config', {
236 code: 'bid_switch_h5', 236 code: 'bid_switch_h5',
237 }); 237 });
238 238