Showing
11 changed files
with
62 additions
and
85 deletions
@@ -758,7 +758,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -758,7 +758,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
758 | return this.get({ | 758 | return this.get({ |
759 | url: 'operations/api/v5/resource/home', | 759 | url: 'operations/api/v5/resource/home', |
760 | data, | 760 | data, |
761 | - params: { | 761 | + param: { |
762 | cache: true, | 762 | cache: true, |
763 | code: 200 | 763 | code: 200 |
764 | }, | 764 | }, |
@@ -949,7 +949,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -949,7 +949,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
949 | return this.get({ | 949 | return this.get({ |
950 | url: 'operations/api/v5/resource/get', | 950 | url: 'operations/api/v5/resource/get', |
951 | data: { content_code: code }, | 951 | data: { content_code: code }, |
952 | - params: { cache: config.apiCache }, | 952 | + param: config.apiCache, |
953 | api: global.yoho.ServiceAPI | 953 | api: global.yoho.ServiceAPI |
954 | }).then(data => { | 954 | }).then(data => { |
955 | let result = data && data.data[0] && data.data[0].data[0]; | 955 | let result = data && data.data[0] && data.data[0].data[0]; |
@@ -1117,7 +1117,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -1117,7 +1117,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
1117 | data: Object.assign({ | 1117 | data: Object.assign({ |
1118 | method: method | 1118 | method: method |
1119 | }, data), | 1119 | }, data), |
1120 | - params: {cache: true} | 1120 | + param: {cache: true} |
1121 | })); | 1121 | })); |
1122 | }); | 1122 | }); |
1123 | 1123 | ||
@@ -1323,7 +1323,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -1323,7 +1323,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
1323 | return this.get({ | 1323 | return this.get({ |
1324 | url: 'operations/api/v6/category/getCategory', | 1324 | url: 'operations/api/v6/category/getCategory', |
1325 | data: params, | 1325 | data: params, |
1326 | - params: config.apiCache, | 1326 | + param: config.apiCache, |
1327 | api: global.yoho.ServiceAPI | 1327 | api: global.yoho.ServiceAPI |
1328 | }); | 1328 | }); |
1329 | } | 1329 | } |
@@ -13,7 +13,7 @@ const indexService = require('./index-service'); | @@ -13,7 +13,7 @@ const indexService = require('./index-service'); | ||
13 | /** | 13 | /** |
14 | * 获得图片 | 14 | * 获得图片 |
15 | */ | 15 | */ |
16 | -const getLeftBannerAsync = (resourceCode) => { | 16 | +function getLeftBannerAsync(resourceCode) { |
17 | const DEFAULT_VALUE = { | 17 | const DEFAULT_VALUE = { |
18 | img: 'https://img12.static.yhbimg.com/' + | 18 | img: 'https://img12.static.yhbimg.com/' + |
19 | 'yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', | 19 | 'yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', |
@@ -35,7 +35,7 @@ const getLeftBannerAsync = (resourceCode) => { | @@ -35,7 +35,7 @@ const getLeftBannerAsync = (resourceCode) => { | ||
35 | 35 | ||
36 | return value; | 36 | return value; |
37 | })(); | 37 | })(); |
38 | -}; | 38 | +} |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * 国家数据 | 41 | * 国家数据 |
@@ -12,12 +12,12 @@ module.exports = class extends global.yoho.BaseModel { | @@ -12,12 +12,12 @@ module.exports = class extends global.yoho.BaseModel { | ||
12 | } | 12 | } |
13 | 13 | ||
14 | getBannerInfoAsync(bid) { | 14 | getBannerInfoAsync(bid) { |
15 | - return this.get({data: { | 15 | + return this.get({ |
16 | + data: { | ||
16 | method: 'web.brand.banner', | 17 | method: 'web.brand.banner', |
17 | brand_id: bid | 18 | brand_id: bid |
18 | - }, params: { | ||
19 | - cache: config.apiCache | ||
20 | - }}); | 19 | + }, param: config.apiCache |
20 | + }); | ||
21 | } | 21 | } |
22 | }; | 22 | }; |
23 | 23 |
@@ -17,8 +17,6 @@ module.exports = class extends global.yoho.BaseModel { | @@ -17,8 +17,6 @@ module.exports = class extends global.yoho.BaseModel { | ||
17 | product_id: pid | 17 | product_id: pid |
18 | }; | 18 | }; |
19 | 19 | ||
20 | - return this.get({data, params: { | ||
21 | - cache: config.apiCache | ||
22 | - }}); | 20 | + return this.get({data, param: config.apiCache }); |
23 | } | 21 | } |
24 | }; | 22 | }; |
@@ -71,9 +71,8 @@ module.exports = class extends global.yoho.BaseModel { | @@ -71,9 +71,8 @@ module.exports = class extends global.yoho.BaseModel { | ||
71 | data: { | 71 | data: { |
72 | method: 'web.productBanner.data', | 72 | method: 'web.productBanner.data', |
73 | product_id: pid | 73 | product_id: pid |
74 | - }, params: { | ||
75 | - cache: config.apiCache | ||
76 | - } | 74 | + }, param: config.apiCache |
75 | + | ||
77 | }); | 76 | }); |
78 | } | 77 | } |
79 | 78 | ||
@@ -85,9 +84,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -85,9 +84,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
85 | data: { | 84 | data: { |
86 | method: 'h5.product.intro', | 85 | method: 'h5.product.intro', |
87 | productskn: skn | 86 | productskn: skn |
88 | - }, params: { | ||
89 | - cache: config.apiCache | ||
90 | - } | 87 | + }, param: config.apiCache |
91 | }); | 88 | }); |
92 | } | 89 | } |
93 | 90 | ||
@@ -99,9 +96,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -99,9 +96,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
99 | data: { | 96 | data: { |
100 | method: 'web.product.refundExchange', | 97 | method: 'web.product.refundExchange', |
101 | product_skn: skn | 98 | product_skn: skn |
102 | - }, params: { | ||
103 | - cache: config.apiCache | ||
104 | - } | 99 | + }, param: config.apiCache |
105 | }); | 100 | }); |
106 | } | 101 | } |
107 | 102 | ||
@@ -113,9 +108,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -113,9 +108,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
113 | data: { | 108 | data: { |
114 | method: 'web.productComfort.data', | 109 | method: 'web.productComfort.data', |
115 | product_id: pid | 110 | product_id: pid |
116 | - }, params: { | ||
117 | - cache: config.apiCache | ||
118 | - } | 111 | + }, param: config.apiCache |
119 | }); | 112 | }); |
120 | } | 113 | } |
121 | 114 | ||
@@ -127,9 +120,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -127,9 +120,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
127 | data: { | 120 | data: { |
128 | method: 'web.productModelTry.data', | 121 | method: 'web.productModelTry.data', |
129 | product_skn: skn | 122 | product_skn: skn |
130 | - }, params: { | ||
131 | - cache: config.apiCache | ||
132 | - } | 123 | + }, param: config.apiCache |
133 | }); | 124 | }); |
134 | } | 125 | } |
135 | 126 | ||
@@ -162,11 +153,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -162,11 +153,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
162 | data.current_vip_level = vipLevel; | 153 | data.current_vip_level = vipLevel; |
163 | } | 154 | } |
164 | 155 | ||
165 | - return this.get({ | ||
166 | - data, params: { | ||
167 | - cache: config.apiCache | ||
168 | - } | ||
169 | - }); | 156 | + return this.get({ data, param: config.apiCache }); |
170 | } | 157 | } |
171 | 158 | ||
172 | /** | 159 | /** |
@@ -178,11 +165,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -178,11 +165,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
178 | product_skn: skn | 165 | product_skn: skn |
179 | }; | 166 | }; |
180 | 167 | ||
181 | - return this.get({ | ||
182 | - data, params: { | ||
183 | - cache: config.apiCache | ||
184 | - } | ||
185 | - }); | 168 | + return this.get({ data, param: config.apiCache }); |
186 | } | 169 | } |
187 | 170 | ||
188 | /** | 171 | /** |
@@ -202,11 +185,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -202,11 +185,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
202 | data.product_skn = skn; | 185 | data.product_skn = skn; |
203 | } | 186 | } |
204 | 187 | ||
205 | - return this.get({ | ||
206 | - data, params: { | ||
207 | - cache: config.apiCache | ||
208 | - } | ||
209 | - }); | 188 | + return this.get({ data, param: config.apiCache }); |
210 | } | 189 | } |
211 | 190 | ||
212 | /** | 191 | /** |
@@ -244,7 +223,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -244,7 +223,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
244 | method: 'web.search.findLike', | 223 | method: 'web.search.findLike', |
245 | limit: limit || 10, | 224 | limit: limit || 10, |
246 | product_skn: skn | 225 | product_skn: skn |
247 | - }, params: { | 226 | + }, param: { |
248 | cache: 86400 | 227 | cache: 86400 |
249 | } | 228 | } |
250 | }); | 229 | }); |
@@ -27,7 +27,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -27,7 +27,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
27 | return this.get({ | 27 | return this.get({ |
28 | url: 'product/api/v2/detail/getlist', | 28 | url: 'product/api/v2/detail/getlist', |
29 | data: finalParams, | 29 | data: finalParams, |
30 | - params: {cache: config.apiCache}, | 30 | + param: config.apiCache, |
31 | api: global.yoho.GlobalAPI | 31 | api: global.yoho.GlobalAPI |
32 | }); | 32 | }); |
33 | } | 33 | } |
@@ -39,7 +39,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -39,7 +39,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
39 | physical_channel: channelNum, | 39 | physical_channel: channelNum, |
40 | product_skn: skn | 40 | product_skn: skn |
41 | }, | 41 | }, |
42 | - params: { cache: config.apiCache }, | 42 | + param: config.apiCache, |
43 | api: global.yoho.GlobalAPI | 43 | api: global.yoho.GlobalAPI |
44 | }); | 44 | }); |
45 | } | 45 | } |
@@ -52,7 +52,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -52,7 +52,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
52 | product_skn: skn, | 52 | product_skn: skn, |
53 | return_type: 'html' | 53 | return_type: 'html' |
54 | }, | 54 | }, |
55 | - params: {cache: config.apiCache}, | 55 | + param: config.apiCache, |
56 | api: global.yoho.GlobalAPI | 56 | api: global.yoho.GlobalAPI |
57 | }); | 57 | }); |
58 | } | 58 | } |
@@ -61,7 +61,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -61,7 +61,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
61 | return this.get({ | 61 | return this.get({ |
62 | url: 'editor/api/v1/brand/get', | 62 | url: 'editor/api/v1/brand/get', |
63 | data: { brandId: brand }, | 63 | data: { brandId: brand }, |
64 | - params: {cache: config.apiCache}, | 64 | + param: config.apiCache, |
65 | api: global.yoho.GlobalAPI | 65 | api: global.yoho.GlobalAPI |
66 | }); | 66 | }); |
67 | } | 67 | } |
@@ -54,7 +54,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -54,7 +54,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
54 | size: params.size || 0, | 54 | size: params.size || 0, |
55 | yh_channel: yhChannel[tempChannel].channel, | 55 | yh_channel: yhChannel[tempChannel].channel, |
56 | type: params.type || 0 | 56 | type: params.type || 0 |
57 | - }, params: {cache: config.apiCache} | 57 | + }, param: config.apiCache |
58 | }); | 58 | }); |
59 | } | 59 | } |
60 | 60 | ||
@@ -67,7 +67,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -67,7 +67,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
67 | return this.get({ | 67 | return this.get({ |
68 | url: 'operations/api/v5/resource/home', | 68 | url: 'operations/api/v5/resource/home', |
69 | data: params, | 69 | data: params, |
70 | - params: {cache: config.apiCache}, | 70 | + param: config.apiCache, |
71 | api: global.yoho.ServiceAPI | 71 | api: global.yoho.ServiceAPI |
72 | }); | 72 | }); |
73 | } | 73 | } |
@@ -89,7 +89,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -89,7 +89,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
89 | stocknumber: 1, // 过滤出库存 > 1的商品 | 89 | stocknumber: 1, // 过滤出库存 > 1的商品 |
90 | limit: params.limit || 5, | 90 | limit: params.limit || 5, |
91 | outlets: params.outlets || 1 // 默认取奥莱商品 | 91 | outlets: params.outlets || 1 // 默认取奥莱商品 |
92 | - }, params: {cache: config.apiCache} | 92 | + }, param: config.apiCache |
93 | }); | 93 | }); |
94 | } | 94 | } |
95 | 95 | ||
@@ -123,6 +123,6 @@ module.exports = class extends global.yoho.BaseModel { | @@ -123,6 +123,6 @@ module.exports = class extends global.yoho.BaseModel { | ||
123 | tempParams[paramsName] = params[paramsName]; | 123 | tempParams[paramsName] = params[paramsName]; |
124 | } | 124 | } |
125 | }); | 125 | }); |
126 | - return this.get({data: tempParams, params: {cache: config.apiCache}}); | 126 | + return this.get({data: tempParams, param: config.apiCache}); |
127 | } | 127 | } |
128 | }; | 128 | }; |
@@ -47,7 +47,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -47,7 +47,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
47 | finalParams.yh_channel = yhChannel[params.channel].channel; | 47 | finalParams.yh_channel = yhChannel[params.channel].channel; |
48 | } | 48 | } |
49 | 49 | ||
50 | - return this.get({data: Object.assign(finalParams, params), params: {cache: config.apiCache}}); | 50 | + return this.get({data: Object.assign(finalParams, params), param: config.apiCache}); |
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
@@ -61,7 +61,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -61,7 +61,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
61 | data: { | 61 | data: { |
62 | method: 'app.sale.getBreakingSort', | 62 | method: 'app.sale.getBreakingSort', |
63 | yh_channel: yhChannel[tempChannel].channel | 63 | yh_channel: yhChannel[tempChannel].channel |
64 | - }, params: {cache: config.apiCache} | 64 | + }, param: config.apiCache |
65 | }); | 65 | }); |
66 | } | 66 | } |
67 | 67 | ||
@@ -79,7 +79,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -79,7 +79,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
79 | sort: '2', | 79 | sort: '2', |
80 | plateform: '1', | 80 | plateform: '1', |
81 | yh_channel: tempChannel.channel | 81 | yh_channel: tempChannel.channel |
82 | - }, params: {cache: config.apiCache} | 82 | + }, param: config.apiCache |
83 | }); | 83 | }); |
84 | } | 84 | } |
85 | 85 | ||
@@ -93,7 +93,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -93,7 +93,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
93 | data: { | 93 | data: { |
94 | content_code: cCode | 94 | content_code: cCode |
95 | }, | 95 | }, |
96 | - params: {cache: config.apiCache}, | 96 | + param: config.apiCache, |
97 | api: global.yoho.ServiceAPI | 97 | api: global.yoho.ServiceAPI |
98 | }); | 98 | }); |
99 | } | 99 | } |
@@ -106,7 +106,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -106,7 +106,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
106 | return this.get({ | 106 | return this.get({ |
107 | data: { | 107 | data: { |
108 | method: 'app.sort.get' | 108 | method: 'app.sort.get' |
109 | - }, params: {cache: config.apiCache} | 109 | + }, param: config.apiCache |
110 | }); | 110 | }); |
111 | } | 111 | } |
112 | 112 | ||
@@ -126,7 +126,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -126,7 +126,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
126 | data: { | 126 | data: { |
127 | method: 'app.passport.profile', | 127 | method: 'app.passport.profile', |
128 | uid: uid | 128 | uid: uid |
129 | - }, params: {cache: true} | 129 | + }, param: {cache: true} |
130 | }); | 130 | }); |
131 | } | 131 | } |
132 | 132 | ||
@@ -141,7 +141,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -141,7 +141,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
141 | method: 'app.resources.getOneSpecial', | 141 | method: 'app.resources.getOneSpecial', |
142 | special_id: specialId | 142 | special_id: specialId |
143 | }, | 143 | }, |
144 | - params: { | 144 | + param: { |
145 | code: 200, | 145 | code: 200, |
146 | cache: true | 146 | cache: true |
147 | } | 147 | } |
@@ -45,7 +45,7 @@ function getKeyActivityAsync(query) { | @@ -45,7 +45,7 @@ function getKeyActivityAsync(query) { | ||
45 | data: { | 45 | data: { |
46 | method: 'app.search.word', | 46 | method: 'app.search.word', |
47 | query: query | 47 | query: query |
48 | - }, params: { | 48 | + }, param: { |
49 | catch: true, | 49 | catch: true, |
50 | code: 200 | 50 | code: 200 |
51 | } | 51 | } |
@@ -143,7 +143,7 @@ function getSeoProductList(params, from) { | @@ -143,7 +143,7 @@ function getSeoProductList(params, from) { | ||
143 | } | 143 | } |
144 | 144 | ||
145 | function getSortListOrig(finalParams) { | 145 | function getSortListOrig(finalParams) { |
146 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 146 | + return this.get({data: finalParams, param: config.apiCache}); |
147 | } | 147 | } |
148 | 148 | ||
149 | /** | 149 | /** |
@@ -221,7 +221,7 @@ function getSortIntro(params) { | @@ -221,7 +221,7 @@ function getSortIntro(params) { | ||
221 | }; | 221 | }; |
222 | 222 | ||
223 | Object.assign(finalParams, params); | 223 | Object.assign(finalParams, params); |
224 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 224 | + return this.get({data: finalParams, param: config.apiCache}); |
225 | } | 225 | } |
226 | 226 | ||
227 | /** | 227 | /** |
@@ -234,7 +234,7 @@ function getSortAds(params) { | @@ -234,7 +234,7 @@ function getSortAds(params) { | ||
234 | }; | 234 | }; |
235 | 235 | ||
236 | Object.assign(finalParams, params); | 236 | Object.assign(finalParams, params); |
237 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 237 | + return this.get({data: finalParams, param: config.apiCache}); |
238 | } | 238 | } |
239 | 239 | ||
240 | /** | 240 | /** |
@@ -256,7 +256,7 @@ function getBrandShopSeries(params) { | @@ -256,7 +256,7 @@ function getBrandShopSeries(params) { | ||
256 | }); | 256 | }); |
257 | } | 257 | } |
258 | 258 | ||
259 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 259 | + return this.get({data: finalParams, param: config.apiCache}); |
260 | } | 260 | } |
261 | 261 | ||
262 | /** | 262 | /** |
@@ -278,7 +278,7 @@ function getBrandShopFolder(params) { | @@ -278,7 +278,7 @@ function getBrandShopFolder(params) { | ||
278 | }); | 278 | }); |
279 | } | 279 | } |
280 | 280 | ||
281 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 281 | + return this.get({data: finalParams, param: config.apiCache}); |
282 | } | 282 | } |
283 | 283 | ||
284 | /** | 284 | /** |
@@ -292,7 +292,7 @@ function getNodeContent(params) { | @@ -292,7 +292,7 @@ function getNodeContent(params) { | ||
292 | node: params.node || '' | 292 | node: params.node || '' |
293 | }; | 293 | }; |
294 | 294 | ||
295 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 295 | + return this.get({data: finalParams, param: config.apiCache}); |
296 | } | 296 | } |
297 | 297 | ||
298 | /** | 298 | /** |
@@ -306,7 +306,7 @@ function getWeekNew(params) { | @@ -306,7 +306,7 @@ function getWeekNew(params) { | ||
306 | }; | 306 | }; |
307 | 307 | ||
308 | Object.assign(finalParams, params); | 308 | Object.assign(finalParams, params); |
309 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 309 | + return this.get({data: finalParams, param: {cache: config.apiCache}}); |
310 | } | 310 | } |
311 | 311 | ||
312 | function getBrandCouponAsync(brandId, uid) { | 312 | function getBrandCouponAsync(brandId, uid) { |
@@ -321,7 +321,7 @@ function getBrandCouponAsync(brandId, uid) { | @@ -321,7 +321,7 @@ function getBrandCouponAsync(brandId, uid) { | ||
321 | method: 'app.brand.getBrandIntro', | 321 | method: 'app.brand.getBrandIntro', |
322 | brand_id: brandId, | 322 | brand_id: brandId, |
323 | uid: uid | 323 | uid: uid |
324 | - }, params: extra | 324 | + }, param: extra |
325 | }); | 325 | }); |
326 | } | 326 | } |
327 | 327 | ||
@@ -334,7 +334,7 @@ function getBrandShop(query) { | @@ -334,7 +334,7 @@ function getBrandShop(query) { | ||
334 | method: 'web.search.shopListInfo' | 334 | method: 'web.search.shopListInfo' |
335 | }; | 335 | }; |
336 | 336 | ||
337 | - return this.get({data: Object.assign(finalParams, {keyword: query}), params: {cache: config.apiCache}}); | 337 | + return this.get({data: Object.assign(finalParams, {keyword: query}), param: config.apiCache}); |
338 | } | 338 | } |
339 | 339 | ||
340 | /** | 340 | /** |
@@ -401,7 +401,7 @@ function getSuggest(params) { | @@ -401,7 +401,7 @@ function getSuggest(params) { | ||
401 | keyword: params.keyword || '' | 401 | keyword: params.keyword || '' |
402 | }; | 402 | }; |
403 | 403 | ||
404 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 404 | + return this.get({data: finalParams, param: config.apiCache}); |
405 | } | 405 | } |
406 | 406 | ||
407 | 407 | ||
@@ -415,7 +415,7 @@ function getBrandData(params) { | @@ -415,7 +415,7 @@ function getBrandData(params) { | ||
415 | domain: params.domain || '' | 415 | domain: params.domain || '' |
416 | }; | 416 | }; |
417 | 417 | ||
418 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 418 | + return this.get({data: finalParams, param: config.apiCache}); |
419 | } | 419 | } |
420 | 420 | ||
421 | /** | 421 | /** |
@@ -444,7 +444,7 @@ function getShopInfo(shopId, uid) { | @@ -444,7 +444,7 @@ function getShopInfo(shopId, uid) { | ||
444 | uid: uid || 0 | 444 | uid: uid || 0 |
445 | }; | 445 | }; |
446 | 446 | ||
447 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 447 | + return this.get({data: finalParams, param: config.apiCache}); |
448 | 448 | ||
449 | } | 449 | } |
450 | 450 | ||
@@ -454,7 +454,7 @@ function getShopInfo(shopId, uid) { | @@ -454,7 +454,7 @@ function getShopInfo(shopId, uid) { | ||
454 | function getShopBrands(shopId) { | 454 | function getShopBrands(shopId) { |
455 | return this.get({ | 455 | return this.get({ |
456 | data: {method: 'app.shops.getShopsBrands', shop_id: shopId || 0}, | 456 | data: {method: 'app.shops.getShopsBrands', shop_id: shopId || 0}, |
457 | - params: {cache: config.apiCache} | 457 | + param: config.apiCache |
458 | }); | 458 | }); |
459 | } | 459 | } |
460 | 460 | ||
@@ -464,7 +464,7 @@ function getShopBrands(shopId) { | @@ -464,7 +464,7 @@ function getShopBrands(shopId) { | ||
464 | function getShopDecorator(shopId) { | 464 | function getShopDecorator(shopId) { |
465 | return this.get({ | 465 | return this.get({ |
466 | data: {method: 'app.shopsdecorator.getList', shop_id: shopId || 0}, | 466 | data: {method: 'app.shopsdecorator.getList', shop_id: shopId || 0}, |
467 | - params: {cache: config.apiCache} | 467 | + param: config.apiCache |
468 | }); | 468 | }); |
469 | } | 469 | } |
470 | 470 |
@@ -18,7 +18,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -18,7 +18,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
18 | data: { | 18 | data: { |
19 | method: 'app.shopsdecorator.getList', | 19 | method: 'app.shopsdecorator.getList', |
20 | shop_id: shopId | 20 | shop_id: shopId |
21 | - }, params: {cache: config.apiCache} | 21 | + }, param: config.apiCache |
22 | }); | 22 | }); |
23 | } | 23 | } |
24 | 24 | ||
@@ -39,7 +39,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -39,7 +39,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
39 | method: 'shop.coupons.list', | 39 | method: 'shop.coupons.list', |
40 | shop_id: shopId, | 40 | shop_id: shopId, |
41 | uid: uid | 41 | uid: uid |
42 | - }, params: extra | 42 | + }, param: extra |
43 | }); | 43 | }); |
44 | } | 44 | } |
45 | 45 | ||
@@ -75,7 +75,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -75,7 +75,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
75 | 75 | ||
76 | return this.get({ | 76 | return this.get({ |
77 | data: finalParams, | 77 | data: finalParams, |
78 | - params: {cache: config.apiCache} | 78 | + param: config.apiCache |
79 | }); | 79 | }); |
80 | } | 80 | } |
81 | }; | 81 | }; |
@@ -22,7 +22,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -22,7 +22,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
22 | */ | 22 | */ |
23 | getVerifiedTotal() { | 23 | getVerifiedTotal() { |
24 | 24 | ||
25 | - return this.get({data: {method: 'app.student.verifiedStudentTotal'}, params: {cache: config.apiCache}}); | 25 | + return this.get({data: {method: 'app.student.verifiedStudentTotal'}, param: config.apiCache}); |
26 | } | 26 | } |
27 | 27 | ||
28 | /** | 28 | /** |
@@ -31,7 +31,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -31,7 +31,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
31 | */ | 31 | */ |
32 | getEduLevelList() { | 32 | getEduLevelList() { |
33 | 33 | ||
34 | - return this.get({data: {method: 'app.studentMarket.getEducationLevelList'}, params: {cache: config.apiCache}}); | 34 | + return this.get({data: {method: 'app.studentMarket.getEducationLevelList'}, param: config.apiCache}); |
35 | } | 35 | } |
36 | 36 | ||
37 | /** | 37 | /** |
@@ -43,7 +43,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -43,7 +43,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
43 | method: 'app.studentMarket.getAddressList' | 43 | method: 'app.studentMarket.getAddressList' |
44 | }; | 44 | }; |
45 | 45 | ||
46 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 46 | + return this.get({data: finalParams, param: config.apiCache}); |
47 | } | 47 | } |
48 | 48 | ||
49 | /** | 49 | /** |
@@ -56,7 +56,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -56,7 +56,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
56 | areaCode: areaCode | 56 | areaCode: areaCode |
57 | }; | 57 | }; |
58 | 58 | ||
59 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 59 | + return this.get({data: finalParams, param: config.apiCache}); |
60 | } | 60 | } |
61 | 61 | ||
62 | /** | 62 | /** |
@@ -71,7 +71,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -71,7 +71,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
71 | }; | 71 | }; |
72 | 72 | ||
73 | Object.assign(finalParams, params); | 73 | Object.assign(finalParams, params); |
74 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 74 | + return this.get({data: finalParams, param: config.apiCache}); |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
@@ -87,7 +87,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -87,7 +87,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
87 | page_url: pageUrl | 87 | page_url: pageUrl |
88 | }; | 88 | }; |
89 | 89 | ||
90 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 90 | + return this.get({data: finalParams, param: config.apiCache}); |
91 | } | 91 | } |
92 | 92 | ||
93 | /** | 93 | /** |
@@ -104,7 +104,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -104,7 +104,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
104 | enrollment_year: enrollmentYear | 104 | enrollment_year: enrollmentYear |
105 | }; | 105 | }; |
106 | 106 | ||
107 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 107 | + return this.get({data: finalParams, param: config.apiCache}); |
108 | } | 108 | } |
109 | 109 | ||
110 | /** | 110 | /** |
@@ -122,7 +122,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -122,7 +122,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
122 | finalParams.uid = uid; | 122 | finalParams.uid = uid; |
123 | } | 123 | } |
124 | 124 | ||
125 | - return this.get({data: finalParams, params: {cache: config.apiCache}}); | 125 | + return this.get({data: finalParams, param: config.apiCache}); |
126 | } | 126 | } |
127 | 127 | ||
128 | 128 |
-
Please register or login to post a comment