小程序里的alert的表示方法wx.showToas

WCML
<view bindtap="viewTap">绑定了事件</view>
 
JS

viewTap:function(){
wx.showToast({
title: '成功',
icon: 'success',
duration: 2000
})
}

学习链接:https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showToast.html

原文地址:https://www.cnblogs.com/studyh5/p/9831472.html