|
@@ -278,9 +278,9 @@
|
|
|
|
|
|
const emailErrorMessage = ref(false)
|
|
const emailErrorMessage = ref(false)
|
|
const emailChange = (e) => {
|
|
const emailChange = (e) => {
|
|
- const email = e?.detail?.value
|
|
|
|
|
|
+ const email = e?.detail?.value || e
|
|
emailErrorMessage.value = Boolean(!email || !test.email(email))
|
|
emailErrorMessage.value = Boolean(!email || !test.email(email))
|
|
- if (emailErrorMessage.value) sheep.$helper.toast('邮箱格式不正确')
|
|
|
|
|
|
+ if (emailErrorMessage.value) sheep.$helper.toast('邮箱格式不正确!')
|
|
};
|
|
};
|
|
|
|
|
|
// 选择优惠券
|
|
// 选择优惠券
|
|
@@ -329,10 +329,13 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
console.log(state.orderPayload, 'submit-order-pay', state);
|
|
console.log(state.orderPayload, 'submit-order-pay', state);
|
|
- if (spuType.value !== '0' && !state.orderPayload.email) {
|
|
|
|
- uni.showToast({ title: '请填写接收邮箱!', icon: 'none', duration: 2000 })
|
|
|
|
|
|
+
|
|
|
|
+ if (spuType.value !== '0' && !state.orderPayload?.email || !test.email(state.orderPayload.email)) {
|
|
|
|
+ const title = !state.orderPayload.email ? '请填写接收邮箱!' : '邮箱格式不正确!'
|
|
|
|
+ uni.showToast({ title, icon: 'none', duration: 2000 })
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
submitOrder()
|
|
submitOrder()
|
|
}
|
|
}
|
|
|
|
|