| | |
| | | // 跳转音视频播放器 |
| | | goPlayer(e) { |
| | | // 检查登录状态 |
| | | console.log(e.currentTarget.dataset.item) |
| | | const token = wx.getStorageSync(app.config.tokenKey); |
| | | if (!token) return false |
| | | const goPlayerFun = () => { |
| | | const item = e.currentTarget.dataset.item; |
| | | const parent = e.currentTarget.dataset.parent; |
| | | const parentProductLinkPath = parent ? |
| | |
| | | }) |
| | | } |
| | | if (item.selectType == 'zip' || item.learnSelectType == 'zip') { |
| | | // if (this.properties.applyState == 'Normal') { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请前往PC端下载', |
| | | }) |
| | | // } else { |
| | | // return wx.showToast({ |
| | | // icon: 'error', |
| | | // title: '请先申请下载', |
| | | // }) |
| | | // } |
| | | } |
| | | if (this.properties.tab == "jsek_teachingResources" && (item.file || item.freeFile)) { |
| | | let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile] |
| | |
| | | } |
| | | } |
| | | if (this.properties.tab == "jsek_cloudLearning") { |
| | | |
| | | // 1.找出所有父级目录和本身(有销售方式) 和 云学习本身(有销售方式) 放到一个数组 为空则暂未开放销售 |
| | | let learn = [] |
| | | if (this.properties.isCloundHaveSaleMethod) { |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | let url; |
| | | if (item.selectType == "video" || item.learnSelectType == "video") { |
| | |
| | | wx.navigateTo({ |
| | | url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`, |
| | | }); |
| | | } |
| | | const token = wx.getStorageSync(app.config.tokenKey); |
| | | if (!token && this.data.tab != 'jsek_teachingResources') { |
| | | loginInfo(app, (data) => { |
| | | if (data) goPlayerFun() |
| | | }) |
| | | } else { |
| | | goPlayerFun() |
| | | } |
| | | |
| | | }, |
| | | |
| | | // 拿到所有项 |