From 18c2c68c9fe98d8095afb2ff987846cfed4c64f3 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 21 Aug 2024 13:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=A2=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/table.js | 11 +++++++++++ src/views/table/components/table-diancan.vue | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/api/table.js b/src/api/table.js index 26d338d..246c020 100644 --- a/src/api/table.js +++ b/src/api/table.js @@ -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 + } + }); } \ No newline at end of file diff --git a/src/views/table/components/table-diancan.vue b/src/views/table/components/table-diancan.vue index bcea355..9f2dc39 100644 --- a/src/views/table/components/table-diancan.vue +++ b/src/views/table/components/table-diancan.vue @@ -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();