当出发某一事件后,希望在规定的时间后自动执行另一事件,比如页面跳转功能。
使用setTimeout函数,单位为毫秒ms
1 setTimeout(function(){ 2 wx.redirectTo({ 3 url: ‘../test/test‘ 4 }) 5 },3000)
微信小程序:设置页面计时自动跳转
原文:https://www.cnblogs.com/huiAlex/p/9463067.html