From 75b9f3c8b7959ed7d9930aef73e5cc16b2de1a78 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期三, 09 七月 2025 11:52:09 +0800 Subject: [PATCH] 数字阅读 登录 --- packageDomain/pages/teacherCertification/index.js | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/packageDomain/pages/teacherCertification/index.js b/packageDomain/pages/teacherCertification/index.js index a5d6c50..df343fc 100644 --- a/packageDomain/pages/teacherCertification/index.js +++ b/packageDomain/pages/teacherCertification/index.js @@ -57,17 +57,7 @@ //鑾峰彇鑱岀О this.getpositionalTitle(); this.getAgreement(); - // 妫�鏌ョ櫥褰曠姸鎬� - const token = wx.getStorageSync(app.config.tokenKey) - if (!token) { - loginInfo(app, (data) => { - if (data) { - this.getUserRole() - } - }) - } else { - this.getUserRole() - } + }, /** @@ -81,6 +71,21 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず */ onShow() { + // 妫�鏌ョ櫥褰曠姸鎬� + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + if (data) { + this.getUserRole() + } else { + wx.switchTab({ + url: '/pages/home/home', + }) + } + }) + } else { + this.getUserRole() + } }, -- Gitblit v1.9.1