1、检查是否是跳转至TabBar页面,如果是TabBar页面,则需要用uniapp.switchTab进行跳转;
2、检查跳转路径是否写正确。
3、可以打印错误信息进行检查,具体如下面代码注释部分所示。
tapupdate(){
this.updatetap = !this.updatetap
//调取发布时存储的数据然后跳转页面并进行渲染...
uni.switchTab({
url:'../publish/publish',
// fail (error) {
// console.log(error)
// }
})
},