From 8dc4e50769a7ebc5f0a3d766f61aa08b8f23b772 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 06 九月 2024 11:23:21 +0800 Subject: [PATCH] login --- pages/digitalTextbooks/digitalTextbooksDetails/index.js | 38 ++++++++++++++++++++++---------------- 1 files changed, 22 insertions(+), 16 deletions(-) diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.js b/pages/digitalTextbooks/digitalTextbooksDetails/index.js index 7bef3b4..dee28fb 100644 --- a/pages/digitalTextbooks/digitalTextbooksDetails/index.js +++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.js @@ -89,6 +89,12 @@ this.setData({ digitalTextId: options.id }) + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + if (data) {} else {} + }) + } this.digitalTextbooksDetailsGet(this.data.digitalTextId) this.getType() this.getCertificateList() @@ -720,14 +726,14 @@ }, onCertificate() { - // if (!this.data.isBuy) { - // wx.showToast({ - // title: "璇峰厛璐拱锛屼綋楠屽畬鏁存湇鍔�", - // icon: "none", - // duration: 1000, - // }); - // return false - // } + if (!this.data.isBuy) { + wx.showToast({ + title: "璇峰厛璐拱锛屼綋楠屽畬鏁存湇鍔�", + icon: "none", + duration: 1000, + }); + return false + } // if (!this.data.isLearn) { // wx.showToast({ // title: "鎮ㄧ殑瀛︿範浠诲姟杩樻湭瀹屾垚锛屾殏涓嶈兘鐢宠璇佷功锛屽姞娌瑰摝锛�", @@ -736,14 +742,14 @@ // }); // return false // } - // if (this.data.isCertificate && this.data.isCertificate.state == 'WaitAudit') { - // wx.showToast({ - // title: "鎮ㄧ敵璇风殑璇佷功姝e湪瀹℃牳涓�", - // icon: "none", - // duration: 1000, - // }); - // return false - // } + if (this.data.isCertificate && this.data.isCertificate.state == 'WaitAudit') { + wx.showToast({ + title: this.data.isCertificate.state == 'WaitAudit' ? "鎮ㄧ敵璇风殑璇佷功姝e湪瀹℃牳涓�" : this.data.isCertificate.state == 'Normal' ? '鎮ㄥ凡鐢宠璇佷功' : '', + icon: "none", + duration: 1000, + }); + return false + } var page = getCurrentPages().pop(); // 鑾峰彇褰撳墠椤甸潰瀹炰緥 page.setData({ -- Gitblit v1.9.1