更新72/144判断逻辑

hotfix/paypal-note
Jimmy Liow 2 years ago
parent 3fb6b3cd0c
commit b5b7677624

@ -1131,29 +1131,25 @@ ready(el => {
const airportOrRailwayStation = el('airport_or_railway_station');
const selectedOption = airportOrRailwayStation.options[airportOrRailwayStation.selectedIndex];
console.log(selectedOption.value);
console.log(selectedOption.getAttribute('data-hour'));
const indexOf72 = selectedOption.getAttribute('data-hour').indexOf('72');
if (indexOf72 !== -1 && validateSuccess) {
console.info('china 72 hour...');
qualify_72hours.show();
}
const indexOf144 = selectedOption.getAttribute('data-hour').indexOf('144');
if (indexOf144 !== -1 && validateSuccess) {
console.info('china 144 hour...');
qualify_144hours.show();
}
if (diffInDays > 0 && diffInDays <= 3 && indexOf72 !== -1 && validateSuccess) {
if (diffInDays > 0 && diffInDays <= 3 && indexOf72 !== -1) {
validateSuccess = true;
qualify_72hours.show();
} else {
validateSuccess = false;
qualify_72hours.hide();
error_72hours.show();
}
if (diffInDays > 3 && diffInDays <= 6 && indexOf144 !== -1 && validateSuccess) {
if (diffInDays > 3 && diffInDays <= 6 && indexOf144 !== -1) {
validateSuccess = true;
qualify_144hours.show();
} else {
validateSuccess = false;
qualify_144hours.hide();
error_72hours.show();
}
result_box.show();

Loading…
Cancel
Save