代码如下
const cardList = [{ cardId, code }];
console.log('cardList => ', cardList)
console.log(‘onload’);
console.log(‘before openCard’);
wx.openCard({
cardList,
success(res) {
console.log(‘success res =>’, res);
},
fail(e) {
console.log(‘fail =>’, e);
},
complete() {
console.log(‘complete’)
}
});
console.log(‘after openCard’);
console.log(‘after load’);
success,fail和complete都没被调用,页面无任何反应,这段代码写在onLoad中
调试基础库 1.6.6
cardList有值,之前正常过一段时间。
cardId和code应该也正确,不正确的话页面上应该会显示错误
调试工具中正常,真机有问题