WXML <button bindtap="startRecord">开始录音</button> demo.js startRecord: function() { wx.startRecord({ success: function(res) { var tempFilePath = res.tempFilePath }, fail: function(res) { //录音失败 } }) }
WXML
demo.js