uni.switchTab({
url: "../worker/worker",
success: (res) => {
let data = {
tabIndex: 0 // 要传递的参数,不能带在url后面
}
let page = getCurrentPages().pop();
if (page == undefined || page == null) return;
page.onLoad(data); // 直接调用指定页面的onLoad方法实现刷新
}
});
原文地址: https://www.cnblogs.com/Dark-fire-liehuo/p/11418002.html