购物车

This commit is contained in:
ctw committed 2025-01-09 19:55:09 +08:00
1 parent af59902a51
commit 1bf83c56c5
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -141,7 +141,7 @@ onLoad((options: any) => {
});
onShow(async () => {
await getDetail();
// await getShopCar();
await getShopCar();
await getClassify();
});
@@ -151,7 +151,7 @@ const getDetail = async () => {
};
const getShopCar = async () => {
const { data } = await foodApi.getShopCar({ merchantId: state.detailId });
const { data } = await foodApi.getShopCar({ merchantId: state.merchantId, hardType: "SUPERMARKET" });
state.carList = data ?? [];
state.totPrice = state.carList.map((v) => v.totalPrice).reduce((pre, next) => pre + next, 0);
state.totCount = state.carList.map((v) => v.productCount).reduce((pre, next) => pre + next, 0);