时间:2019-05-03 来源:小程序工厂
onLoad:function(){
//异步
network.request(){
success:res=>{
var innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.onPlay(()=>{}
innerAudioContext.src = res.music
innerAudioContext.obeyMuteSwitch = false
innerAudioContext.play()
}
}
}
提供下代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。