uniapp webview 返回上一页

uniapp在安卓端打开webview返回上一页时一直在执行返回上一页命令

需要先关闭webview,然执行跳转

let pages = getCurrentPages()
let page = pages[pages.length - 1];
let currentPages = page.$getAppWebview()
let children = currentPages.children()
children[0].close()
setTimeout(() => {
	uni.navigateBack()
}, 0)
//上面我在安卓上没有用,安卓用下面的方法 
let currentPages = this.$mp.page.$getAppWebview()
let children = currentPages.children()
children[0].close()
setTimeout(() => {
	uni.navigateBack()
}, 0)

你可能感兴趣的:(webview,android,java)