Showing
1 changed file
with
21 additions
and
3 deletions
@@ -333,7 +333,7 @@ exports.handleOptsData = (params, total, extra) => { | @@ -333,7 +333,7 @@ exports.handleOptsData = (params, total, extra) => { | ||
333 | }; | 333 | }; |
334 | 334 | ||
335 | // 用来标记是否是折扣专场,折扣专场只需要前三个排序参数 | 335 | // 用来标记是否是折扣专场,折扣专场只需要前三个排序参数 |
336 | - let count = (extra === 'discont') ? 3 : 4; | 336 | + let count = (extra === 'discont') ? 4 : 5; |
337 | 337 | ||
338 | for (let i = 0; i < count; i++) { | 338 | for (let i = 0; i < count; i++) { |
339 | let opt = {}; | 339 | let opt = {}; |
@@ -358,6 +358,24 @@ exports.handleOptsData = (params, total, extra) => { | @@ -358,6 +358,24 @@ exports.handleOptsData = (params, total, extra) => { | ||
358 | } | 358 | } |
359 | break; | 359 | break; |
360 | case 1: | 360 | case 1: |
361 | + if (params.order !== 'h_v_desc' && params.order !== 'h_v_asc') { | ||
362 | + opt.href = handleFilterUrl(params, {order: 'h_v_desc'}, {page: true}); | ||
363 | + opt.hasSortOrient = true; | ||
364 | + } else { | ||
365 | + opt.hasSortOrient = true; | ||
366 | + opt.active = true; | ||
367 | + if (params.order === 'h_v_desc') { | ||
368 | + opt.href = handleFilterUrl(params, {order: 'h_v_asc'}, {page: true}); | ||
369 | + opt.desc = false; | ||
370 | + } else { | ||
371 | + opt.href = handleFilterUrl(params, {order: 'h_v_desc'}, {page: true}); | ||
372 | + opt.desc = true; | ||
373 | + } | ||
374 | + } | ||
375 | + | ||
376 | + opt.name = '人气'; | ||
377 | + break; | ||
378 | + case 2: | ||
361 | if (params.order !== 's_t_desc' && params.order !== 's_t_asc') { | 379 | if (params.order !== 's_t_desc' && params.order !== 's_t_asc') { |
362 | opt.href = handleFilterUrl(params, {order: 's_t_desc'}, {page: true}); | 380 | opt.href = handleFilterUrl(params, {order: 's_t_desc'}, {page: true}); |
363 | opt.hasSortOrient = true; | 381 | opt.hasSortOrient = true; |
@@ -375,7 +393,7 @@ exports.handleOptsData = (params, total, extra) => { | @@ -375,7 +393,7 @@ exports.handleOptsData = (params, total, extra) => { | ||
375 | 393 | ||
376 | opt.name = '最新'; | 394 | opt.name = '最新'; |
377 | break; | 395 | break; |
378 | - case 2: | 396 | + case 3: |
379 | if (params.order !== 's_p_desc' && params.order !== 's_p_asc') { | 397 | if (params.order !== 's_p_desc' && params.order !== 's_p_asc') { |
380 | opt.href = handleFilterUrl(params, {order: 's_p_desc'}, {page: true}); | 398 | opt.href = handleFilterUrl(params, {order: 's_p_desc'}, {page: true}); |
381 | opt.hasSortOrient = true; | 399 | opt.hasSortOrient = true; |
@@ -393,7 +411,7 @@ exports.handleOptsData = (params, total, extra) => { | @@ -393,7 +411,7 @@ exports.handleOptsData = (params, total, extra) => { | ||
393 | 411 | ||
394 | opt.name = '价格'; | 412 | opt.name = '价格'; |
395 | break; | 413 | break; |
396 | - case 3: | 414 | + case 4: |
397 | if (params.order !== 'p_d_desc' && params.order !== 'p_d_asc') { | 415 | if (params.order !== 'p_d_desc' && params.order !== 'p_d_asc') { |
398 | opt.href = handleFilterUrl(params, {order: 'p_d_desc'}, {page: true}); | 416 | opt.href = handleFilterUrl(params, {order: 'p_d_desc'}, {page: true}); |
399 | opt.hasSortOrient = true; | 417 | opt.hasSortOrient = true; |
-
Please register or login to post a comment