调用扫码的API后,扫码成功后,怎么就没办法调用audioCtx.play()呢
wx.scanCode({
onlyFromCamera: true,
success: (res) => {
app.data.audioCtx.play(); //此处无法播放…我看到audioId是同一个
console.log(app.data.audioCtx);
},
fail:function(){
app.data.audioCtx.play();
wx.showToast({
title: ‘扫描失败’,
icon: ‘fail’,
duration: 800
})
}
});