onHide: function () { innerAudioContext.stop(); innerAudioContext.destroy(); }, /** * 生命周期函數--監聽頁面卸載 */ onUnload: function () { innerAudioContext.stop(); innerAudioContext.destroy(); },
必須同時添加stop和destory 我剛開始試了stop和destory兩個調哪一個都不行 后來放一塊就行了,理論上隨便調哪一個都應該是可以的,應該是小程序的bug