| | |
| | | // pages/resourceDetails/index.js |
| | | const app = getApp() |
| | | const myAudio = wx.createInnerAudioContext(); |
| | | import { |
| | | loginInfo |
| | | } from '../../../../assets/js/login'; |
| | | // innerAudioContext.onPlay(function callback), |
| | | // InnerAudioContext.onTimeUpdate(function callback) |
| | | Page({ |
| | |
| | | parentName: options.parentName, |
| | | }) |
| | | } |
| | | this.resourceDetailsData() |
| | | this.getNoteList() |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.resourceDetailsData() |
| | | this.getNoteList() |
| | | } else { |
| | | this.resourceDetailsData() |
| | | this.getNoteList() |
| | | } |
| | | }) |
| | | } else { |
| | | this.resourceDetailsData() |
| | | this.getNoteList() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | showDataUrl = datas.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + datas.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + datas.freeFile |
| | | } |
| | | titleName = datas.name; |
| | | console.log(showDataUrl, 676767) |
| | | } |
| | | |
| | | this.setData({ |
| | |
| | | hidden: false |
| | | }); |
| | | this.pubulicPlayFun(); |
| | | |
| | | }); |
| | | }, |
| | | |
| | |
| | | myAudio.playbackRate = this.data.speed; // 播放速率 |
| | | }, 200); |
| | | }, |
| | | //获取视频学习 |
| | | //获取音频学习 |
| | | getPlayerList() { |
| | | app.MG.identity |
| | | .getUserKey({ |