Authored by htoooth

fix activity

@@ -4,18 +4,19 @@ @@ -4,18 +4,19 @@
4 4
5 {{#if_cond activity.length '>' 3}} 5 {{#if_cond activity.length '>' 3}}
6 <div class="activity-title">展开全部促销 <span class="iconfont index">&#xe610;</span> </div> 6 <div class="activity-title">展开全部促销 <span class="iconfont index">&#xe610;</span> </div>
7 - <div class="activity-container">  
8 - <ul class="activity">  
9 - {{#each activity}}  
10 - <li class="promotion-item">  
11 - <span class="ac-type">{{type}}</span>  
12 - <span class="ac-des">{{des}}</span>  
13 - </li>  
14 - {{/each}}  
15 - </ul>  
16 - </div>  
17 {{/if_cond}} 7 {{/if_cond}}
18 8
  9 + <div class="activity-container">
  10 + <ul class="activity">
  11 + {{#each activity}}
  12 + <li class="promotion-item">
  13 + <span class="ac-type">{{type}}</span>
  14 + <span class="ac-des">{{des}}</span>
  15 + </li>
  16 + {{/each}}
  17 + </ul>
  18 + </div>
  19 +
19 <div class="pull-left"> 20 <div class="pull-left">
20 <ul class="activity"> 21 <ul class="activity">
21 {{#each activity}} 22 {{#each activity}}
@@ -30,7 +30,9 @@ var $main = $('.main'), @@ -30,7 +30,9 @@ var $main = $('.main'),
30 secKill = $main.data('seckill') === 'Y', 30 secKill = $main.data('seckill') === 'Y',
31 limitCode = $main.data('limitcode'), 31 limitCode = $main.data('limitcode'),
32 isBundle = $main.data('type') === 2, // 量贩商品 32 isBundle = $main.data('type') === 2, // 量贩商品
33 - goodsBaseNum = isBundle ? $main.data('count'): 1; // 每次购买最低件数 33 + goodsBaseNum = isBundle ? $main.data('count') : 1; // 每次购买最低件数
  34 +
  35 +var maxStock = -1; // 记录当前选中的颜色-尺码的库存量,若为-1,代表未选择尺码
34 36
35 var SLIDETIME = 200; 37 var SLIDETIME = 200;
36 38
@@ -99,8 +101,6 @@ bindEvent.add(function() { @@ -99,8 +101,6 @@ bindEvent.add(function() {
99 101
100 var isTicket = $('input[name="isTicket"]').length > 0 && $('input[name="isTicket"]').val() === 'true'; 102 var isTicket = $('input[name="isTicket"]').length > 0 && $('input[name="isTicket"]').val() === 'true';
101 103
102 - var maxStock = -1; // 记录当前选中的颜色-尺码的库存量,若为-1,代表未选择尺码  
103 -  
104 var brandDomain = $('.home').attr('href'); 104 var brandDomain = $('.home').attr('href');
105 105
106 var Alert = require('../common/dialog').Alert; 106 var Alert = require('../common/dialog').Alert;
@@ -234,8 +234,6 @@ bindEvent.add(function() { @@ -234,8 +234,6 @@ bindEvent.add(function() {
234 234
235 $('.activity-title').click(function() { 235 $('.activity-title').click(function() {
236 $(this).toggleClass('active'); 236 $(this).toggleClass('active');
237 - $('.activity-container').empty();  
238 -  
239 if ($(this).hasClass('active')) { 237 if ($(this).hasClass('active')) {
240 $(this).find('span').html(icon.fold); 238 $(this).find('span').html(icon.fold);
241 $('.activity-container').slideDown(400); 239 $('.activity-container').slideDown(400);
@@ -443,7 +441,7 @@ bindEvent.add(function() { @@ -443,7 +441,7 @@ bindEvent.add(function() {
443 441
444 switchBtnStatus(); 442 switchBtnStatus();
445 443
446 - /// 到货通知:状态 444 + // / 到货通知:状态
447 if ($this.data('notify') === 'Y') { 445 if ($this.data('notify') === 'Y') {
448 $enableNotifyYou.removeClass('hide'); 446 $enableNotifyYou.removeClass('hide');
449 447
@@ -1069,7 +1067,7 @@ function fetchComment() { @@ -1069,7 +1067,7 @@ function fetchComment() {
1069 $consultNum.text(res[0].total); 1067 $consultNum.text(res[0].total);
1070 1068
1071 totalnum = Math.ceil(res[0].total / 10) * 20; 1069 totalnum = Math.ceil(res[0].total / 10) * 20;
1072 - 1070 +
1073 $consultsUl.empty().append(consultsTpl({ 1071 $consultsUl.empty().append(consultsTpl({
1074 consults: res 1072 consults: res
1075 })); 1073 }));
@@ -1158,8 +1156,6 @@ function fetchComment() { @@ -1158,8 +1156,6 @@ function fetchComment() {
1158 } 1156 }
1159 }); 1157 });
1160 1158
1161 -  
1162 -  
1163 // 我要咨询 1159 // 我要咨询
1164 $('#consults-btn').click(function() { 1160 $('#consults-btn').click(function() {
1165 1161