relaunch:fail can not invoke relaunch in

发布于 8 年前作者 fang1614589 次浏览最后编辑 8 年前来自 ask

微信小程序app.js onshow方法中

wx.reLaunch({

  url: ‘/pages/index/index’,

})

报错:

relaunch:fail can not invoke relaunch in background 

1 回复
csong
csong1 楼6 年前

wx.reLaunch在小程序进入后台不能调用,建议加延迟处理