diff --git a/src/core/service/plugins/app/router-guard.js b/src/core/service/plugins/app/router-guard.js
index d38aab24ee803d9050bd50137ad9676eb7de165f..a50899bdd69e07c46acda81947f1e1135e336b63 100644
--- a/src/core/service/plugins/app/router-guard.js
+++ b/src/core/service/plugins/app/router-guard.js
@@ -61,12 +61,26 @@ function beforeEach (to, from, next, routes) {
case 'redirectTo':
// 关闭前一个页面
removeKeepAliveInclude.call(this, fromName)
+ if (from.meta) {
+ if (from.meta.isQuit) { // 如果 redirectTo 的前一个页面是 quit 类型,则新打开的页面也是 quit
+ to.meta.isQuit = true
+ to.meta.isEntry = !!from.meta.isEntry
+ }
+ if (from.meta.isTabBar) { // 如果是 tabBar,需要更新系统组件 tabBar 内的 list 数据
+ to.meta.isTabBar = true
+ to.meta.tabBarIndex = from.meta.tabBarIndex
+ const appVm = getApp().$children[0]
+ appVm.$set(appVm.tabBar.list[to.meta.tabBarIndex], 'pagePath', to.meta.pagePath)
+ }
+ }
+
break
case 'switchTab':
switchTab.call(this, routes)
break
case 'reLaunch':
reLaunch.call(this, toName)
+ to.meta.isQuit = true // reLaunch后,该页面为 quit 类型
break
default:
// 后退或非 API 访问
diff --git a/src/core/view/bridge/subscribe/scroll.js b/src/core/view/bridge/subscribe/scroll.js
index 921712fdd0445d175149946cf4ed064f218545d0..c0d3dfe911de5b001f2a28e91979d904881a4342 100644
--- a/src/core/view/bridge/subscribe/scroll.js
+++ b/src/core/view/bridge/subscribe/scroll.js
@@ -20,7 +20,8 @@ export function pageScrollTo ({
scrollTop = Math.min(scrollTop, scrollHeight - clientHeight)
if (duration === 0) {
- documentElement.scrollTop = scrollTop
+ // 部分浏览器(比如微信)中 scrollTop 的值需要通过 document.body 来控制
+ documentElement.scrollTop = document.body.scrollTop = scrollTop
return
}
diff --git a/src/platforms/h5/components/page/index.vue b/src/platforms/h5/components/page/index.vue
index 3ba46d0eeeea778891e34f1fa712e0b1e09d8d77..f532d39cdbdd5ea58cae54aec1a27d397d6bac56 100644
--- a/src/platforms/h5/components/page/index.vue
+++ b/src/platforms/h5/components/page/index.vue
@@ -22,11 +22,11 @@