活动报名静态界面3.1

This commit is contained in:
WindowBird 2025-08-14 17:59:56 +08:00
parent 510965cf44
commit 23d876ee73

View File

@ -161,14 +161,6 @@ export default {
return; return;
} }
this.selectedNumber = value; this.selectedNumber = value;
//
if (value === "1") {
this.price = 100;
} else if (value === "2") {
this.price = 180;
} else {
this.price = 100; //
}
}, },
// //
@ -259,8 +251,11 @@ export default {
onCustomNumberInput(e) { onCustomNumberInput(e) {
const value = e.detail.value; const value = e.detail.value;
// // 99
this.customNumber = value.replace(/[^\d]/g, ""); const numValue = value.replace(/[^\d]/g, "");
if (numValue === "" || parseInt(numValue) < 99) {
this.customNumber = numValue;
}
}, },
confirmCustomNumber() { confirmCustomNumber() {
@ -271,6 +266,16 @@ export default {
}); });
return; return;
} }
const numValue = parseInt(this.customNumber);
if (numValue >= 99) {
uni.showToast({
title: "人数不能大于等于99",
icon: "none",
});
return;
}
this.selectedNumber = this.customNumber; this.selectedNumber = this.customNumber;
this.showCustomNumberModal = false; this.showCustomNumberModal = false;
}, },