微信小程序:设置页面计时自动跳转

一、功能描述

当出发某一事件后,希望在规定的时间后自动执行另一事件,比如页面跳转功能。

二、代码实现

使用setTimeout函数,单位为毫秒ms

1 setTimeout(function(){
2       wx.redirectTo({
3         url: '../test/test'
4       })
5 },3000)

  

  

原文地址:https://www.cnblogs.com/huiAlex/p/9463067.html