fix(custom): 调整游戏音乐
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import Taro from '@tarojs/taro'
|
||||
import Lottie from 'lottie-web'
|
||||
import * as dayjs from 'dayjs'
|
||||
@@ -388,6 +388,14 @@ const getBetJl = () => {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Taro.useDidHide(() => {
|
||||
ws.value?.close()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
ws.value?.close()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="btn" @click="utils.vibrateShort(() => toPage(1))">开奖记录</view>
|
||||
<view class="btn mt-15" @click="utils.vibrateShort(() => toPage(2))">投注记录</view>
|
||||
<view class="btn mt-15" @click="utils.vibrateShort(() => toPage(2))">
|
||||
投注记录
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 选项区 -->
|
||||
@@ -206,7 +208,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref, onBeforeUnmount } from 'vue'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { app } from '@/config'
|
||||
import { getGameOption, getKaiJiangList, getJfDz } from '@/api'
|
||||
@@ -286,6 +288,11 @@ Taro.useDidHide(() => {
|
||||
ws.value?.close()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
console.log('useBeforeUnmount')
|
||||
ws.value?.close()
|
||||
})
|
||||
|
||||
const initData = () => {
|
||||
qzTitle.value = '请投注'
|
||||
getOddList()
|
||||
|
||||
Reference in New Issue
Block a user