| | |
| | | parentProductLinkPath: '', |
| | | productLinkPath: '', |
| | | threeLeveData: [], |
| | | source: "", |
| | | showData: '', |
| | | showDataVod: '', |
| | | src: '', |
| | |
| | | videoLoading: false, |
| | | progress: 0, |
| | | playerList: [], |
| | | videoLoaidng: true |
| | | videoLoading: true |
| | | }, |
| | | // 格式化笔记时间 |
| | | convertTimestamp(timestamp) { |
| | |
| | | productLinkPath: options.productLinkPath, |
| | | formPath: options.formPath, |
| | | flag: false, |
| | | source: options.source, |
| | | }) |
| | | if (options.parentName !== "教学资源" && options.parentName !== "云学习") { |
| | | this.setData({ |
| | |
| | | }, |
| | | resourceDetailsData() { |
| | | this.setData({ |
| | | videoLoaidng: true, |
| | | videoLoading: true, |
| | | loading: true |
| | | }) |
| | | let query = { |
| | |
| | | } |
| | | app.MG.store.getProductDetail(query).then(res => { |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | if (item.selectType === "video" || item.learnSelectType === "video") { |
| | | this.data.threeLeveData.push(item) |
| | | this.setData({ |
| | | threeLeveData: this.data.threeLeveData |
| | | }) |
| | | if (this.data.source == 'qrcode') { |
| | | if (item.id == this.data.activeId) { |
| | | this.data.threeLeveData.push(item); |
| | | } |
| | | } else { |
| | | if (item.selectType === "video" || item.learnSelectType === "video") { |
| | | this.data.threeLeveData.push(item) |
| | | this.setData({ |
| | | threeLeveData: this.data.threeLeveData |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | this.data.threeLeveData.forEach((items, index) => { // 修改此处添加index参数 |
| | |
| | | this.setPlayerList() |
| | | const item = e.currentTarget.dataset.item |
| | | this.setData({ |
| | | videoLoaidng: true, |
| | | videoLoading: true, |
| | | selectedId: e.currentTarget.dataset.index, |
| | | activeId: item.id, |
| | | // showData: '', |
| | |
| | | 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 { |
| | | return ElMessage.error('无法获取视频资源') |
| | |
| | | loadedmetadata(e) { |
| | | console.log(1); |
| | | this.setData({ |
| | | videoLoaidng: false |
| | | videoLoading: false |
| | | }) |
| | | } |
| | | }) |