yiming
2024-04-11 a9bd2df4da1cf7b198db7bf2d67ce8adbbe89b32
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -58,6 +58,7 @@
    selectAll: [],
    shoppingCart: true,
    stop: false,
    cart: true
  },
  ready() {},
@@ -469,6 +470,9 @@
    // 加入购物车
    async onCloudShoppingCart(e) {
      let shoppingCartGetId = [];
      const item = e.currentTarget.dataset.item
      console.log(item.isShopCar);
      const saleMethodId = e.currentTarget.dataset.item.saleMethod[0].Id;
      console.log(saleMethodId);
      let query = {
@@ -504,10 +508,15 @@
        };
        const addRes = await app.MG.store.addShoppingCart(query);
        console.log(addRes, "addRes");
        wx.showToast({
          icon: "success",
          title: "添加成功",
        });
        if (addRes) {
          wx.showToast({
            icon: "success",
            title: "添加成功",
          });
          item.isShopCar = false
        }
      }
    },
    sadd() {