新建分支前最后一次提交
This commit is contained in:
@@ -1521,14 +1521,13 @@ import { nextTick } from "vue";
|
||||
this.musicManuShow = false
|
||||
this.isAudioMenu = true
|
||||
} else {
|
||||
let found = false
|
||||
|
||||
this.verticalData.text.forEach((item, itemIndex) => {
|
||||
// console.log(copyBookText[page][0][0],'copyBookText')
|
||||
//console.log(item.content,'item')
|
||||
if (item.content.indexOf(nowRead) != -1) {
|
||||
// 找到了
|
||||
console.log(item.number, '找到了')
|
||||
found = true
|
||||
console.log(item.number, '找到了')
|
||||
this.domIndex = itemIndex
|
||||
this.createAudio()
|
||||
this.musicManuShow = false
|
||||
@@ -1536,13 +1535,7 @@ import { nextTick } from "vue";
|
||||
return
|
||||
}
|
||||
})
|
||||
if (!found) {
|
||||
uni.showToast({
|
||||
title: '未找到音频',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1551,7 +1544,8 @@ import { nextTick } from "vue";
|
||||
console.log('读到的位置', this.domIndex);
|
||||
this.music = uni.createInnerAudioContext()
|
||||
this.music.src = this.verticalData.text[this.domIndex].voices; // static文件夹下的音频地址
|
||||
console.log(this.verticalData.text, '文本')
|
||||
// console.log(this.music.src,'this.music.src')
|
||||
// console.log(this.verticalData.text, '文本')
|
||||
// 找到符合条件的dom
|
||||
console.log('domList', this.domList)
|
||||
// 给对应dom高亮
|
||||
@@ -1560,13 +1554,23 @@ import { nextTick } from "vue";
|
||||
console.log('highlight', this.highlight);
|
||||
console.log('domIndex', this.domIndex);
|
||||
// 判断是否有src
|
||||
if (this.music.src) {
|
||||
if (this.music.src != null) {
|
||||
setTimeout(() => {
|
||||
this.music.play(); //执行播放
|
||||
this.musicPlaying = true
|
||||
this.musicItem.musicPlaying = true
|
||||
this.changeMusicItem()
|
||||
}, 150)
|
||||
}else{
|
||||
console.log('没找到')
|
||||
// 没有音频
|
||||
uni.showToast({
|
||||
title: '未找到音频',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
this.offAudio()
|
||||
|
||||
}
|
||||
// 音频播放结束
|
||||
this.music.onEnded(() => {
|
||||
@@ -3337,7 +3341,7 @@ import { nextTick } from "vue";
|
||||
this.touchTime = setTimeout(() => {
|
||||
this.touchNum = 0
|
||||
}, 250)
|
||||
console.log('双击')
|
||||
// console.log('双击')
|
||||
ownerInstance.callMethod('showMenuCall', {
|
||||
menuShow:true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user