| | |
| | | }, |
| | | // 节点展开 |
| | | handleChange(e) { |
| | | console.log(e.detail.value); |
| | | this.setData({ |
| | | openIds: e.detail.value, |
| | | }); |
| | |
| | | }, |
| | | // 判断资源是否购买 |
| | | resourceIsBuy(data) { |
| | | return true |
| | | // if (data.saleMethod && data.saleMethod.length) { |
| | | // if (data.saleMethod[0].State == "Disable") return false; |
| | | // const isSHow = this.properties.buyIds.some( |
| | | // (item) => item == data.saleMethod[0].Id |
| | | // ); |
| | | // return !isSHow; |
| | | // } else { |
| | | // return false; |
| | | // } |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | if (data.saleMethod[0].State == "Disable") return false; |
| | | const isSHow = this.properties.buyIds.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | ); |
| | | return !isSHow; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | // 跳转音视频播放器 |
| | | goPlayer(e) { |
| | |
| | | item.learnSelectType == "audio" |
| | | ) { |
| | | url = "/packageDomain/pages/resourceDetails/myAudio/index"; |
| | | } else if (item.selectType == "picture" || item.selectType == "zip") { |
| | | } else if (item.selectType == "picture") { |
| | | url = "/packageDomain/pages/resourceDetails/document/index"; |
| | | } |
| | | if ( |
| | | this.properties.tab == "jsek_cloudLearning" && |
| | | // this.resourceIsBuy(item) |
| | | item.saleMethod.length > 0 |
| | | this.resourceIsBuy(item) |
| | | // item.saleMethod.length > 0 |
| | | ) { |
| | | return wx.showToast({ |
| | | icon: "error", |