From ce3a08b28c16f5cce2185167f8a9030ee16898ed Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期六, 07 九月 2024 14:44:55 +0800 Subject: [PATCH] xiugai --- packageDomain/pages/resourceDetails/myAudio/index.js | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index ea91430..d87cef4 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({ @@ -104,8 +107,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() + } }, /** @@ -772,7 +788,7 @@ myAudio.playbackRate = this.data.speed; // 鎾斁閫熺巼 }, 200); }, - //鑾峰彇瑙嗛瀛︿範 + //鑾峰彇闊抽瀛︿範 getPlayerList() { app.MG.identity .getUserKey({ -- Gitblit v1.9.1