From 059a40dd6795aae12c87566cf246513d3866eea6 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 27 Mar 2025 13:36:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=94=AE=E7=BD=84=EF=BC=8C?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=EF=BC=8C=E4=B8=8D=E5=8F=AF=E5=94=AE=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/assets/icons/no-sale.svg | 1 + src/assets/icons/shouqing.svg | 1 + src/assets/icons/yi-xiajia.svg | 1 + src/store/modules/carts.ts | 3 -- .../tool/Instead/components/goods-item.vue | 44 ++++++++++++++++++- src/views/tool/Instead/index.vue | 2 +- 7 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 src/assets/icons/no-sale.svg create mode 100644 src/assets/icons/shouqing.svg create mode 100644 src/assets/icons/yi-xiajia.svg diff --git a/.env.development b/.env.development index f94b9b3..c0ca3b2 100644 --- a/.env.development +++ b/.env.development @@ -7,8 +7,8 @@ VITE_APP_BASE_API=/dev-api # 接口地址 # VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试 -VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式 -# VITE_APP_API_URL=http://192.168.1.31/ # 本地 +# VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式 +VITE_APP_API_URL=http://192.168.1.31/ # 本地 # WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws diff --git a/src/assets/icons/no-sale.svg b/src/assets/icons/no-sale.svg new file mode 100644 index 0000000..7904492 --- /dev/null +++ b/src/assets/icons/no-sale.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/shouqing.svg b/src/assets/icons/shouqing.svg new file mode 100644 index 0000000..ec7dd3e --- /dev/null +++ b/src/assets/icons/shouqing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/yi-xiajia.svg b/src/assets/icons/yi-xiajia.svg new file mode 100644 index 0000000..2435769 --- /dev/null +++ b/src/assets/icons/yi-xiajia.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts index d8156da..2c68133 100644 --- a/src/store/modules/carts.ts +++ b/src/store/modules/carts.ts @@ -46,9 +46,6 @@ export const useCartsStore = defineStore("carts", () => { const goods = useStorage("Instead_goods", []); async function getGoods(query: any) { const res = await productApi.list({ - page: 1, - size: 999, - status: "on_sale", ...query, }); goods.value = res.filter((v: { type: string }) => v.type != 'coupon'); diff --git a/src/views/tool/Instead/components/goods-item.vue b/src/views/tool/Instead/components/goods-item.vue index 4995ae8..e44e119 100644 --- a/src/views/tool/Instead/components/goods-item.vue +++ b/src/views/tool/Instead/components/goods-item.vue @@ -6,13 +6,36 @@ :src="item.coverImg + '?x-oss-process=image/resize,m_lfit,w_100,h_100'" fit="cover" > -
+
称重 {{ item.name }}
¥{{ item.lowPrice }}
+
+ + + +
@@ -26,6 +49,10 @@ const props = defineProps({ active: Boolean, select: Function, }); +const emits = defineEmits(["itemClick"]); +function itemClick() { + emits("itemClick"); +}