一、模态框实例 ~~~ Page({ /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { //显示模态框 wx.showToast({ title: '加载中', icon: 'loading', mask: true, duration: 1500 }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { wx.showToast({});//隐藏模态框 } }) ~~~ 二、bindtap实例 ~~~ <view bindtap="clickMe">点击我看看</view> ~~~ ~~~ Page({ clickMe: function(event) { //显示模态框 wx.showToast({ title: '是我', icon: 'loading', mask: true, duration: 1500 }) } }) ~~~