| | |
| | | selectAll: [], |
| | | shoppingCart: true, |
| | | stop: false, |
| | | cart: true |
| | | }, |
| | | ready() {}, |
| | | |
| | |
| | | // 加入购物车 |
| | | 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 = { |
| | |
| | | }; |
| | | 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() { |