wx.showModal常用属性
属性 类型 默认值 必填 说明
title string 否 提示的标题
content string 否 提示的内容
showCancel boolean true 否 是否显示取消按钮
cancelText string ‘取消’ 否 取消按钮的文字,最多 4 个字符
confirmText string ‘确定’ 否 确认按钮的文字,最多 4 个字符
wx.showToast({
title: '取货失败',
icon: 'loading',
duration: 1000
})
wx.showModal({
title: '提示',
content: '是否取消订单',
confirmText: '是',
cancelText:'否',
success(res) {
if (res.confirm) {
}else if (res.cancel) {
}
}
});