Authored by lore-w

code review by liuyue

@@ -12,7 +12,15 @@ @@ -12,7 +12,15 @@
12 {{#if searchListPage}} 12 {{#if searchListPage}}
13 <script> 13 <script>
14 seajs.use(['js/product/list', 'js/product/product'], function (list, product) { 14 seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
  15 +
  16 + $(window).resize(function () {
  17 + setTimeout(function () {
  18 + function () {
15 product.init(5); 19 product.init(5);
  20 + }
  21 + }, 300);
  22 + });
  23 +
16 }); 24 });
17 </script> 25 </script>
18 {{/if}} 26 {{/if}}
@@ -21,7 +29,15 @@ @@ -21,7 +29,15 @@
21 {{#if productListPage}} 29 {{#if productListPage}}
22 <script> 30 <script>
23 seajs.use(['js/product/list', 'js/product/product'], function (list, product) { 31 seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
  32 +
  33 + $(window).resize(function () {
  34 + setTimeout(function () {
  35 + function () {
24 product.init(4); 36 product.init(4);
  37 + }
  38 + }, 300);
  39 + });
  40 +
25 }); 41 });
26 </script> 42 </script>
27 {{/if}} 43 {{/if}}
@@ -24,6 +24,8 @@ lazyLoad($('img.lazy')); @@ -24,6 +24,8 @@ lazyLoad($('img.lazy'));
24 */ 24 */
25 exports.init = function(num) { 25 exports.init = function(num) {
26 26
  27 + productList = null;
  28 +
27 productList = productEvent($goodItem, num); 29 productList = productEvent($goodItem, num);
28 30
29 /** 31 /**
@@ -6,7 +6,6 @@ @@ -6,7 +6,6 @@
6 6
7 .product-search-page { 7 .product-search-page {
8 8
9 - //todo  
10 9
11 .goods-container { 10 .goods-container {
12 height: auto; 11 height: auto;
@@ -15,3 +14,30 @@ @@ -15,3 +14,30 @@
15 width: 1150px + 10px;//每列增加右边距 14 width: 1150px + 10px;//每列增加右边距
16 } 15 }
17 } 16 }
  17 +
  18 +
  19 +/*990px*/
  20 +@media (max-width: 1180px) {
  21 + .product-search-page {
  22 +
  23 + .goods-container {
  24 + height: auto;
  25 + padding-top: 25px;
  26 + position: relative;
  27 + width: 990px + 10px; //每列增加右边距
  28 +
  29 + .good-info {
  30 + width: 190px;
  31 +
  32 + .good-detail-img {
  33 + height: 255px;
  34 + }
  35 + }
  36 +
  37 + .block-next-page {
  38 + width: 190px;
  39 + height: 255px;
  40 + }
  41 + }
  42 + }
  43 +}