版权声明:黄菊华 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