diff --git a/sdk/init/index.js b/sdk/init/index.js index f2958a7aec21a108c85199988dfda4fdc5ef05aa..8c30d63f43fc194ca11ac82dedbc9056b4901dd9 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',