feat: 下单校验
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user