<audio id='audio' class="audio" bindended="playEnd" bindtap="audio" src="{{i.url}}" data-uid='{{i.uid}}' data-index='{{i.data_index}}' data-isread='{{i.is_read}}' data-time='{{i.time_len}}' data-src='{{i.url}}' wx:if="{{i.url}}" data-current="{{i.current_ppt}}" data-id='{{i.mess_id}}'></audio>
playEnd: function(e){
console.log("此条语音播放完毕")
var key = e.target.dataset.index;
// 获取语音对应message中的位置
var audioIndex = key.split("");
var num = 0;
for (var a = 3; a < audioIndex.length; a++) {
num += audioIndex[a]
}
num = parseInt(num) - 1;
_self.setData({
currentID: 0,
stopAutoPlay: true
})
var data_index = 'key' + (num + 1)
setTimeout(function () {
_self.eachMessage(options, data_index);
}, 500)
}