查看微信卡包中的卡券。只有通過 認證 的小程序或文化互動類目的小游戲才能使用。更多文檔請參考 微信卡券接口文檔。
wx.openCard({
cardList: [{
cardId: '',
code: ''
}, {
cardId: '',
code: ''
}],
success (res) {www.cnmibee.com }
})
2,wx.addCard
批量添加卡券。只有通過 認證 的小程序或文化互動類目的小游戲才能使用。更多文檔請參考 微信卡券接口文檔。
wx.addCard({
cardList: [
{
cardId: '',
cardExt: '{"code": "", "openid": "", "timestamp": "", "signature":""}'
}, {
cardId: '',
cardExt: '{"code": "", "openid": "", "timestamp": "", "signature":""}'
}
],
success (res) {
console.log(res.cardList) // 卡券添加結果
}
})
