showModal 回调函数fail不响应
以下写法,不管弹出的点击哪个按钮(确定或取消)都是回调到succes函数里面,fail函数不会回调。
wx.showModal({
title: “title”,
content: “xxx”,
success: function©{
console.log(‘success’, c)
},
fail: function(a){
console.log(‘fail’, a)
},
complete: function(b){
console.log(‘complete’, b)
}
})
无论点击哪个按钮都是如下输出:
success Object {errMsg: “showModal:ok”, confirm: false}
profile.js [sm]:56 complete Object {errMsg: “showModal:ok”, confirm: false}