Authored by ccbikai

Merge branch 'feature/sale' of git.dev.yoho.cn:web/yohobuywap-node into feature/sale

@@ -163,7 +163,7 @@ exports.breakCode = (req, res) => { @@ -163,7 +163,7 @@ exports.breakCode = (req, res) => {
163 }, 163 },
164 isSoonSoldOut: true 164 isSoonSoldOut: true
165 } 165 }
166 - } 166 + };
167 res.render('break-code', Object.assign(renderData, result)); 167 res.render('break-code', Object.assign(renderData, result));
168 }).catch((err) => { 168 }).catch((err) => {
169 saleLogger(err, res); 169 saleLogger(err, res);
@@ -10,16 +10,16 @@ var $ = require('yoho-jquery'), @@ -10,16 +10,16 @@ var $ = require('yoho-jquery'),
10 10
11 var $filter; 11 var $filter;
12 12
13 -var fCbFn, hCbFn; //筛选和关闭的回调 13 +var fCbFn, hCbFn; // 筛选和关闭的回调
14 14
15 -var missStatus; //是否忽略选中状态 15 +var missStatus; // 是否忽略选中状态
16 16
17 -//隐藏筛选界面 17 +// 隐藏筛选界面
18 function hideFilter() { 18 function hideFilter() {
19 $filter.addClass('hide'); 19 $filter.addClass('hide');
20 } 20 }
21 21
22 -//显示筛选界面 22 +// 显示筛选界面
23 function showFilter() { 23 function showFilter() {
24 $filter.removeClass('hide'); 24 $filter.removeClass('hide');
25 } 25 }
@@ -48,7 +48,7 @@ function highlightSubItem() { @@ -48,7 +48,7 @@ function highlightSubItem() {
48 }); 48 });
49 } 49 }
50 50
51 -//主筛选项Tap事件句柄 51 +// 主筛选项Tap事件句柄
52 function classifyTapEvt($this) { 52 function classifyTapEvt($this) {
53 if ($this.hasClass('active')) { 53 if ($this.hasClass('active')) {
54 return; 54 return;
@@ -59,7 +59,7 @@ function classifyTapEvt($this) { @@ -59,7 +59,7 @@ function classifyTapEvt($this) {
59 $this.addClass('active'); 59 $this.addClass('active');
60 } 60 }
61 61
62 -//子筛选项选中处理 62 +// 子筛选项选中处理
63 function setSubClassify($this) { 63 function setSubClassify($this) {
64 var $sub = $this.closest('.sub-classify'); 64 var $sub = $this.closest('.sub-classify');
65 65
@@ -79,8 +79,8 @@ function setSubClassify($this) { @@ -79,8 +79,8 @@ function setSubClassify($this) {
79 shower = $.trim($shower.html()); 79 shower = $.trim($shower.html());
80 80
81 $shower.html( 81 $shower.html(
82 - shower.substring(0, shower.indexOf('</span>') + 7) + //拆分出shower的title  
83 - html.substring(0, html.indexOf('<i')) //拆分选中筛选值 82 + shower.substring(0, shower.indexOf('</span>') + 7) + // 拆分出shower的title
  83 + html.substring(0, html.indexOf('<i')) // 拆分选中筛选值
84 ); 84 );
85 85
86 if ($this.index() === 0) { 86 if ($this.index() === 0) {
@@ -92,7 +92,7 @@ function setSubClassify($this) { @@ -92,7 +92,7 @@ function setSubClassify($this) {
92 return $sub; 92 return $sub;
93 } 93 }
94 94
95 -//子筛选项Tap句柄 95 +// 子筛选项Tap句柄
96 function subClassifyTapEvt($this) { 96 function subClassifyTapEvt($this) {
97 var id = $this.data('id'); 97 var id = $this.data('id');
98 98
@@ -110,11 +110,11 @@ function subClassifyTapEvt($this) { @@ -110,11 +110,11 @@ function subClassifyTapEvt($this) {
110 hideFilter(); 110 hideFilter();
111 } 111 }
112 112
113 -//初始化筛选 113 +// 初始化筛选
114 function initFilter(opt) { 114 function initFilter(opt) {
115 var filterHammer; 115 var filterHammer;
116 116
117 - //注册回调 117 + // 注册回调
118 fCbFn = opt.fCbFn; 118 fCbFn = opt.fCbFn;
119 hCbFn = opt.hCbFn; 119 hCbFn = opt.hCbFn;
120 120
@@ -130,19 +130,19 @@ function initFilter(opt) { @@ -130,19 +130,19 @@ function initFilter(opt) {
130 var $this = $(e.target), 130 var $this = $(e.target),
131 $cur; 131 $cur;
132 132
133 - e.preventDefault();//防止透点 133 + e.preventDefault();// 防止透点
134 134
135 if ($this.closest('.filter-body').length > 0) { 135 if ($this.closest('.filter-body').length > 0) {
136 $cur = $this.closest('.sub-item'); 136 $cur = $this.closest('.sub-item');
137 if ($cur.length > 0) { 137 if ($cur.length > 0) {
138 138
139 - //tap subclassify 139 + // tap subclassify
140 $cur = $this.closest('li'); 140 $cur = $this.closest('li');
141 141
142 subClassifyTapEvt($cur); 142 subClassifyTapEvt($cur);
143 } else { 143 } else {
144 144
145 - //tap classify 145 + // tap classify
146 $cur = $this.closest('.classify-item'); 146 $cur = $this.closest('.classify-item');
147 147
148 e.srcEvent.stopPropagation(); 148 e.srcEvent.stopPropagation();
@@ -160,18 +160,18 @@ function initFilter(opt) { @@ -160,18 +160,18 @@ function initFilter(opt) {
160 160
161 } 161 }
162 162
163 -//重置筛选面板 163 +// 重置筛选面板
164 function resetFilter() { 164 function resetFilter() {
165 if (typeof $filter === 'undefined') { 165 if (typeof $filter === 'undefined') {
166 return; 166 return;
167 } 167 }
168 168
169 - //重置子筛选项 169 + // 重置子筛选项
170 $('.sub-classify').each(function() { 170 $('.sub-classify').each(function() {
171 setSubClassify($(this).children(':first-child')); 171 setSubClassify($(this).children(':first-child'));
172 }); 172 });
173 173
174 - //重置主筛选项 174 + // 重置主筛选项
175 classifyTapEvt($('.classify > :first-child')); 175 classifyTapEvt($('.classify > :first-child'));
176 } 176 }
177 177
1 -require('./break-code');  
  1 +require('./break-code');
@@ -13,4 +13,4 @@ $('.query-param').each(function() { @@ -13,4 +13,4 @@ $('.query-param').each(function() {
13 opt[$this.data('attr')] = $this.val(); 13 opt[$this.data('attr')] = $this.val();
14 }); 14 });
15 15
16 -module.exports = opt;  
  16 +module.exports = opt;
@@ -7,4 +7,4 @@ @@ -7,4 +7,4 @@
7 var $ = require('yoho-jquery'), 7 var $ = require('yoho-jquery'),
8 lazyLoad = require('yoho-jquery-lazyload'); 8 lazyLoad = require('yoho-jquery-lazyload');
9 9
10 -lazyLoad($('img.lazy'));  
  10 +lazyLoad($('img.lazy'));