fix(router): 在导航拦截器中添加缺失的return语句
防止在不需要登录的情况下继续执行后续逻辑
This commit is contained in:
@@ -61,6 +61,7 @@ export const navigateToInterceptor = {
|
||||
else {
|
||||
console.log('isNeedLogin redirectUrl:', redirectUrl)
|
||||
uni.navigateTo({ url: redirectUrl })
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,6 +72,7 @@ export const navigateToInterceptor = {
|
||||
if (EXCLUDE_PAGE_LIST.includes(path)) {
|
||||
console.log('isNeedLogin redirectUrl:', redirectUrl)
|
||||
uni.navigateTo({ url: redirectUrl })
|
||||
return
|
||||
}
|
||||
}
|
||||
// #endregion 2/2 不需要登录的情况 ---------------------------
|
||||
|
||||
Reference in New Issue
Block a user