wx.playVoice({
filePath: "本地文件路径",
success: function () {
console.log('----1--------'+"\n");
}, fail: function () {
console.log('----2--------'+"\n");
},
complete: function () {
console.log('----3--------' + "\n");
}
});
打印结果为 ---1--- 与-----3---- 也就是已经成功了,但是就是没有声音啊, 运维环境是微信小程序的开发工具里面运行的。
请参考:https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/wx.playVoice.html?search-key=playVoice
多谢!!