看来还是小游戏做的少啊,你这个事情可以监听:
wx.onAudioInterruptionBegin
wx.onAudioInterruptionEnd
像你这种情况,下拉菜单时会触发wx.onAudioInterruptionBegin,菜单上拉恢复时会触发wx.onAudioInterruptionEnd,这两个函数你可以想象成onHide和onShow就行,后面就不用我说如何处理你的声音恢复操作了吧?
接口说明地址:
https://developers.weixin.qq.com/minigame/dev/api/base/app/app-event/wx.onAudioInterruptionEnd.html