返回上一页,页面刷新
motheds:{
// 编辑
submitEdmit() {
let pages = getCurrentPages(); // 当前页面
let prePage = pages[pages.length - 2]; // 上一页
prePage.$vm.list()//调用上一页方法getList()
uni.switchTab({
url:"/pages/index/index"
})
}
}
tabber跳转,页面刷新
submit() {
uni.switchTab({
url: '/pages/index/index',
success: function(e) {
// pop() 方法用于删除数组其他元素并返回数组的最后一个元素
let currentPage = getCurrentPages().pop(); //当前页面
if (currentPage == undefined || currentPage == null) return;
currentPage.onLoad(); //页面存在刷新当前页面
//currentPage.onShow()
//currentPage.onReady()
// 或者执行其他生命周期刷新
}
})
}