下单逻辑修改

This commit is contained in:
GaoHao
2024-09-27 11:43:10 +08:00
parent a77a7ab716
commit a821223a3b
11 changed files with 49 additions and 18 deletions

View File

@@ -42,7 +42,9 @@
};
},
onLoad(options) {
this.tableCode = uni.cache.get('tableCode');
console.log(options)
this.tableCode = options.tableCode;
this.shopId = options.shopId;
},
onShow() {
},
@@ -69,7 +71,7 @@
/**
* 开始点餐
*/
start () {
async start () {
if ( this.numIndex == -1 && (this.otherNum == "其他"||this.otherNum <= 0)) {
uni.showToast({
title: '请选择就餐人数',
@@ -80,6 +82,12 @@
if ( this.numIndex == -1 && this.otherNum != "其他") {
this.dinersNum = this.otherNum
}
let res = await this.api.productChoseCount({
orderId: this.orderId,
dinersNum: this.dinersNum,
shopId: this.shopId,
}) //判断是否支付成功
uni.pro.navigateTo('order_food/order_food', {
tableCode: this.tableCode,
dinersNum: this.dinersNum,