文档上实在找不到
你真傻,我教你吧
var time=0;
var recordTime=null;
wx.startRecord({ success: function(res) { recordTime=setInterval(function(){time++;},1000); }, fail: function(res) { //录音失败 }, complete:function(res){ clearInterval(recordTime); //time就是录音时间}})
wx.startRecord({
success: function(res) {
recordTime=setInterval(function(){time++;},1000);
}, fail: function(res) { //录音失败
},
complete:function(res){
clearInterval(recordTime);
//time就是录音时间
}
})