comment 8.1

This commit is contained in:
2020-08-01 16:36:48 +08:00
parent 865e2a741a
commit 854976c8f0
18 changed files with 356 additions and 120 deletions

View File

@@ -97,7 +97,7 @@ export default {
return false;
}
if(!this.$u.test.mobile(this.phone)) {
this.$u.toast('请填写正确的新手机号');
this.$u.toast('请正确填写手机号');
return false;
}
if(this.$u.test.isEmpty(this.address)) {
@@ -116,6 +116,10 @@ export default {
this.$u.toast('预约时间错误');
return false;
}
if(this.number > this.goodsInfo.goods_storage) {
this.$u.toast('库存不足');
return false;
}
return true;
},
chooseDate(e) {
@@ -134,9 +138,17 @@ export default {
store_id: this.store.store_id,
appointment_time: new Date(this.time),
}).then(res => {
this.$u.toast(res.message);
if (res.errCode == 0) {
// this.$u.route({ type: 'navigateBack' });
this.$refs.uToast.show({
title: res.message,
back: true,
})
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error',
})
}
})
},