<button type="default" bindtap='toastClick'>弹出Toast</button>
<button type="default" bindtap='modelClick'>弹出Model</button>
1.Toast
toastClick:function(){
wx.showToast({
title: '成功',
icon:"success",
duration:2000
});
setTimeout(function(){
wx.hideToast()
},1000);
}
2.Model
modelClick:function(){
wx.showModal({
title: '提示',
content: '你好,你已经成功设置了这个控件',
success:function(res){
if(res.confirm){
console.log("确定");
}
else{
console.log("取消");
}
}
})
},