From 99dfeb5fc86bce593a5d3f43f45c26eedc00ab0a Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 10 九月 2024 16:28:54 +0800 Subject: [PATCH] bug --- packageDomain/pages/resourceDetails/myAudio/index.js | 39 +++++++++++++++++++++++++++++++-------- 1 files changed, 31 insertions(+), 8 deletions(-) diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index 27fce10..9c6860f 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -1,6 +1,9 @@ // 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({ @@ -27,6 +30,7 @@ parentProductLinkPath: '', productLinkPath: '', threeLeveData: [], + source: "", showData: '', src: '', selectedId: null, @@ -96,7 +100,8 @@ cmsId: options.cmsId, parentProductLinkPath: options.parentProductLinkPath, productLinkPath: options.productLinkPath, - formPath: options.formPath + formPath: options.formPath, + source: options.source, }) if (options.parentName !== "鏁欏璧勬簮" && options.parentName !== "浜戝涔�") { @@ -104,8 +109,21 @@ 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() + } }, /** @@ -266,9 +284,16 @@ let titleName = ''; res.datas.cmsDatas[0].datas.forEach((item, index) => { - if (item.selectType === "audio" || item.learnSelectType === "audio") { - this.data.threeLeveData.push(item); + if (this.data.source == 'qrcode') { + if (item.id == this.data.activeId) { + this.data.threeLeveData.push(item); + } + } else { + if (item.selectType === "audio" || item.learnSelectType === "audio") { + this.data.threeLeveData.push(item); + } } + }); this.data.threeLeveData.forEach((items, indexs) => { if (this.data.productLinkPath == items.productLinkPath) { @@ -284,7 +309,6 @@ 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({ @@ -296,7 +320,6 @@ hidden: false }); this.pubulicPlayFun(); - }); }, @@ -774,7 +797,7 @@ myAudio.playbackRate = this.data.speed; // 鎾斁閫熺巼 }, 200); }, - //鑾峰彇瑙嗛瀛︿範 + //鑾峰彇闊抽瀛︿範 getPlayerList() { app.MG.identity .getUserKey({ -- Gitblit v1.9.1