Showing
1 changed file
with
10 additions
and
6 deletions
@@ -110,13 +110,16 @@ const getFilterData = (params) => { | @@ -110,13 +110,16 @@ const getFilterData = (params) => { | ||
110 | * method=app.newproduct.recshop 推荐店铺 | 110 | * method=app.newproduct.recshop 推荐店铺 |
111 | * http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/BigData/新品到着.md | 111 | * http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/BigData/新品到着.md |
112 | */ | 112 | */ |
113 | -const recommendShops = (uid, channel, limit, page) => { | 113 | +const indexData = (uid, channel, limit, page) => { |
114 | + let yh_channel = searchProcess.getChannelType(channel); | ||
115 | + | ||
114 | limit = limit || 20; | 116 | limit = limit || 20; |
115 | page = page || 1; | 117 | page = page || 1; |
116 | 118 | ||
117 | let params = { | 119 | let params = { |
118 | method: 'app.newproduct.recshop', | 120 | method: 'app.newproduct.recshop', |
119 | - channel, | 121 | + yh_channel, |
122 | + contentCode: contentCode.newV2[channel], | ||
120 | limit, | 123 | limit, |
121 | page, | 124 | page, |
122 | uid | 125 | uid |
@@ -137,12 +140,14 @@ const recommendShops = (uid, channel, limit, page) => { | @@ -137,12 +140,14 @@ const recommendShops = (uid, channel, limit, page) => { | ||
137 | * http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/BigData/新品到着.md | 140 | * http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/BigData/新品到着.md |
138 | */ | 141 | */ |
139 | const recbrand = (uid, channel, limit, page) => { | 142 | const recbrand = (uid, channel, limit, page) => { |
143 | + let yh_channel = searchProcess.getChannelType(channel); | ||
144 | + | ||
140 | limit = limit || 20; | 145 | limit = limit || 20; |
141 | page = page || 1; | 146 | page = page || 1; |
142 | 147 | ||
143 | let params = { | 148 | let params = { |
144 | method: 'app.newproduct.recbrand', | 149 | method: 'app.newproduct.recbrand', |
145 | - channel, | 150 | + yh_channel, |
146 | limit, | 151 | limit, |
147 | page, | 152 | page, |
148 | uid | 153 | uid |
@@ -175,8 +180,6 @@ const newGoodsAPI = (params) => { | @@ -175,8 +180,6 @@ const newGoodsAPI = (params) => { | ||
175 | limit: '60' | 180 | limit: '60' |
176 | }, params); | 181 | }, params); |
177 | 182 | ||
178 | - params.order = params.order === '0' ? 's_t_desc' : 's_t_asc'; | ||
179 | - | ||
180 | return api.get('', _.assign({ | 183 | return api.get('', _.assign({ |
181 | method: method | 184 | method: method |
182 | }, params), { | 185 | }, params), { |
@@ -199,6 +202,7 @@ const reclist = (uid, channel, searchOptions) => { | @@ -199,6 +202,7 @@ const reclist = (uid, channel, searchOptions) => { | ||
199 | 202 | ||
200 | if (parseInt(params.page, 10) === 1) { | 203 | if (parseInt(params.page, 10) === 1) { |
201 | newList.total = result.data.total; | 204 | newList.total = result.data.total; |
205 | + newList.pageTotal = result.data.page_total; | ||
202 | } | 206 | } |
203 | 207 | ||
204 | return newList; | 208 | return newList; |
@@ -227,7 +231,7 @@ module.exports = { | @@ -227,7 +231,7 @@ module.exports = { | ||
227 | getSearchData, // TODO remove | 231 | getSearchData, // TODO remove |
228 | getFilterData, // TODO remove | 232 | getFilterData, // TODO remove |
229 | 233 | ||
230 | - recommendShops, | 234 | + indexData, |
231 | recbrand, | 235 | recbrand, |
232 | reclist, | 236 | reclist, |
233 | reclistFilter | 237 | reclistFilter |
-
Please register or login to post a comment