Authored by 周少峰

Merge branch 'release/5.4' into gray

@@ -263,7 +263,7 @@ @@ -263,7 +263,7 @@
263 </div> 263 </div>
264 <ul id="balance-detail" class="balance-detail right"> 264 <ul id="balance-detail" class="balance-detail right">
265 <li class="gain-coin"> 265 <li class="gain-coin">
266 - <a class="gain-coin-tip" href="/help/?category_id=87" target="_blank"></a> 266 + <a class="gain-coin-tip" href="/help/detail?id=105" target="_blank"></a>
267 共返YOHO币:{{gain_yoho_coin}} 267 共返YOHO币:{{gain_yoho_coin}}
268 </li> 268 </li>
269 {{#each promotion_formula_list}} 269 {{#each promotion_formula_list}}
@@ -326,7 +326,7 @@ @@ -326,7 +326,7 @@
326 <p class="btns"> 326 <p class="btns">
327 <span id="coin-sure" class="coin-sure sure-btn">确定</span> 327 <span id="coin-sure" class="coin-sure sure-btn">确定</span>
328 <span id="coin-cancel" class="coin-cancel cancel-btn">取消</span> 328 <span id="coin-cancel" class="coin-cancel cancel-btn">取消</span>
329 - <a href="/help/?category_id=87" class="coin-help" target="_blank">有货币使用规则?</a> 329 + <a href="/help/detail?id=105" class="coin-help" target="_blank">有货币使用规则?</a>
330 </p> 330 </p>
331 </div> 331 </div>
332 <input id="coin-used" type="hidden" data-coin="{{usedCoinNum}}" data-max={{canUseCoinNum}}> 332 <input id="coin-used" type="hidden" data-coin="{{usedCoinNum}}" data-max={{canUseCoinNum}}>
@@ -40,7 +40,7 @@ const currencyData = (uid, condition)=>{ @@ -40,7 +40,7 @@ const currencyData = (uid, condition)=>{
40 let currency = yield currencyList(uid, condition); 40 let currency = yield currencyList(uid, condition);
41 result.currency = currency.list; 41 result.currency = currency.list;
42 result.pager = currency.pager; 42 result.pager = currency.pager;
43 - result.coinHelperUrl = '//www.yohobuy.com/help/?category_id=87';// yoho币帮助 43 + result.coinHelperUrl = '//www.yohobuy.com/help/detail?id=105';// yoho币帮助
44 result.tabs = currencyTabs(condition.queryType); 44 result.tabs = currencyTabs(condition.queryType);
45 result.options = currencyOptions(condition); 45 result.options = currencyOptions(condition);
46 return result; 46 return result;
@@ -230,7 +230,7 @@ @@ -230,7 +230,7 @@
230 </table> 230 </table>
231 <div class="order-balance"> 231 <div class="order-balance">
232 <p class="back-coin"> 232 <p class="back-coin">
233 - <a href="/help/?category_id=87" class="yoho-coin" target="_blank"></a>共返YOHO币:{{totalYoho}}个 233 + <a href="/help/detail?id=105" class="yoho-coin" target="_blank"></a>共返YOHO币:{{totalYoho}}个
234 </p> 234 </p>
235 {{#each orderBalance}} 235 {{#each orderBalance}}
236 <p> 236 <p>
@@ -85,7 +85,7 @@ let index = (req, res, next) => { @@ -85,7 +85,7 @@ let index = (req, res, next) => {
85 location: area || '+86', 85 location: area || '+86',
86 defaultMobile: mobile, 86 defaultMobile: mobile,
87 captchaUrl: helpers.urlFormat('/passport/imagesNode', {t: Date.now()}), 87 captchaUrl: helpers.urlFormat('/passport/imagesNode', {t: Date.now()}),
88 - itemUrl: helpers.urlFormat('/help/', {category_id: 143}), 88 + itemUrl: helpers.urlFormat('/help/detail', {id: 103, contId: 197}),
89 referUrl: refer, 89 referUrl: refer,
90 loginUrl: helpers.urlFormat('/signin.html', {refer: refer}), 90 loginUrl: helpers.urlFormat('/signin.html', {refer: refer}),
91 coverHref: result.url, 91 coverHref: result.url,
@@ -153,14 +153,19 @@ const index = (req) => { @@ -153,14 +153,19 @@ const index = (req) => {
153 yh_channel: channelMap[channel].yh_channel, 153 yh_channel: channelMap[channel].yh_channel,
154 uid: req.user.uid || '' 154 uid: req.user.uid || ''
155 }; 155 };
  156 +
156 let shopParams = Object.assign({}, params, {contentCode: channelMap[channel].code}); 157 let shopParams = Object.assign({}, params, {contentCode: channelMap[channel].code});
157 - let recParams = Object.assign({}, params); 158 + let recParams = Object.assign({}, params, {
  159 + sort: req.query.sort || '',
  160 + page: req.query.page || 1
  161 + });
158 162
159 let apiMethod = [ 163 let apiMethod = [
160 headerModel.requestHeaderData(channel), 164 headerModel.requestHeaderData(channel),
161 api.recShop(shopParams), 165 api.recShop(shopParams),
162 api.recBrand(params), 166 api.recBrand(params),
163 - api.recList(recParams) 167 + api.recList(Object.assign({}, params)),//获取品类
  168 + api.recList(recParams)//获取商品数据
164 ]; 169 ];
165 170
166 return Promise.all(apiMethod).then(result => { 171 return Promise.all(apiMethod).then(result => {
@@ -253,21 +258,31 @@ const index = (req) => { @@ -253,21 +258,31 @@ const index = (req) => {
253 // 推荐品类 258 // 推荐品类
254 _.forEach(groupSort, group =>{ 259 _.forEach(groupSort, group =>{
255 _.forEach(group.sub, subSort =>{ 260 _.forEach(group.sub, subSort =>{
256 - if (ctyList.length < 20) {  
257 - ctyList.push({ 261 + let cateObj = {
258 cateId: subSort.category_id, 262 cateId: subSort.category_id,
259 url: publicHandler.handleFilterUrl(params, {sort: subSort.relation_parameter.sort}), 263 url: publicHandler.handleFilterUrl(params, {sort: subSort.relation_parameter.sort}),
260 - name: subSort.category_name  
261 - }); 264 + name: subSort.category_name,
  265 + active: false
  266 + };
  267 +
  268 + if (ctyList.length < 20) {
  269 + //默认选中判断
  270 + if (req.query.sort === subSort.relation_parameter.sort) {
  271 + cateObj.active = true;
  272 + }
  273 + ctyList.push(cateObj);
262 } else { 274 } else {
263 return true; 275 return true;
264 } 276 }
265 }); 277 });
266 }); 278 });
267 Object.assign(respData.newProduct.ctyList, ctyList); 279 Object.assign(respData.newProduct.ctyList, ctyList);
  280 + }
268 281
  282 + // 最新上架
  283 + if (result[4].code === 200 && result[4].data) {
269 // 列表数据 284 // 列表数据
270 - Object.assign(respData.newProduct, _proListHandler(result[3].data, 285 + Object.assign(respData.newProduct, _proListHandler(result[4].data,
271 Object.assign({}, recParams, {channel: channel}))); 286 Object.assign({}, recParams, {channel: channel})));
272 } 287 }
273 288
@@ -94,7 +94,7 @@ @@ -94,7 +94,7 @@
94 签收商品未经穿着不影响二次销售的情况下,7日内退货,15日内换货; 94 签收商品未经穿着不影响二次销售的情况下,7日内退货,15日内换货;
95 退回商品保证吊牌、标签、包装完整,详情点击 95 退回商品保证吊牌、标签、包装完整,详情点击
96 <br /> 96 <br />
97 - <a href="http://www.yohobuy.com/help/?category_id=69" 97 + <a href="http://www.yohobuy.com/help/detail?id=49"
98 target="_blank">&gt;&gt;退换货政策</a> 98 target="_blank">&gt;&gt;退换货政策</a>
99 </span> 99 </span>
100 </span> 100 </span>
@@ -206,19 +206,19 @@ @@ -206,19 +206,19 @@
206 <ul class="clearfix"> 206 <ul class="clearfix">
207 <li class="left"> 207 <li class="left">
208 <p> 208 <p>
209 - <span>新手指南</span> 209 + <span>新手专区</span>
210 </p> 210 </p>
211 <p> 211 <p>
212 - <a href="//www.yohobuy.com/help/?category_id=81#help_b00reg" target="_blank">注册登录</a> 212 + <a href="//www.yohobuy.com/help/detail?id=25" target="_blank">注册登录</a>
213 </p> 213 </p>
214 <p> 214 <p>
215 - <a href="//www.yohobuy.com/help/?category_id=83" target="_blank">选购商品</a> 215 + <a href="//www.yohobuy.com/help/detail?id=27" target="_blank">购物结算</a>
216 </p> 216 </p>
217 <p> 217 <p>
218 - <a href="//www.yohobuy.com/help/?category_id=103" target="_blank">单支付</a> 218 + <a href="//www.yohobuy.com/help/detail?id=29" target="_blank">单支付</a>
219 </p> 219 </p>
220 <p> 220 <p>
221 - <a href="//www.yohobuy.com/help/?category_id=85" target="_blank">收货退款</a> 221 + <a href="//www.yohobuy.com/help/detail?id=31" target="_blank">收货评价</a>
222 </p> 222 </p>
223 </li> 223 </li>
224 <li class="left"> 224 <li class="left">
@@ -226,16 +226,16 @@ @@ -226,16 +226,16 @@
226 <span>会员中心</span> 226 <span>会员中心</span>
227 </p> 227 </p>
228 <p> 228 <p>
229 - <a href="//www.yohobuy.com/help/?category_id=87" target="_blank">有货币</a> 229 + <a href="//www.yohobuy.com/help/detail?id=7" target="_blank">会员制度</a>
230 </p> 230 </p>
231 <p> 231 <p>
232 - <a href="//www.yohobuy.com/help/?category_id=91" target="_blank">会员制度</a> 232 + <a href="//www.yohobuy.com/help/detail?id=9" target="_blank">会员优惠</a>
233 </p> 233 </p>
234 <p> 234 <p>
235 - <a href="//www.yohobuy.com/help/?category_id=89" target="_blank">账户管理</a> 235 + <a href="//www.yohobuy.com/help/detail?id=11" target="_blank">账户管理</a>
236 </p> 236 </p>
237 <p> 237 <p>
238 - <a href="//www.yohobuy.com/help/?category_id=93" target="_blank">密码管理</a> 238 + <a href="//www.yohobuy.com/help/detail?id=13" target="_blank">密码管理</a>
239 </p> 239 </p>
240 </li> 240 </li>
241 <li class="left"> 241 <li class="left">
@@ -243,16 +243,16 @@ @@ -243,16 +243,16 @@
243 <span>购物指南</span> 243 <span>购物指南</span>
244 </p> 244 </p>
245 <p> 245 <p>
246 - <a href="//www.yohobuy.com/help/?category_id=95" target="_blank">全球购专区</a> 246 + <a href="//www.yohobuy.com/help/detail?id=33" target="_blank">发票</a>
247 </p> 247 </p>
248 <p> 248 <p>
249 - <a href="//www.yohobuy.com/help/?category_id=97" target="_blank">尺码选择</a> 249 + <a href="//www.yohobuy.com/help/detail?id=35" target="_blank">尺码对照</a>
250 </p> 250 </p>
251 <p> 251 <p>
252 - <a href="//www.yohobuy.com/help/?category_id=99" target="_blank">发票</a> 252 + <a href="//www.yohobuy.com/help/detail?id=37" target="_blank">尺码解读</a>
253 </p> 253 </p>
254 <p> 254 <p>
255 - <a href="//www.yohobuy.com/help/?category_id=101" target="_blank">商品咨询</a> 255 + <a href="//www.yohobuy.com/help/detail?id=39" target="_blank">商品咨询</a>
256 </p> 256 </p>
257 </li> 257 </li>
258 <li class="left"> 258 <li class="left">
@@ -260,16 +260,16 @@ @@ -260,16 +260,16 @@
260 <span>支付方式</span> 260 <span>支付方式</span>
261 </p> 261 </p>
262 <p> 262 <p>
263 - <a href="//www.yohobuy.com/help/?category_id=105" target="_blank">在线支付</a> 263 + <a href="//www.yohobuy.com/help/detail?id=43" target="_blank">在线支付</a>
264 </p> 264 </p>
265 <p> 265 <p>
266 - <a href="//www.yohobuy.com/help/?category_id=107" target="_blank">货到付款</a> 266 + <a href="//www.yohobuy.com/help/detail?id=45" target="_blank">货到付款</a>
267 </p> 267 </p>
268 <p> 268 <p>
269 - <a href="//www.yohobuy.com/help/?category_id=109" target="_blank">优惠券</a> 269 + <a href="//www.yohobuy.com/help/detail?id=47" target="_blank">分期支付</a>
270 </p> 270 </p>
271 <p> 271 <p>
272 - <a href="//www.yohobuy.com/help/?category_id=111" target="_blank">有货币支付</a> 272 + <a href="//www.yohobuy.com/help/detail?id=105" target="_blank">优惠券、有货币</a>
273 </p> 273 </p>
274 </li> 274 </li>
275 <li class="left"> 275 <li class="left">
@@ -277,16 +277,16 @@ @@ -277,16 +277,16 @@
277 <span>配送方式</span> 277 <span>配送方式</span>
278 </p> 278 </p>
279 <p> 279 <p>
280 - <a href="//www.yohobuy.com/help/?category_id=113" target="_blank">配送时间</a> 280 + <a href="//www.yohobuy.com/help/detail?id=109" target="_blank">配送说明</a>
281 </p> 281 </p>
282 <p> 282 <p>
283 - <a href="//www.yohobuy.com/help/?category_id=115" target="_blank">配送范围</a> 283 + <a href="//www.yohobuy.com/help/detail?id=111" target="_blank">运费说明</a>
284 </p> 284 </p>
285 <p> 285 <p>
286 - <a href="//www.yohobuy.com/help/?category_id=119" target="_blank">顺丰速运</a> 286 + <a href="//www.yohobuy.com/help/detail?id=113" target="_blank">验货签收</a>
287 </p> 287 </p>
288 <p> 288 <p>
289 - <a href="//www.yohobuy.com/help/?category_id=117" target="_blank">商品验收与签收</a> 289 + <a href="//www.yohobuy.com/help/detail?id=115" target="_blank">收货样品</a>
290 </p> 290 </p>
291 </li> 291 </li>
292 <li class="left"> 292 <li class="left">
@@ -294,16 +294,16 @@ @@ -294,16 +294,16 @@
294 <span>售后服务</span> 294 <span>售后服务</span>
295 </p> 295 </p>
296 <p> 296 <p>
297 - <a href="//www.yohobuy.com/help/?category_id=121" target="_blank">退换货政策</a> 297 + <a href="//www.yohobuy.com/help/detail?id=49" target="_blank">退换货政策</a>
298 </p> 298 </p>
299 <p> 299 <p>
300 - <a href="//www.yohobuy.com/help/?category_id=123" target="_blank">退换货流程</a> 300 + <a href="//www.yohobuy.com/help/detail?id=51" target="_blank">退换货流程</a>
301 </p> 301 </p>
302 <p> 302 <p>
303 - <a href="//www.yohobuy.com/help/?category_id=125" target="_blank">退款方式与时效</a> 303 + <a href="//www.yohobuy.com/help/detail?id=53" target="_blank">时效承诺</a>
304 </p> 304 </p>
305 <p> 305 <p>
306 - <a href="//www.yohobuy.com/help/?category_id=127" target="_blank">投诉与建议</a> 306 + <a href="//www.yohobuy.com/help/detail?id=55" target="_blank">投诉与建议</a>
307 </p> 307 </p>
308 </li> 308 </li>
309 <li class="left"> 309 <li class="left">
@@ -311,16 +311,16 @@ @@ -311,16 +311,16 @@
311 <span>APP常见问题</span> 311 <span>APP常见问题</span>
312 </p> 312 </p>
313 <p> 313 <p>
314 - <a href="//www.yohobuy.com/help/?category_id=133" target="_blank">IPhone版</a> 314 + <a href="//www.yohobuy.com/help/detail?id=57" target="_blank">IPhone版</a>
315 </p> 315 </p>
316 <p> 316 <p>
317 - <a href="//www.yohobuy.com/help/?category_id=135" target="_blank">Android版</a> 317 + <a href="//www.yohobuy.com/help/detail?id=59" target="_blank">Android版</a>
318 </p> 318 </p>
319 <p> 319 <p>
320 - <a href="//www.yohobuy.com/help/?category_id=137" target="_blank">wap版</a> 320 + <a href="//www.yohobuy.com/help/detail?id=61" target="_blank">wap版</a>
321 </p> 321 </p>
322 <p> 322 <p>
323 - <a href="//www.yohobuy.com/help/?category_id=139" target="_blank">IPAD版</a> 323 + <a href="//www.yohobuy.com/help/detail?id=63" target="_blank">IPAD版</a>
324 </p> 324 </p>
325 </li> 325 </li>
326 </ul> 326 </ul>