Authored by 陈峰

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

... ... @@ -33,7 +33,7 @@ function getProductInfo(skn, promotionId) {
}
chosePanel.show({
data,
disableNum: queryString.edit
disableNum: true
}).then(result => {
if (result && result.sku) {
let goodData,
... ...
... ... @@ -73,6 +73,7 @@ class ChosePanel {
});
}
close() {
innerScroll.enableScroll($choseArea);
$('.chose-panel').hide();
}
... ... @@ -150,19 +151,19 @@ class ChosePanel {
$chooseInfo = $('.choosed-info');
}
_regEvents() {
$yohoPage.on('touchstart', '.chose-panel', (e) => {
$yohoPage.on('touchend', '.chose-panel', (e) => {
return this._closeClick(e);
});
$yohoPage.on('touchstart', '.block', (e) => {
this._blockClick(e);
});
$yohoPage.on('touchstart', '.btn-plus,.btn-minus', (e) => {
$yohoPage.on('touchend', '.btn-plus,.btn-minus', (e) => {
this._numClick(e);
});
$yohoPage.on('touchstart', '.thumb', (e) => {
this._thumbClick(e);
});
$yohoPage.on('touchstart', '#chose-btn-sure', (e) => {
$yohoPage.on('click', '#chose-btn-sure', (e) => {
return this._choseBtnSureClick(e);
});
}
... ... @@ -441,14 +442,17 @@ class ChosePanel {
valueId: $block.data('value-id')
};
}));
selectSku = this.skus.find(sku => {
selectSku = this.skus.filter(sku => {
return selectValues
.map(value => {
return sku.prop[value.propId].valId === value.valueId;
})
.filter(match => match).length === this.props.length;
});
return selectSku;
if (selectSku.length >= 1) {
return selectSku[0];
}
return;
}
}
... ...