微信小程序点击播放MP3音频文件

onload({
this.innerAudioContext = wx.createInnerAudioContext(); //初始化音频播放文件
}) 

    /*选择发音员*/
    goSelectVoice: function(e) {
      let that = this
      var a = e.currentTarget.dataset.index //当前选择的选项ID
      this.setData({
          selectVoice: a
      })
//
      this.innerAudioContext && this.innerAudioContext.stop(), 
      this.innerAudioContext.src = 'https://btaotao-1255753702.cos.ap-guangzhou.myqcloud.com/qushuiyinxcx/ico/'+ a +'.mp3' 
      this.innerAudioContext.play();
//
    },
//页面退出时销毁音频播放
    onUnload:function(){
      this.innerAudioContext.destroy();
    },