| | |
| | | shoppingCart: true, |
| | | stop: false, |
| | | }, |
| | | ready() { |
| | | this.setData({}); |
| | | console.log("准备"); |
| | | }, |
| | | ready() {}, |
| | | |
| | | onLoad() { |
| | | this.setData({ |
| | |
| | | treeList: function (newValue) { |
| | | const list = []; |
| | | let checked = ""; |
| | | console.log("新值", this.properties.treeList); |
| | | this.properties.treeList.forEach((item) => { |
| | | if (item.children && item.children.length > 0) { |
| | | list.push(...this.flattenTree([item])); |
| | |
| | | ) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: "请先购买该资源", |
| | | title: |
| | | item.saleMethod[0].Price > 0 |
| | | ? "请先购买该资源" |
| | | : "请先点击领取查看按钮", |
| | | }); |
| | | } |
| | | wx.navigateTo({ |
| | |
| | | // 拿到所有项 |
| | | getAllChildren(id) { |
| | | let result = []; |
| | | |
| | | function findChildren(item) { |
| | | if (item.id === id) { |
| | | if (item.children && item.children.length > 0) { |
| | |
| | | }); |
| | | if (shoppingCartGetId.includes(saleMethodId)) { |
| | | console.log(111); |
| | | // this.data.updateShoppingCartHidden(); |
| | | // this.data.updateCloudLearning(); |
| | | |
| | | wx.showToast({ |
| | | icon: "error", |
| | |
| | | }); |
| | | } |
| | | }, |
| | | sadd() { |
| | | this.triggerEvent("updateShoppingCartHidden"); |
| | | this.triggerEvent("updateCloudLearning"); |
| | | console.log(789); |
| | | }, |
| | | }, |
| | | |
| | | catchtap() {}, |