feat: 下单校验

This commit is contained in:
2026-03-26 16:01:30 +08:00
parent 1e01028ba8
commit d7d50e1210
2 changed files with 19 additions and 20 deletions

View File

@@ -197,7 +197,7 @@ const validateUserForms = () => {
});
if (invalidUsers.length) {
uni.showToast({ title: "请填写住客姓名", icon: "none" });
uni.showToast({ title: "请填写姓名", icon: "none" });
return false;
}
@@ -211,14 +211,12 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
try {
console.log("处理支付点击事件", userFormList.value);
// 判断是酒店类型
if (goodsData.commodityTypeCode === "0") {
// 校验用户姓名
if (!validateUserForms()) {
uni.hideLoading();
return;
}
// 校验用户姓名
if (!validateUserForms()) {
uni.hideLoading();
return;
}
// 校验手机号
if (!PhoneUtils.validatePhone(userFormList.value[0].contactPhone)) {
uni.hideLoading();