|
@@ -994,12 +994,14 @@ export default {
|
|
|
this.getSentIndex(this.curTime);
|
|
|
},
|
|
|
getSentIndex(curTime) {
|
|
|
- for (let i = 0; i < this.curQue.wordTime.length; i++) {
|
|
|
- let bg = this.curQue.wordTime[i].bg;
|
|
|
- let ed = this.curQue.wordTime[i].ed;
|
|
|
- if (curTime >= bg && curTime <= ed) {
|
|
|
- this.sentIndex = i;
|
|
|
- break;
|
|
|
+ if (this.curQue.wordTime) {
|
|
|
+ for (let i = 0; i < this.curQue.wordTime.length; i++) {
|
|
|
+ let bg = this.curQue.wordTime[i].bg;
|
|
|
+ let ed = this.curQue.wordTime[i].ed;
|
|
|
+ if (curTime >= bg && curTime <= ed) {
|
|
|
+ this.sentIndex = i;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1072,7 +1074,7 @@ export default {
|
|
|
let startLeg = dIndex == 0 ? 0 : curQue.detail[dIndex - 1].endLeg;
|
|
|
let endLeg = startLeg + curSentencesLeg;
|
|
|
dItem.endLeg = endLeg;
|
|
|
- let timeList = curQue.wordTime.slice(startLeg, endLeg);
|
|
|
+ let timeList = curQue.wordTime ? curQue.wordTime.slice(startLeg, endLeg) : [];
|
|
|
let paraObj = {
|
|
|
wordsList: paraArr,
|
|
|
timeList,
|
|
@@ -1092,8 +1094,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
let resArrs = [];
|
|
|
- let sentArrTotal = [];
|
|
|
- let timeArr = [];
|
|
|
+ let sentArrTotal = [];
|
|
|
+ let timeArr = [];
|
|
|
curQue.detail.forEach((dItem, dIndex) => {
|
|
|
dItem.wordsList.forEach((sItem, sIndex) => {
|
|
|
let sentArr = [];
|
|
@@ -1233,10 +1235,10 @@ export default {
|
|
|
if (left - this.bodyLeft > this.contentWidth / 2) {
|
|
|
_this.left = 500;
|
|
|
} else if (left - 200 > 500) {
|
|
|
- _this.left = 500;
|
|
|
- } else {
|
|
|
- _this.left = left - 200;
|
|
|
- }
|
|
|
+ _this.left = 500;
|
|
|
+ } else {
|
|
|
+ _this.left = left - 200;
|
|
|
+ }
|
|
|
if (_this.oldNoteNum === noteNum) {
|
|
|
_this.handleNote(noteNum);
|
|
|
}
|