| | |
| | | titleName: items.name |
| | | }) |
| | | this.aliVod(file, this.data.showData) |
| | | |
| | | } else { |
| | | this.setData({ |
| | | showData: items.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.freeFile, |
| | |
| | | // showData: '', |
| | | titleName: item.name |
| | | }) |
| | | |
| | | if (item.selectType == "video" || item.learnSelectType === "video") { |
| | | if (this.data.formPath === "jsek_cloudLearning") { |
| | | |
| | | let file = |
| | | item.protectedFile || item.file ? file = item.protectedFile || item.file : file = item.freeFile |
| | | this.setData({ |
| | |
| | | }, |
| | | |
| | | aliVod(md5, currentVideo) { |
| | | let query = { |
| | | md5: md5, |
| | | appRefCode: app.config.appRefCode |
| | | } |
| | | |
| | | app.MG.file.getAliVod(query).then((res) => { |
| | | if (res) { |
| | | if (res && res.data == '') { |
| | | if (md5) { |
| | | let query = { |
| | | md5: md5, |
| | | appRefCode: app.config.appRefCode |
| | | } |
| | | app.MG.file.getAliVod(query).then((res) => { |
| | | if (res) { |
| | | if (res && res.data == '') { |
| | | this.setData({ |
| | | showDataVod: currentVideo, |
| | | videoLoading: false, |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | showDataVod: res, |
| | | videoLoading: false, |
| | | }) |
| | | } |
| | | this.setData({}) |
| | | } else if (currentVideo) { |
| | | this.setData({ |
| | | showDataVod: currentVideo, |
| | | videoLoading: false, |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | showDataVod: res, |
| | | videoLoading: false, |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '无法获取视频资源', |
| | | }) |
| | | } |
| | | this.setData({}) |
| | | } else if (currentVideo) { |
| | | this.setData({ |
| | | showDataVod: currentVideo, |
| | | videoLoading: false, |
| | | }) |
| | | } else { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '无法获取视频资源', |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '暂无视频资源', |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | timeUpdate(e) { |