更新客下单支付订单

This commit is contained in:
2024-08-21 13:44:39 +08:00
parent 1bc4cf134c
commit 18c2c68c9f
2 changed files with 14 additions and 2 deletions

View File

@@ -316,4 +316,15 @@ export function $delOrder(data) {
...data
}
});
}
// 支付订单
export function $payOrder(data) {
return request({
url: '/api/place/pay',
method: "put",
data:{
shopId: localStorage.getItem("shopId"),
...data
}
});
}

View File

@@ -825,6 +825,7 @@ import {
$getCacheOrder,
$delOrder,
$setUser,
$payOrder
} from "@/api/table";
import { tbShopCategoryGet } from "@/api/shop";
//判断商品是否可以下单
@@ -1247,7 +1248,7 @@ export default {
orderId: this.createOrder.data.id,
payType: this.order.payType,
});
const res = await $clearCart({
const res = await $payOrder({
tableId: this.table.tableId,
masterId: this.masterId,
orderId: this.createOrder.data.id,
@@ -1257,7 +1258,7 @@ export default {
},
payOrderSuccess() {
this.$notify({
title: "更新成功",
title: "支付成功",
type: "success",
});
this.reset();