Commit d82f4db5aa64427c4cddef19a0be3a6a9ac945f9

Authored by pengye
1 parent 8e41f492

邀请函2-17语音播报切换到首页继续播报的问题

@@ -824,8 +824,11 @@ Page({ @@ -824,8 +824,11 @@ Page({
824 * 生命周期函数--监听页面卸载 824 * 生命周期函数--监听页面卸载
825 */ 825 */
826 onUnload() { 826 onUnload() {
827 -  
828 - }, 827 + clearInterval(this.timers)
  828 + if (this.audioCtx) {
  829 + this.audioCtx.destroy(); // 释放音频资源
  830 + }
  831 +z },
829 832
830 /** 833 /**
831 * 页面相关事件处理函数--监听用户下拉动作 834 * 页面相关事件处理函数--监听用户下拉动作
@@ -779,7 +779,10 @@ Page({ @@ -779,7 +779,10 @@ Page({
779 * 生命周期函数--监听页面卸载 779 * 生命周期函数--监听页面卸载
780 */ 780 */
781 onUnload() { 781 onUnload() {
782 - 782 + clearInterval(this.timers)
  783 + if (this.audioCtx) {
  784 + this.audioCtx.destroy(); // 释放音频资源
  785 + }
783 }, 786 },
784 787
785 /** 788 /**
@@ -779,7 +779,10 @@ Page({ @@ -779,7 +779,10 @@ Page({
779 * 生命周期函数--监听页面卸载 779 * 生命周期函数--监听页面卸载
780 */ 780 */
781 onUnload() { 781 onUnload() {
782 - 782 + clearInterval(this.timers)
  783 + if (this.audioCtx) {
  784 + this.audioCtx.destroy(); // 释放音频资源
  785 + }
783 }, 786 },
784 787
785 /** 788 /**
@@ -778,7 +778,10 @@ Page({ @@ -778,7 +778,10 @@ Page({
778 * 生命周期函数--监听页面卸载 778 * 生命周期函数--监听页面卸载
779 */ 779 */
780 onUnload() { 780 onUnload() {
781 - 781 + clearInterval(this.timers)
  782 + if (this.audioCtx) {
  783 + this.audioCtx.destroy(); // 释放音频资源
  784 + }
782 }, 785 },
783 786
784 /** 787 /**
@@ -730,7 +730,10 @@ Page({ @@ -730,7 +730,10 @@ Page({
730 * 生命周期函数--监听页面卸载 730 * 生命周期函数--监听页面卸载
731 */ 731 */
732 onUnload() { 732 onUnload() {
733 - 733 + clearInterval(this.timers)
  734 + if (this.audioCtx) {
  735 + this.audioCtx.destroy(); // 释放音频资源
  736 + }
734 }, 737 },
735 738
736 /** 739 /**
@@ -779,7 +779,10 @@ Page({ @@ -779,7 +779,10 @@ Page({
779 * 生命周期函数--监听页面卸载 779 * 生命周期函数--监听页面卸载
780 */ 780 */
781 onUnload() { 781 onUnload() {
782 - 782 + clearInterval(this.timers)
  783 + if (this.audioCtx) {
  784 + this.audioCtx.destroy(); // 释放音频资源
  785 + }
783 }, 786 },
784 787
785 /** 788 /**
@@ -778,7 +778,10 @@ Page({ @@ -778,7 +778,10 @@ Page({
778 * 生命周期函数--监听页面卸载 778 * 生命周期函数--监听页面卸载
779 */ 779 */
780 onUnload() { 780 onUnload() {
781 - 781 + clearInterval(this.timers)
  782 + if (this.audioCtx) {
  783 + this.audioCtx.destroy(); // 释放音频资源
  784 + }
782 }, 785 },
783 786
784 /** 787 /**
@@ -815,7 +815,10 @@ Page({ @@ -815,7 +815,10 @@ Page({
815 * 生命周期函数--监听页面卸载 815 * 生命周期函数--监听页面卸载
816 */ 816 */
817 onUnload() { 817 onUnload() {
818 - 818 + clearInterval(this.timers)
  819 + if (this.audioCtx) {
  820 + this.audioCtx.destroy(); // 释放音频资源
  821 + }
819 }, 822 },
820 823
821 /** 824 /**