mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
fix: 优化登录导航逻辑以提升用户体验
- 在 filters.js 中简化登录页面导航逻辑,确保根据不同类型的导航调用正确的 URL - 在 request.js 中调整异常处理,确保 uni.hideLoading() 调用不会导致错误,提升代码健壮性
This commit is contained in:
@@ -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 });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user