| src/pages/not-on-whitelist/index.tsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/pages/not-on-whitelist/index.tsx
@@ -27,6 +27,17 @@ if (typeof Taro.hideHomeButton === 'function') { Taro.hideHomeButton(); } // 用户在登录页点击「返回 / 暂不登录」回到本页时,登录页会向本页写入 loginSuccess === false。 // 此时说明用户主动放弃登录,不再重新发起白名单/登录校验,直接回首页,避免循环跳登录页。 const pages = Taro.getCurrentPages(); const currentPage: any = pages[pages.length - 1]; if (currentPage && currentPage.data && currentPage.data.loginSuccess === false) { currentPage.setData({ loginSuccess: '' }); Taro.switchTab({ url: '/pages/home/index' }); return; } setShouldRenderImage(false); // 1. 检查登录态