Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第三方H5回退会触发 uni-app afterEach #455

Open
huapisong opened this issue Jun 26, 2023 · 2 comments
Open

第三方H5回退会触发 uni-app afterEach #455

huapisong opened this issue Jun 26, 2023 · 2 comments

Comments

@huapisong
Copy link

问题描述
uni-app 跳转到 第三方H5 P1, P1 跳转到 H5 P2页面
在H5 P2页面回退到 H5 P1, 会触发 uni-app afterEach 导致to和from 信息不对
H5 P1 回退到 app 导致 getCurrentPages 获取的栈丢失,无法获取当前页面

复现步骤
[复现问题的步骤]

  1. 启动 '...'
  2. 点击 '....'
  3. 查看

[或者可以直接贴源代码]

预期结果
内嵌三方H5中内部回退不触发 uni-app afterEach

实际结果
内嵌三方H5中内部回退会触发 uni-app afterEach

系统信息:

  • 发行平台: 5+ App
  • 操作系统 [Android 7.0]
  • HBuilderX版本 [3.8.4.20230531]
  • 项目创建方法 [HBuilderX]
  • 设备信息 [huawei nova 7]
  • uni-simple-router版本 [v2.0.7]

补充信息
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]

@SilurianYang
Copy link
Owner

app 中嵌套 webview 然后加载h5页面,在h5页面中返回时触发了路由守卫是吗?

@huapisong
Copy link
Author

是的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants