| | |
| | | productLinkPath: '', |
| | | threeLeveData: [], |
| | | showData: '', |
| | | showDataVod: '', |
| | | src: '', |
| | | selectedId: null, |
| | | topicId: '', |
| | |
| | | videoError: false, |
| | | videoLoading: false, |
| | | progress: 0, |
| | | playerList: [] |
| | | playerList: [], |
| | | videoLoaidng: true |
| | | }, |
| | | // 格式化笔记时间 |
| | | convertTimestamp(timestamp) { |
| | |
| | | parentName: options.parentName, |
| | | }) |
| | | } |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) {} else {} |
| | | }) |
| | | } |
| | | this.resourceDetailsData() |
| | | this.getNoteList() |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | }, |
| | | onTabsChange(event) { |
| | | |
| | | console.log(event, 234) |
| | | let tabValue = event.detail.value |
| | | if (tabValue == '1') { |
| | | this.getNoteList() |
| | | } |
| | | }, |
| | | |
| | | onTabsClick(event) { |
| | | |
| | | }, |
| | | handleChange(e) { |
| | | this.setData({ |
| | | activeValues: e.detail.value, |
| | |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey), |
| | | 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, |
| | | titleName: items.name |
| | | }) |
| | | this.aliVod(items.file, this.data.showData) |
| | | } |
| | | let selectedIndex = index; // 存储选中项的索引 |
| | | this.setData({ |
| | |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey) |
| | | }) |
| | | this.aliVod(file, this.data.showData) |
| | | } else { |
| | | this.setData({ |
| | | showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, |
| | | }) |
| | | this.aliVod(item.file, this.data.showData) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | aliVod(md5, currentVideo) { |
| | | 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, |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | showDataVod: res, |
| | | }) |
| | | } |
| | | } else if (currentVideo) { |
| | | this.setData({ |
| | | showDataVod: currentVideo, |
| | | }) |
| | | } else { |
| | | return ElMessage.error('无法获取视频资源') |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | timeUpdate(e) { |
| | | console.log(2); |
| | | let { |
| | | currentTime, |
| | | duration |
| | |
| | | }); |
| | | }, |
| | | loadedmetadata(e) { |
| | | console.log(1); |
| | | this.setData({ |
| | | videoLoaidng: false |
| | | }) |