下单逻辑修改

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

@@ -603,6 +603,13 @@
if (this.shopId) {params.shopId = this.shopId}
let res = await this.api.productqueryShop(params)
if (res.code == 0) {
if ( !res.data.shopTableInfo.choseCount && !this.dinersNum ) {
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
tableCode: this.tableCode,
shopId: res.data.storeInfo.id,
})
return;
}
let expireTime = uni.utils.timestamp() + 30 * 60; // 有效期
uni.cache.set('shopId', res.data.storeInfo.id, expireTime)
this.shopId = res.data.storeInfo.id;