当出发某一事件后,但愿在规定的时间后自动执行另外一事件,好比页面跳转功能。函数
使用setTimeout函数,单位为毫秒msurl
1 setTimeout(function(){ 2 wx.redirectTo({ 3 url: '../test/test' 4 }) 5 },3000)