下单逻辑修改
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
if ( !data.data.shopTableInfo.choseCount ) {
|
||||
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
|
||||
tableCode: tableCode,
|
||||
shopId: data.data.storeInfo.id,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('order_food/order_food', {
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
if ( !data.data.shopTableInfo.choseCount ) {
|
||||
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
|
||||
tableCode: tableCode,
|
||||
shopId: data.data.storeInfo.id,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('order_food/order_food', {
|
||||
|
||||
@@ -315,6 +315,12 @@
|
||||
async showpopupclick(item) {
|
||||
let res = await this.api.payorderPay({
|
||||
orderId: item.id,
|
||||
// #ifdef MP-WEIXIN
|
||||
payType: 'wechatPay',
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
payType: 'aliPay',
|
||||
// #endif
|
||||
}) //判断是否支付成功
|
||||
if (res.code == 0) {
|
||||
uni.showLoading({
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user