yiming
2024-04-12 4bc1c36faeec2f90e5acfa836732e49fe0b245e9
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
          this.triggerEvent("updateCloudLearning")
        }
      }
    },
    sadd() {