I haven’t recorded it for a long time (updated today). When using uniapp to compile into a small program, redirecting in onLaunch will cause the click event to become invalid. However, if you redirected the page using the navigator component to jump and then return, click The event is valid again, there is no problem redirecting in the native WeChat applet
Redirection fails in onLaunch
onLaunch() {
uni.reLaunch({
url: '/pages/user/user'
})
}
Solution
onLaunch() { setTimeout(() => { uni.reLaunch({ url: '/pages/user/user' }) }, 0) }
- After using the delay, it will not appear
I am studying hard, if it is helpful to your study, leave your mark (please like it^_^)
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。