From 17e63a240083a4a6ffd0162948615f2685a0c9ab Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Fri, 14 Nov 2025 09:14:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E5=AE=A2=E4=B8=8B?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/carts.ts | 13 ++++++------- src/views/tool/Instead/components/choose-user.vue | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts index f1e73d6..6a03a8b 100644 --- a/src/store/modules/carts.ts +++ b/src/store/modules/carts.ts @@ -160,7 +160,6 @@ export const useCartsStore = defineStore("carts", () => { .flat() .map(convertToBaseCartItem); - if (cart.length || history.length) { WebSocketManager.sendMessage({ type: "shopping", @@ -169,14 +168,14 @@ export const useCartsStore = defineStore("carts", () => { shop_id: localStorage.getItem("shopId"), data: { cart: cart.map(item => { - console.log('cart.111111', item); + // console.log('cart.111111', item); return { id: item.id, is_time_discount: limitUtils.canUseLimitTimeDiscount(item, limitDiscountRes.value, shopInfoTyped, vipUser.value, 'product_id') ? 1 : 0 } }), history: history.map(item => { - console.log('history.222222', item); + // console.log('history.222222', item); return { id: item.id, is_time_discount: limitUtils.canUseLimitTimeDiscount(item, limitDiscountRes.value, shopInfoTyped, vipUser.value, 'productId') ? 1 : 0 @@ -185,7 +184,7 @@ export const useCartsStore = defineStore("carts", () => { }, }) } - }, 3000) + }, 500) // 就餐类型 let dinnerType = ref<'dine-in' | 'take-out'>('dine-in'); @@ -243,7 +242,7 @@ export const useCartsStore = defineStore("carts", () => { shop_id: localStorage.getItem("shopId"), data: limitDiscountRes.value, }); - }, 3000); + }, 500); // 代客下单页面商品缓存 const goods = useStorage("Instead_goods", []); @@ -815,7 +814,7 @@ export const useCartsStore = defineStore("carts", () => { ...data, detailMap: returnDetailMap(data.detailMap) }; - console.log('oldOrder.value.detailMap==', oldOrder.value.detailMap); + console.log('oldOrder.value.detailMap==', oldOrder.value); if (!vipUser.value.id && data.userId) { const res = await shopUserApi.get({ userId: data.userId }) @@ -845,7 +844,7 @@ export const useCartsStore = defineStore("carts", () => { WebSocketManager.subscribeToTopic(initParams, (msg) => { console.log("收到消息:", msg); if (!msg.status) { - if (msg.hasOwnProperty('status') && msg.status !== 1) { + if (msg.hasOwnProperty('status') && msg.status !== 1 && msg.operate_type !== 'bulk_edit') { return ElMessage.error(msg.message || '操作失败'); } } diff --git a/src/views/tool/Instead/components/choose-user.vue b/src/views/tool/Instead/components/choose-user.vue index 8fd2578..76dbd0c 100644 --- a/src/views/tool/Instead/components/choose-user.vue +++ b/src/views/tool/Instead/components/choose-user.vue @@ -36,9 +36,9 @@ - +