提交 505e3fe1 编写于 作者: fxy060608's avatar fxy060608

fix(app): popGesture with direct page

上级 91b4906f
...@@ -17,10 +17,12 @@ export function onWebviewPopGesture (webview) { ...@@ -17,10 +17,12 @@ export function onWebviewPopGesture (webview) {
setStatusBarStyle(popStartStatusBarStyle) setStatusBarStyle(popStartStatusBarStyle)
} else if (e.type === 'end' && e.result) { } else if (e.type === 'end' && e.result) {
const pages = getCurrentPages() const pages = getCurrentPages()
const len = pages.length
const page = pages[pages.length - 1] const page = pages[pages.length - 1]
page && page.$remove() page && page.$remove()
setStatusBarStyle() setStatusBarStyle()
if (page && isDirectPage(page)) { // 仅当存在一个页面,且是直达页面时,才 reLaunch 首页
if (page && len === 1 && isDirectPage(page)) {
reLaunchEntryPage() reLaunchEntryPage()
} else { } else {
UniServiceJSBridge.emit('onAppRoute', { UniServiceJSBridge.emit('onAppRoute', {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册