当前页
let pages = getCurrentPages();
let prePage = pages[pages.length - 2]
prePage.data.isDoRefresh = true
setTimeout(() => {
uni.navigateBack()
}, 1500)
上一页
data() {
return {
isDoRefresh: false
}
},
onShow() {
let pages = getCurrentPages()
let curPage = pages[pages.length - 1]
if (curPage.data.isDoRefresh) {
curPage.data.isDoRefresh = false
this.getDetail() // 需要调用的方法
}
},