From d660e55f262d70e31a84ae593e54ae2a7305ba70 Mon Sep 17 00:00:00 2001 From: ctw <> Date: Tue, 14 Jan 2025 11:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AF=8F=E6=97=A5=E8=8F=9C?= =?UTF-8?q?=E5=93=81=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/canteen/canteenDailyMenu.ts | 6 +++--- src/views/canteen/canteenDailyMenu/index.vue | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/canteen/canteenDailyMenu.ts b/src/api/canteen/canteenDailyMenu.ts index b703539..061d885 100644 --- a/src/api/canteen/canteenDailyMenu.ts +++ b/src/api/canteen/canteenDailyMenu.ts @@ -23,11 +23,11 @@ export function getObj(id?: string) { }) } -export function delObjs(data?: Object) { +export function delObjs(tid: number[], merchantId: string) { return request({ - url: "/canteen/canteenDailyMenu", + url: `/canteen/canteenDailyMenu?merchantId=${merchantId}`, method: "delete", - data, + data: tid, }) } diff --git a/src/views/canteen/canteenDailyMenu/index.vue b/src/views/canteen/canteenDailyMenu/index.vue index d5bf8be..cf92e67 100644 --- a/src/views/canteen/canteenDailyMenu/index.vue +++ b/src/views/canteen/canteenDailyMenu/index.vue @@ -100,7 +100,7 @@ const weekParams = reactive({ const weekData = reactive({ data: [], }) //时间数组 -const merchantId = ref() +const merchantId = ref() // 商户id const merchantInfo = ref([]) const addFood = async (hourType: number) => { @@ -177,7 +177,7 @@ const selectTimeFood = async () => { const delteData = async (tid: number) => { await message.delConfirm("确定删除菜品吗?", "今日菜品?") try { - await delObjs([tid]) + await delObjs([tid], merchantId.value) message.success("删除成功") } catch (error) { message.error("删除失败")