一、功能描述
当出发某一事件后,希望在规定的时间后自动执行另一事件,比如页面跳转功能。
二、代码实现
使用setTimeout函数,单位为毫秒ms
1 setTimeout(function(){2 wx.redirectTo({3 url: '../test/test'4 })5 },3000)
本文共 226 字,大约阅读时间需要 1 分钟。
当出发某一事件后,希望在规定的时间后自动执行另一事件,比如页面跳转功能。
使用setTimeout函数,单位为毫秒ms
1 setTimeout(function(){2 wx.redirectTo({3 url: '../test/test'4 })5 },3000)
转载于:https://www.cnblogs.com/huiAlex/p/9463067.html