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(() => { }}