Merge branch 'feature/searchOptimi' into release/5.5
Showing
1 changed file
with
5 additions
and
2 deletions
@@ -457,7 +457,7 @@ function search(opt) { | @@ -457,7 +457,7 @@ function search(opt) { | ||
457 | 457 | ||
458 | if (nav.reload) { | 458 | if (nav.reload) { |
459 | 459 | ||
460 | - var goodList = []; | 460 | + var goodList = [], wordContents = []; |
461 | 461 | ||
462 | $(data).each(function(i, goodInfo) { | 462 | $(data).each(function(i, goodInfo) { |
463 | if ($(goodInfo).hasClass('good-info')) { | 463 | if ($(goodInfo).hasClass('good-info')) { |
@@ -465,7 +465,10 @@ function search(opt) { | @@ -465,7 +465,10 @@ function search(opt) { | ||
465 | goodIds.push($(goodInfo).data('good-id')); | 465 | goodIds.push($(goodInfo).data('good-id')); |
466 | } else if ($(goodInfo).hasClass('total')) { | 466 | } else if ($(goodInfo).hasClass('total')) { |
467 | total = $(goodInfo).data('id'); | 467 | total = $(goodInfo).data('id'); |
468 | + } else if ($(goodInfo).hasClass('word-content')) { | ||
469 | + wordContents.push(goodInfo); | ||
468 | } | 470 | } |
471 | + | ||
469 | }); | 472 | }); |
470 | 473 | ||
471 | yasparm = Object.assign(yasparm, { | 474 | yasparm = Object.assign(yasparm, { |
@@ -489,7 +492,7 @@ function search(opt) { | @@ -489,7 +492,7 @@ function search(opt) { | ||
489 | goodList.splice(0, 4); | 492 | goodList.splice(0, 4); |
490 | $container.append(goodList); | 493 | $container.append(goodList); |
491 | } else { | 494 | } else { |
492 | - $container.html(goodList); | 495 | + $container.html([].concat(wordContents, goodList)); |
493 | } | 496 | } |
494 | lazyLoad($container.find('.lazy')); | 497 | lazyLoad($container.find('.lazy')); |
495 | } else { | 498 | } else { |
-
Please register or login to post a comment