| | |
| | | }, |
| | | isCloundHaveSaleMethod: { |
| | | type: Boolean |
| | | }, |
| | | activeId: { |
| | | type: String |
| | | }, |
| | | source: { |
| | | type: String |
| | | } |
| | | }, |
| | | data: { |
| | |
| | | canExecute: true, |
| | | purchaseList: [] |
| | | }, |
| | | ready() {}, |
| | | ready() { |
| | | var query = this.createSelectorQuery() |
| | | const that = this |
| | | try { |
| | | if (this.data.activeId) |
| | | setTimeout(() => { |
| | | query.select('.cms-' + this.data.activeId).boundingClientRect(function (res) { |
| | | if (res && res.top > 0) { |
| | | var myEventDetail = { |
| | | top: res.top |
| | | }; |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true, |
| | | }; |
| | | that.triggerEvent("handleScrollTop", myEventDetail, myEventOption); |
| | | } |
| | | }).exec() |
| | | }, 500) |
| | | } catch (err) {} |
| | | }, |
| | | onLoad() {}, |
| | | observers: { |
| | | treeList: function (newValue) { |
| | |
| | | let buyList = [] |
| | | if (learn.length) buyList = learn.filter((item) => this.properties.buyIds.includes(item.saleMethod.find((citem) => citem.SaleType == 'Normal').Id)) |
| | | // 有父级(包含销售方式),且未购买 |
| | | if (learn.length && !buyList.length) return wx.showToast({ |
| | | if (learn.length && !buyList.length && !item.freeFile) return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请先购买该资源', |
| | | }) |
| | |
| | | const token = wx.getStorageSync(app.config.tokenKey); |
| | | if (!token && this.data.tab != 'jsek_teachingResources') { |
| | | loginInfo(app, (data) => { |
| | | if (data) goPlayerFun() |
| | | if (data) {} |
| | | }) |
| | | } else { |
| | | goPlayerFun() |
| | | } |
| | | |
| | | }, |
| | | |
| | | // 拿到所有项 |