From abbd7d18ea431ee8b6b8e634abf3e8ccb1fbb1b3 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 28 三月 2025 18:43:33 +0800 Subject: [PATCH] 登录迁移 --- packageDomain/pages/resourceDetails/myAudio/index.js | 39 ++++++++++++++++++--------------------- 1 files changed, 18 insertions(+), 21 deletions(-) diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index 1f9723c..85e1bc6 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -62,6 +62,7 @@ learnStartTime: 0, learnTimeList: [], learnTimeData: 0, + toView: 'activeName', }, format(time) { @@ -115,27 +116,14 @@ parentName: options.parentName, }) } - 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() - } if (options.formPath == 'jsek_cloudLearning') { + this.getNoteList() this.setData({ learnStartTime: Date.now(), }) this.getLearnTime() } + this.resourceDetailsData() this.getBookInfo(options.bookId) }, @@ -338,11 +326,17 @@ }, onTakeNotes() {}, showDialog(e) { - this.setData({ - submitTitle: this.data.titleName, - dialogKey: true, - textvalue: '' - }); + const token = wx.getStorageSync(app.config.tokenKey); + if (token) { + this.setData({ + submitTitle: this.data.titleName, + dialogKey: true, + textvalue: '' + }); + } else { + loginInfo(app, (data) => {}) + } + }, closeDialog() { @@ -460,7 +454,8 @@ showData: showDataUrl, titleName: titleName, loading: false, - hidden: false + hidden: false, + toView: 'activeName' + selectedId, }); this.pubulicPlayFun(); } else { @@ -907,6 +902,8 @@ }) }, setPlayerList() { + const token = wx.getStorageSync(app.config.tokenKey); + if (!token) return let that = this if (that.data.progress > 0) { let index = that.data.playerList.findIndex((itemData) => itemData.cmsItemId == that.data.activeId) -- Gitblit v1.9.1