微信小程序开发之接口卡券wx.openCard

查看微信卡包中的卡券。只有通过 认证 的小程序或文化互动类目的小游戏才能使用。更多文档请参考 微信卡券接口文档。

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) // 卡券添加结果
}
})