@@ -50,7 +50,10 @@ export function useAudio() {
uni.$emit('destory-stop')
}
-
+ // 离开当前页面 停止播放
+ uni.$on('back-outpage',() => {
+ handleStop();
+ })
// 播放过程中点击同一个视频触发终止
uni.$on('repeat-play-to-stop',() => {
@@ -134,6 +134,7 @@
uni.redirectTo({
url: `/pages/study/index`
})
+ uni.$emit('back-outpage')
function onSwiperChange(index) {
@@ -129,6 +129,7 @@
url: '/pages/my/index'
function handleBackFromCuoti() {