开发完错题本

This commit is contained in:
田岩
2025-08-30 20:31:58 +08:00
parent 859248fc6a
commit 05b89f91ca
20 changed files with 396 additions and 232 deletions
+1 -3
View File
@@ -68,7 +68,7 @@ export const useAudioStore = defineStore('audioStore', {
// 音频可以播放时触发(此时通常能获取到时长)
this.audioInstance.onCanplay(() => {
// 尝试获取时长(部分环境需要延迟一点)
console.log('尝试获取时长(部分环境需要延迟一点)');
// console.log('尝试获取时长(部分环境需要延迟一点)');
setTimeout(() => {
const duration = this.audioInstance.duration || 0;
console.log('尝试获duration', duration);
@@ -208,7 +208,6 @@ export const useAudioStore = defineStore('audioStore', {
},
// 注册播放完成回调
onAudioEnded(callback) {
console.log('onAudioEnded');
if (typeof callback === 'function') {
this.callbacks.onEnded = callback;
}
@@ -216,7 +215,6 @@ export const useAudioStore = defineStore('audioStore', {
// 注册播放错误回调
onAudioError(callback) {
console.log('注册播放错误回调');
if (typeof callback === 'function') {
this.callbacks.onError = callback;
}