From 2089ffcd0d238970c794baf6132d9b824064708e Mon Sep 17 00:00:00 2001 From: linju Date: Thu, 14 Nov 2024 14:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E8=A7=A3=E5=86=B3=20web-p?= =?UTF-8?q?c=20=E7=AB=AF=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E8=A1=A5=E5=85=85oauthToken=E9=87=8D=E5=AE=9A?= =?UTF-8?q?=E5=90=91=E5=90=8E=E4=B9=9F=E4=BC=9A=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/init/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/init/index.js b/sdk/init/index.js index f2958a7..8c30d63 100644 --- a/sdk/init/index.js +++ b/sdk/init/index.js @@ -192,7 +192,7 @@ export default async function (initParam) { // 第二次 activate 之后开始 检查token是否已经过期,如果已经过期则重定向至登录页面 const { tokenExpired } = $state.currentUser - if (!isLoginPage && count > 1 && tokenExpired < Date.now()) { + if (!currentPage?.options?.oauthToken && !isLoginPage && count > 1 && tokenExpired < Date.now()) { console.info('uni-im检测到,当前用户登录过且当前登录状态已过期,将自动跳转至登录页面。') uni.reLaunch({ url: '/uni_modules/uni-id-pages/pages/login/login-withpwd', -- GitLab