feat:add seo,learning page can be directly studied through the url
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user