fix: 优化登录导航逻辑以提升用户体验

- 在 filters.js 中简化登录页面导航逻辑,确保根据不同类型的导航调用正确的 URL
- 在 request.js 中调整异常处理,确保 uni.hideLoading() 调用不会导致错误,提升代码健壮性
This commit is contained in:
Yer11214
2026-07-13 18:06:54 +08:00
parent 38defd1201
commit 239855e53b
2 changed files with 10 additions and 10 deletions

View File

@@ -496,16 +496,16 @@ export function navigateToLogin (type = "navigateTo") {
* 微信小程序跳转到微信小程序登录页面 * 微信小程序跳转到微信小程序登录页面
* H5/App跳转到普通登录页面 * H5/App跳转到普通登录页面
*/ */
let url = "/pages/passport/login";
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
uni[type]({ url = "/pages/passport/wechatMPLogin";
url: "/pages/passport/wechatMPLogin",
});
// #endif
// #ifndef MP-WEIXIN
uni[type]({
url: "/pages/passport/login",
});
// #endif // #endif
if (type === "redirectTo") {
uni.redirectTo({ url });
} else {
uni.navigateTo({ url });
}
} }
/** /**