Authored by 陈峰

解决重构尺码选择框语法兼容性

@@ -33,7 +33,7 @@ function getProductInfo(skn, promotionId) { @@ -33,7 +33,7 @@ function getProductInfo(skn, promotionId) {
33 } 33 }
34 chosePanel.show({ 34 chosePanel.show({
35 data, 35 data,
36 - disableNum: queryString.edit 36 + disableNum: true
37 }).then(result => { 37 }).then(result => {
38 if (result && result.sku) { 38 if (result && result.sku) {
39 let goodData, 39 let goodData,
@@ -73,6 +73,7 @@ class ChosePanel { @@ -73,6 +73,7 @@ class ChosePanel {
73 }); 73 });
74 } 74 }
75 close() { 75 close() {
  76 + innerScroll.enableScroll($choseArea);
76 $('.chose-panel').hide(); 77 $('.chose-panel').hide();
77 } 78 }
78 79
@@ -150,19 +151,19 @@ class ChosePanel { @@ -150,19 +151,19 @@ class ChosePanel {
150 $chooseInfo = $('.choosed-info'); 151 $chooseInfo = $('.choosed-info');
151 } 152 }
152 _regEvents() { 153 _regEvents() {
153 - $yohoPage.on('touchstart', '.chose-panel', (e) => { 154 + $yohoPage.on('touchend', '.chose-panel', (e) => {
154 return this._closeClick(e); 155 return this._closeClick(e);
155 }); 156 });
156 $yohoPage.on('touchstart', '.block', (e) => { 157 $yohoPage.on('touchstart', '.block', (e) => {
157 this._blockClick(e); 158 this._blockClick(e);
158 }); 159 });
159 - $yohoPage.on('touchstart', '.btn-plus,.btn-minus', (e) => { 160 + $yohoPage.on('touchend', '.btn-plus,.btn-minus', (e) => {
160 this._numClick(e); 161 this._numClick(e);
161 }); 162 });
162 $yohoPage.on('touchstart', '.thumb', (e) => { 163 $yohoPage.on('touchstart', '.thumb', (e) => {
163 this._thumbClick(e); 164 this._thumbClick(e);
164 }); 165 });
165 - $yohoPage.on('touchstart', '#chose-btn-sure', (e) => { 166 + $yohoPage.on('click', '#chose-btn-sure', (e) => {
166 return this._choseBtnSureClick(e); 167 return this._choseBtnSureClick(e);
167 }); 168 });
168 } 169 }
@@ -441,14 +442,17 @@ class ChosePanel { @@ -441,14 +442,17 @@ class ChosePanel {
441 valueId: $block.data('value-id') 442 valueId: $block.data('value-id')
442 }; 443 };
443 })); 444 }));
444 - selectSku = this.skus.find(sku => { 445 + selectSku = this.skus.filter(sku => {
445 return selectValues 446 return selectValues
446 .map(value => { 447 .map(value => {
447 return sku.prop[value.propId].valId === value.valueId; 448 return sku.prop[value.propId].valId === value.valueId;
448 }) 449 })
449 .filter(match => match).length === this.props.length; 450 .filter(match => match).length === this.props.length;
450 }); 451 });
451 - return selectSku; 452 + if (selectSku.length >= 1) {
  453 + return selectSku[0];
  454 + }
  455 + return;
452 } 456 }
453 } 457 }
454 458