From 397f4b2bcf3ecedeec829c418845d8817d320fa1 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Sat, 28 Mar 2026 18:16:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=AF=E4=BB=A5=E8=87=AA=E4=B8=BB=E7=BB=93=E8=B4=A6?= =?UTF-8?q?=E5=BC=80=E5=85=B3=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8F=B0=E6=A1=8C?= =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/carts.ts | 20 +- src/views/shop/config/components/shopInfo.vue | 187 +++- src/views/tool/table/index.vue | 882 ++++++++++-------- 3 files changed, 642 insertions(+), 447 deletions(-) diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts index 449ae77..b366611 100644 --- a/src/store/modules/carts.ts +++ b/src/store/modules/carts.ts @@ -226,7 +226,25 @@ export const useCartsStore = defineStore("carts", () => { const isLinkFinshed = ref(false); // 当前购物车数据(现在 getAllGoodsList 能直接访问) - const list = useStorage("carts", []); + const list = useStorage( + "carts", + [], + localStorage, + { + serializer: { + read: (rawValue) => { + // 没有值时直接返回默认空数组 + if (!rawValue) return [] + try { + return JSON.parse(rawValue) + } catch { + return [] + } + }, + write: (value) => JSON.stringify(value), + }, + } + ) // 历史订单数据(现在 getAllGoodsList 能直接访问) const oldOrder = useStorage("Instead_olold_order", { detailMap: [], diff --git a/src/views/shop/config/components/shopInfo.vue b/src/views/shop/config/components/shopInfo.vue index 5f0a243..9346aa5 100644 --- a/src/views/shop/config/components/shopInfo.vue +++ b/src/views/shop/config/components/shopInfo.vue @@ -3,14 +3,25 @@
- + - +
- +
- + - + - + - +
- +
开启后,用户只能在店铺附近xx公里内点餐
- +
+
- +
起菜到上菜的时间间隔,开启后会有超时提示
- + @@ -208,11 +304,24 @@
- - + + 点击上传