Showing
1 changed file
with
7 additions
and
7 deletions
@@ -73,20 +73,20 @@ const getProductList = (params) => { | @@ -73,20 +73,20 @@ const getProductList = (params) => { | ||
73 | 73 | ||
74 | if(cdata.filter && cdata.standard) { | 74 | if(cdata.filter && cdata.standard) { |
75 | hasCache= true; | 75 | hasCache= true; |
76 | - finalParams.need_filter= 'no'; | 76 | + finalParams.need_filter= 'no'; |
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | return yohoApi.get('', finalParams).then(result => { | 80 | return yohoApi.get('', finalParams).then(result => { |
81 | 81 | ||
82 | if(hasCache && result && result.data) { | 82 | if(hasCache && result && result.data) { |
83 | - Object.assign(result.data, cdata); | 83 | + Object.assign(result.data, cdata); |
84 | } else { | 84 | } else { |
85 | if(result && result.data && result.data.filter) { | 85 | if(result && result.data && result.data.filter) { |
86 | cache.set(cKey, Object.assign({}, { | 86 | cache.set(cKey, Object.assign({}, { |
87 | filter: result.data.filter, | 87 | filter: result.data.filter, |
88 | standard: result.data.standard | 88 | standard: result.data.standard |
89 | - })); | 89 | + }), 3600); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | return result; | 92 | return result; |
@@ -127,7 +127,7 @@ const getSortList = (params) => { | @@ -127,7 +127,7 @@ const getSortList = (params) => { | ||
127 | return yohoApi.get('', finalParams).then(ret => { | 127 | return yohoApi.get('', finalParams).then(ret => { |
128 | 128 | ||
129 | if(ret && ret.code === 200) { | 129 | if(ret && ret.code === 200) { |
130 | - cache.set(cKey, ret); | 130 | + cache.set(cKey, ret, 3600); |
131 | } | 131 | } |
132 | return ret; | 132 | return ret; |
133 | }); | 133 | }); |
@@ -243,10 +243,10 @@ const getBrandShop = (query) => { | @@ -243,10 +243,10 @@ const getBrandShop = (query) => { | ||
243 | return yohoApi.get('', finalParams).then(ret => { | 243 | return yohoApi.get('', finalParams).then(ret => { |
244 | if (ret && ret.code === 200) { | 244 | if (ret && ret.code === 200) { |
245 | 245 | ||
246 | - cache.set(cKey, ret.data); | 246 | + cache.set(cKey, ret.data, 3600); |
247 | return ret.data; | 247 | return ret.data; |
248 | } | 248 | } |
249 | - });return | 249 | + });return |
250 | } | 250 | } |
251 | }); | 251 | }); |
252 | }; | 252 | }; |
@@ -280,7 +280,7 @@ const getShopsByBrandId = bid => { | @@ -280,7 +280,7 @@ const getShopsByBrandId = bid => { | ||
280 | return yohoApi.get('', finalParams).then(ret => { | 280 | return yohoApi.get('', finalParams).then(ret => { |
281 | if (ret && ret.code === 200) { | 281 | if (ret && ret.code === 200) { |
282 | 282 | ||
283 | - cache.set(cKey, ret.data); | 283 | + cache.set(cKey, ret.data, 3600); |
284 | return ret.data; | 284 | return ret.data; |
285 | } | 285 | } |
286 | }); | 286 | }); |
-
Please register or login to post a comment