Commit 5f10cadf by 李伟康

fix(api): 优化登录跳转逻辑

- 在 Request 类中的 handleLogin 方法中添加了对当前页面路由的判断
- 避免在登录页面时重复跳转到登录页面
1 parent 56e378c8
......@@ -79,8 +79,10 @@ class Request {
return;
}
if (code == 20 || code == 21) {
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading();
uni.reLaunch({
if (currentPage.route != 'pages/common/login') uni.reLaunch({
url: "/pages/common/login",
});
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!