优化地址选择
This commit is contained in:
parent
af35ad5e80
commit
9a77e73f05
|
@ -172,17 +172,16 @@ export default {
|
||||||
* 下单支付
|
* 下单支付
|
||||||
*/
|
*/
|
||||||
pay() {
|
pay() {
|
||||||
if (!this.isAgree) {
|
if (!this.addressId) {
|
||||||
uni.showToast({
|
return this.$utils.toast("请选择地址");
|
||||||
title: "请先阅读并同意《服务协议》《隐私政策》",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (!this.date || !this.time) {
|
if (!this.date || !this.time) {
|
||||||
return this.$utils.toast("请选择时间和日期");
|
return this.$utils.toast("请选择时间和日期");
|
||||||
}
|
}
|
||||||
let datetime = this.date + " " + this.time;
|
let datetime = this.date + " " + this.time;
|
||||||
|
if (!this.isAgree) {
|
||||||
|
return this.$utils.toast("请先阅读并同意《服务协议》《隐私政策》");
|
||||||
|
}
|
||||||
this.$models.order
|
this.$models.order
|
||||||
.createOrder({
|
.createOrder({
|
||||||
ids: this.orderData,
|
ids: this.orderData,
|
||||||
|
|
|
@ -201,6 +201,9 @@ export default {
|
||||||
* 提交订单
|
* 提交订单
|
||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
|
if (!this.pickupAddressId || !this.unloadAddressId) {
|
||||||
|
return this.$utils.toast("请选择地址");
|
||||||
|
}
|
||||||
if (!this.date || !this.time) {
|
if (!this.date || !this.time) {
|
||||||
return this.$utils.toast("请选择时间和日期");
|
return this.$utils.toast("请选择时间和日期");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue