feat:共富结算页面

This commit is contained in:
ctw committed 2025-10-29 19:50:08 +08:00
1 parent 8f5e1d0641
commit 763522c8d6
9 files changed
+190 -93

No files matched your search

+6 -6
View File
@@ -32,24 +32,24 @@ export const useProsperityCartStore = defineStore("prosperityCartStore", {
}
},
// 购物车商品项数量减一
async removeProductCount(productId: string) {
async removeProductCount(productId: string, merchantId: string) {
this.cartList.forEach((item: any) => {
if (item.productId === productId) {
item.productCount--
}
})
await this.updateShopCart()
await this.getShopCart()
await this.updateShopCart(merchantId)
await this.getShopCart(merchantId)
},
// 购物车商品项数量加一
async addProductCount(productId: string) {
async addProductCount(productId: string, merchantId: string) {
this.cartList.forEach((item: any) => {
if (item.productId === productId) {
item.productCount++
}
})
await this.updateShopCart()
await this.getShopCart()
await this.updateShopCart(merchantId)
await this.getShopCart(merchantId)
},
// 获取购物车商品列表
async getShopCart(merchantId: string) {