fix: 修正登录跳转逻辑和关于页面路径

将登录后的跳转从redirectTo改为navigateBack
修正关于页面跳转登录时的路径错误
This commit is contained in:
feige996
2025-09-29 20:17:40 +08:00
parent aaecf30371
commit ef0fc53f2d
2 changed files with 6 additions and 5 deletions

View File

@@ -28,7 +28,7 @@ function gotoLogin() {
return return
} }
uni.navigateTo({ uni.navigateTo({
url: `${LOGIN_PAGE}?redirect=${encodeURIComponent('/pages/about/about?a=1&b=2')}`, url: `${LOGIN_PAGE}?redirect=${encodeURIComponent('/pages-sub/about/about?a=1&b=2')}`,
}) })
} }
function logout() { function logout() {

View File

@@ -61,10 +61,11 @@ async function doLogin() {
// }) // })
} }
else { else {
console.log('redirectTo:', path) // 自己决定是 redirectTo 还是 navigateBack
uni.redirectTo({ // uni.redirectTo({
url: path, // url: path,
}) // })
uni.navigateBack()
} }
} }
</script> </script>