redirectTo:关闭当前页(卸载),跳转到指定页
navigateTo:保留当前页(隐藏),跳转到指定页
switchTap:只能用于跳转到tabbar页面,并关闭其他非tabbar页面,tabbar之间做切换
// 监听页面返回
onBackPress(event) {
console.log("111");
if (event.from == "backbutton") {
console.log("111");
uni.redirectTo({
url: "/pages/sfc/line-receive/index",
});
return true
}
},
uni.navigateTo({
url:
`/pages/sfc/line-receive/detail?id=` +
JSON.stringify(this.detaildata),
animationType: "pop-in",
animationDuration: 200,
});