|
@@ -1,6 +1,6 @@
|
|
import {ref, watch,computed} from "vue";
|
|
import {ref, watch,computed} from "vue";
|
|
import {gooseGrowthTypeList} from "./constantConfig.js";
|
|
import {gooseGrowthTypeList} from "./constantConfig.js";
|
|
-import {onHide} from "@dcloudio/uni-app"
|
|
|
|
|
|
+import {onHide,onUnload} from "@dcloudio/uni-app"
|
|
|
|
|
|
const audioList = {
|
|
const audioList = {
|
|
0: [
|
|
0: [
|
|
@@ -77,6 +77,11 @@ export function useAudio (grouthType) {
|
|
onHide(() => {
|
|
onHide(() => {
|
|
innerAudioContext.value.stop();
|
|
innerAudioContext.value.stop();
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ onUnload(() => {
|
|
|
|
+ innerAudioContext.value.stop();
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
|
|
// 展开食物停止播放
|
|
// 展开食物停止播放
|
|
uni.$on('food-select-open', () => {
|
|
uni.$on('food-select-open', () => {
|