微信小程序api视频课程-定时器-setTimeout的使用

版权声明:黄菊华 https://blog.csdn.net/u013818205/article/details/88655443

JS代码

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    setTimeout(
      function(){
        wx.showToast({
          title: '黄菊华老师',
        })
      },2000
      )
  },

说明

该代码只执行一次

欢迎大家收看我的视频教程:微信小程序常用API使用
https://edu.csdn.net/course/detail/16194
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u013818205/article/details/88655443
今日推荐