Authored by ccbikai

Merge branch 'feature/sale' into release/1.0

@@ -26,7 +26,6 @@ @@ -26,7 +26,6 @@
26 </li> 26 </li>
27 </ul> 27 </ul>
28 <div class="sub-size"> 28 <div class="sub-size">
29 - {{log this}}  
30 {{# sub}} 29 {{# sub}}
31 <div class="size-area"> 30 <div class="size-area">
32 <div class="swiper-size" id="size-swiper-{{key}}" {{#if @first}}style="display:block"{{/if}}> 31 <div class="swiper-size" id="size-swiper-{{key}}" {{#if @first}}style="display:block"{{/if}}>
@@ -3,14 +3,14 @@ @@ -3,14 +3,14 @@
3 <div class="left-container"> 3 <div class="left-container">
4 {{# left}} 4 {{# left}}
5 <a href="{{url}}"> 5 <a href="{{url}}">
6 - <div class="thumb-row-box left-thumb-row-box" style="background-image:url({{image src 275 160}})"></div> 6 + <div class="thumb-row-box left-thumb-row-box" style="background-image:url({{image src 276 296}})"></div>
7 </a> 7 </a>
8 {{/ left}} 8 {{/ left}}
9 </div> 9 </div>
10 <div class="right-container"> 10 <div class="right-container">
11 {{# right}} 11 {{# right}}
12 <a href="{{url}}"> 12 <a href="{{url}}">
13 - <div class="thumb-row-box right-thumb-row-box {{#if @first}}first{{/if}}" style="background-image:url({{image src 275 160}})"></div> 13 + <div class="thumb-row-box right-thumb-row-box {{#if @first}}first{{/if}}" style="background-image:url({{image src 276 134}})"></div>
14 </a> 14 </a>
15 {{/ right}} 15 {{/ right}}
16 </div> 16 </div>
@@ -292,6 +292,13 @@ function search(opt) { @@ -292,6 +292,13 @@ function search(opt) {
292 } 292 }
293 } 293 }
294 294
  295 + $('.good-detail-text .name').each(function() {
  296 + var $this = $(this),
  297 + $title = $this.find('a');
  298 +
  299 + $title[0].mlellipsis(2);
  300 + });
  301 +
295 nav.reload = false; 302 nav.reload = false;
296 nav.page = page; 303 nav.page = page;
297 304
@@ -299,13 +306,6 @@ function search(opt) { @@ -299,13 +306,6 @@ function search(opt) {
299 loading.hideLoadingMask(); 306 loading.hideLoadingMask();
300 307
301 window.rePosFooter(); 308 window.rePosFooter();
302 -  
303 - $('.good-detail-text .name').each(function() {  
304 - var $this = $(this),  
305 - $title = $this.find('a');  
306 -  
307 - $title[0].mlellipsis(2);  
308 - });  
309 }, 309 },
310 error: function() { 310 error: function() {
311 tip.show('网络断开连接了~'); 311 tip.show('网络断开连接了~');
@@ -318,14 +318,14 @@ function search(opt) { @@ -318,14 +318,14 @@ function search(opt) {
318 318
319 319
320 // 筛选初始化 320 // 筛选初始化
321 -function filterInit() { 321 +function filterInit(option) {
322 322
323 $.ajax({ 323 $.ajax({
324 type: 'GET', 324 type: 'GET',
325 url: '/product/sale/filter', 325 url: '/product/sale/filter',
326 data: $.extend(defaultOpt, { 326 data: $.extend(defaultOpt, {
327 saleType: '1' 327 saleType: '1'
328 - }), 328 + }, option),
329 success: function(data) { 329 success: function(data) {
330 330
331 if ($filterMask) { 331 if ($filterMask) {
@@ -353,8 +353,6 @@ function filterInit() { @@ -353,8 +353,6 @@ function filterInit() {
353 }); 353 });
354 } 354 }
355 355
356 -filterInit();  
357 -  
358 lazyLoad($('.lazy')); 356 lazyLoad($('.lazy'));
359 357
360 $listNav.bind('contextmenu', function() { 358 $listNav.bind('contextmenu', function() {
@@ -534,6 +532,11 @@ $(function() { @@ -534,6 +532,11 @@ $(function() {
534 $selectNav.addClass('active').siblings().removeClass('active'); 532 $selectNav.addClass('active').siblings().removeClass('active');
535 $swiperSize.hide(); 533 $swiperSize.hide();
536 $swiperSize.filter(selector).show(); 534 $swiperSize.filter(selector).show();
  535 +
  536 + filterInit({
  537 + breakSort: $selectNav.data('id'),
  538 + breakSize: $selectNav.data('allsub')
  539 + });
537 search([{ 540 search([{
538 type: 'breakSort', 541 type: 'breakSort',
539 id: $selectNav.data('id') 542 id: $selectNav.data('id')
@@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
8 8
9 .thumb-row-box { 9 .thumb-row-box {
10 display: inline-block; 10 display: inline-block;
11 - width: 275px;  
12 - height: 132px; 11 + width: 276px;
  12 + height: 134px;
13 border-radius: 0; 13 border-radius: 0;
14 background-size: 100% 100%; 14 background-size: 100% 100%;
15 background-repeat: no-repeat; 15 background-repeat: no-repeat;
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 } 22 }
23 23
24 .left-thumb-row-box { 24 .left-thumb-row-box {
25 - height: 308px; 25 + height: 296px;
26 } 26 }
27 27
28 .left-container { 28 .left-container {
@@ -31,13 +31,13 @@ @@ -31,13 +31,13 @@
31 31
32 .right-container { 32 .right-container {
33 float: right; 33 float: right;
34 - width: 275px;  
35 - height: 280px; 34 + width: 276px;
  35 + height: 296px;
36 border-radius: 4px; 36 border-radius: 4px;
37 margin: 0; 37 margin: 0;
38 38
39 .right-thumb-row-box { 39 .right-thumb-row-box {
40 - margin: 44px 0 0; 40 + margin: 28px 0 0;
41 } 41 }
42 } 42 }
43 } 43 }