|
@@ -27,7 +27,7 @@ const subjectInfo = ref<GameVO>({})
|
|
const showCountDown = ref(true) // 显示倒计时
|
|
const showCountDown = ref(true) // 显示倒计时
|
|
const showImg = ref(true) // 显示图片
|
|
const showImg = ref(true) // 显示图片
|
|
const showText = ref(false) // 显示文字
|
|
const showText = ref(false) // 显示文字
|
|
-const musicFlag = ref(false) // 页面音乐开关
|
|
|
|
|
|
+const musicFlag = ref(true) // 页面音乐开关
|
|
const showDataArr = ref<IData[]>([])
|
|
const showDataArr = ref<IData[]>([])
|
|
const seconds = [3000, 2000, 1500]
|
|
const seconds = [3000, 2000, 1500]
|
|
const currentIndex = ref(0) // 当前索引
|
|
const currentIndex = ref(0) // 当前索引
|
|
@@ -75,10 +75,14 @@ function choiceClick(item: string, index: number) {
|
|
showDataArr.value[currentIndex.value].isRight = true
|
|
showDataArr.value[currentIndex.value].isRight = true
|
|
showDataArr.value[currentIndex.value].score = 1
|
|
showDataArr.value[currentIndex.value].score = 1
|
|
showDataArr.value[currentIndex.value].reactionTime = Number((performance.now() - onceStart).toFixed(3))
|
|
showDataArr.value[currentIndex.value].reactionTime = Number((performance.now() - onceStart).toFixed(3))
|
|
- VoiceImpRef.value.videoPlay('right')
|
|
|
|
|
|
+ if (musicFlag.value) {
|
|
|
|
+ VoiceImpRef.value.videoPlay('right')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- VoiceImpRef.value.videoPlay('error')
|
|
|
|
|
|
+ if (musicFlag.value) {
|
|
|
|
+ VoiceImpRef.value.videoPlay('error')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
clearTimeout(textTimeout.value)
|
|
clearTimeout(textTimeout.value)
|