优化创建订单时地址提示

This commit is contained in:
TOP糯米 2023-04-05 22:42:08 +08:00
parent 3ff0dcefee
commit 46352a8225
3 changed files with 12 additions and 5 deletions

View File

@ -455,9 +455,12 @@ export default {
* 发布报价
*/
submit() {
if (this.address.text == "" || this.address.detail == "" || this.address.name == "") {
if (this.address.text == "" || this.address.detail == "") {
return this.$utils.toast("请完善地址信息");
}
if (this.address.name == "") {
return this.$utils.toast("请填写联系人");
}
if (!this.$test.mobile(this.address.mobile)) {
return this.$utils.toast("请填写正确的手机号码");
}

View File

@ -226,9 +226,12 @@ export default {
* 下单支付
*/
pay() {
if (this.address.text == "" || this.address.detail == "" || this.address.name == "") {
if (this.address.text == "" || this.address.detail == "") {
return this.$utils.toast("请完善地址信息");
}
if (this.address.name == "") {
return this.$utils.toast("请填写联系人");
}
if (!this.$test.mobile(this.address.mobile)) {
return this.$utils.toast("请填写正确的手机号码");
}

View File

@ -300,13 +300,14 @@ export default {
if (
this.pickupAddress.text == "" ||
this.pickupAddress.detail == "" ||
this.pickupAddress.name == "" ||
this.unloadAddress.text == "" ||
this.unloadAddress.detail == "" ||
this.unloadAddress.name == ""
this.unloadAddress.detail == ""
) {
return this.$utils.toast("请完善地址信息");
}
if (this.pickupAddress.name == "" || this.unloadAddress.name == "") {
return this.$utils.toast("请填写联系人");
}
if (!this.$test.mobile(this.pickupAddress.mobile) || !this.$test.mobile(this.unloadAddress.mobile)) {
return this.$utils.toast("请填写正确的手机号码");
}