From cc8d911e0e8b7c2071222e41e2c7d909c01d063f Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Tue, 9 Jul 2024 16:36:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=B1=BB=E5=9E=8B=E5=B1=95=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/saleHome/component/order.vue | 26 +++++++++++++++----------- src/views/saleHome/component/pupop.vue | 6 +++++- src/views/saleHome/component/shop.vue | 6 +++++- src/views/saleHome/index.vue | 7 ++++--- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/views/saleHome/component/order.vue b/src/views/saleHome/component/order.vue index d5f6009..2d99465 100644 --- a/src/views/saleHome/component/order.vue +++ b/src/views/saleHome/component/order.vue @@ -38,12 +38,24 @@ const deleteShop = (arr) => { }); }; +const userInfo = ref({ + uid: '' +}) +const setUser = (row) => { + userInfo.value = row; + userInfo.value.uid = row.id; + getList(); + emit("getStoreList", {uid: row.id}, true); +} + const extend = ref({}); const getList = () => { allPrice.value = 0; costPrice.value = 0; discounts.value = 0; - cartListApi().then((res) => { + cartListApi({ + uid: userInfo.value.uid + }).then((res) => { extend.value = res.data.extend; list.value = res.data.lists || []; // if (!extend.value?.pay_price) userInfo.value.uid = ""; @@ -58,7 +70,7 @@ const getList = () => { }; getList(); -const emit = defineEmits(["goPay", "editAttr"]); +const emit = defineEmits(["goPay", "editAttr", "getStoreList"]); const goPay = () => { emit("goPay"); @@ -104,14 +116,6 @@ const showPrice = (type = true) => { priceRef.value.show(type, costPrice.value); }; -const userInfo = ref({ - uid: '' -}) -const setUser = (row) => { - userInfo.value = row; - userInfo.value.uid = row.id; -} - const is_storage = ref(false) const resetView = () => { @@ -169,7 +173,7 @@ onUnmounted(() => { }}