feat:add seo,learning page can be directly studied through the url

This commit is contained in:
zyronon
2025-08-18 02:13:41 +08:00
parent d1443fc6e9
commit 1ce13a7cbb
20 changed files with 238 additions and 110 deletions

View File

@@ -546,7 +546,7 @@ export function usePlaySentenceAudio() {
ref.currentTime = start
ref.play()
let end = sentence.audioPosition?.[1]
console.log(sentence.audioPosition,(end - start) * 1000)
// console.log(sentence.audioPosition,(end - start) * 1000)
if (end && end !== -1) {
timer = setTimeout(() => {

View File

@@ -112,20 +112,10 @@ export function useOnKeyboardEventListener(onKeyDown: (e: KeyboardEvent) => void
})
}
//因为如果用useStartKeyboardEventListener局部变量控制当出现多个hooks时就不行了所以用全局变量来控制
export function useDisableEventListener(watchVal: any) {
const runtimeStore = useRuntimeStore()
watch(watchVal, (n: any) => {
if (n === true) runtimeStore.disableEventListener = true
if (n === false) runtimeStore.disableEventListener = false
})
onMounted(() => {
if (watchVal() === undefined) {
runtimeStore.disableEventListener = true
}
})
onUnmounted(() => {
if (watchVal() === undefined) {
runtimeStore.disableEventListener = false
}
runtimeStore.disableEventListener = n
})
}

View File

@@ -26,7 +26,6 @@ export function useSound(audioSrcList?: string[], audioFileLength?: number) {
}
function play(volume: number = 100) {
console.log('play')
index++
if (audioList.length > 1 && audioList.length !== audioLength) {
audioList[index % audioList.length].volume = volume / 100