search

Home  >  Q&A  >  body text

javascript - 微信wx.addCard添加卡券,而取消领取,为什么是调用fail,而不是cancel回调函数

wx.addCard({
            cardList: [{
                cardId: cardPackage.card_id,
                cardExt: '{"code":"","openid":"","timestamp":"'+cardPackage.timestamp+'","signature":"'+cardPackage.signature+'"}'
            }], // 需要添加的卡券列表
            success: function (res) {   
                console.log("你成功领取了奖品!");
            },
            cancel: function (res) {
              
              
            },
            fail:function(res){
                console.log("失败")
           
            }
        });

取消领取卡券会调用 fail 回调函数,为什么不是cancel?

PHP中文网PHP中文网2826 days ago881

reply all(0)I'll reply

No reply
  • Cancelreply