下单逻辑修改
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user