优化地址选择

This commit is contained in:
TOP糯米 2023-04-01 11:31:55 +08:00
parent af35ad5e80
commit 9a77e73f05
2 changed files with 8 additions and 6 deletions

View File

@ -172,17 +172,16 @@ export default {
* 下单支付
*/
pay() {
if (!this.isAgree) {
uni.showToast({
title: "请先阅读并同意《服务协议》《隐私政策》",
icon: "none",
});
return;
if (!this.addressId) {
return this.$utils.toast("请选择地址");
}
if (!this.date || !this.time) {
return this.$utils.toast("请选择时间和日期");
}
let datetime = this.date + " " + this.time;
if (!this.isAgree) {
return this.$utils.toast("请先阅读并同意《服务协议》《隐私政策》");
}
this.$models.order
.createOrder({
ids: this.orderData,

View File

@ -201,6 +201,9 @@ export default {
* 提交订单
*/
submit() {
if (!this.pickupAddressId || !this.unloadAddressId) {
return this.$utils.toast("请选择地址");
}
if (!this.date || !this.time) {
return this.$utils.toast("请选择时间和日期");
}