Commit 8ce8cbc9 authored by 罗超's avatar 罗超

1

parent e77dc044
......@@ -160,7 +160,7 @@ export default {
setup(props, context) {
let s = getCurrentInstance();
let { refs } = getCurrentInstance();
console.log(163, s.$refs);
let data = reactive({
autoplay: false,
sortIndex: props.sort + 1, //大题序号
......@@ -227,8 +227,6 @@ export default {
console.log("停了");
data.isPlay = true;
}
// console.log(189, innerAudioContext.duration);
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
......@@ -261,7 +259,15 @@ export default {
},
onchange(e) {
innerAudioContext.stop();
data.audioTime = 999;
innerAudioContext.onCanplay(() => {
// 必须。可以当做是初始化时长
innerAudioContext.duration;
// 必须。不然也获取不到时长
setTimeout(() => {
data.audioTime = 999;
}, 100);
});
data.isPlay = true;
console.log(369, data.audioTime);
data.ExamIndex = e.detail.current;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment