当前位置:网站首页>After the uniapp jumps to the page in onlaunch, click the event failure solution

After the uniapp jumps to the page in onlaunch, click the event failure solution

2022-07-07 11:07:00 Wolf who likes to knock code

stay onLaunch Redirection in will cause the click event to fail

resolvent :

1、 Add one to the jump function setTimeout, But sometimes setTimeout Jump in function failed

onLaunch() {
  setTimeout(() => {
      uni.reLaunch({
          url: '/pages/user/user'
      })
  }, 0)
}

2、 In the new jump page onLoad Write your own logic

原网站

版权声明
本文为[Wolf who likes to knock code]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070901021650.html