分享你我的心得.
共乘一片美好网络.

showToast透明成功窗口

第一种不带确定和取消按钮。可以用在判断注册成功或失败的验证。

/**
* 生命周期函数–监听页面加载
*/
onLoad: function (options) {
var that = this
wx.showToast({
title:’成功’,
icon:’success’,
duration:2000
})
},

第二种弹框的时候如果icon:none只是提示title里的文字不会有样式的弹框显示。

隐藏消息提示框

/**
* 生命周期函数–监听页面加载
*/
onLoad: function (options) {
wx.showToast({
title: ‘加载中’,
icon:’loading’,
duration:10000
})
setTimeout(function(){
wx.hideToast()
},2000)

},

关闭当前页面,跳转到应用内的某个页面。

wx.redirectTo(OBJECT)

wx.redirectTo({
url: ‘../index/index’,
})

赞(0)
未经允许不得转载:小叶白龙博客 » showToast透明成功窗口
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址