|
|
|
@ -80,6 +80,7 @@ |
|
|
|
isResVideo: false, |
|
|
|
failUrl: uni.$http.baseUrl + "/profile//images/fail.gif", |
|
|
|
innerAudioContext: null, |
|
|
|
startNodeId: 2, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -194,7 +195,7 @@ |
|
|
|
nextQuestion(outId, obj) { |
|
|
|
this.innerAudioContext.stop(); |
|
|
|
// 点击开始后先增加题次 |
|
|
|
if (2 == outId) { |
|
|
|
if (this.startNodeId == outId) { |
|
|
|
this.$api.addQuestionFre({ |
|
|
|
roleId: this.jsonId, |
|
|
|
sceneId: this.sceneId, |
|
|
|
@ -236,7 +237,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
// 所选答案错误处理1: 用于之前的对错提示展示 |
|
|
|
if (isCorrect == 0 && 2 != outId) { |
|
|
|
if (isCorrect == 0 && this.startNodeId != outId) { |
|
|
|
this.isError = true; |
|
|
|
this.isOk = false; |
|
|
|
} else { |
|
|
|
@ -289,17 +290,23 @@ |
|
|
|
}).catch((e) => console.log(e)); //捕获异常 |
|
|
|
}, |
|
|
|
hasNodeId(nodeId) { |
|
|
|
for (var i = 0; i < this.videoObjList.length; i++) { |
|
|
|
for (let i=0; i < this.videoObjList.length; i++) { |
|
|
|
if (nodeId == this.videoObjList[i].nodeId) { |
|
|
|
this.videoObj = this.videoObjList[i]; |
|
|
|
console.log(this.videoObj) |
|
|
|
console.log(this.videoObj.videoUrl) |
|
|
|
this.correct = this.videoObjList[i].correct; |
|
|
|
this.ask = this.videoObjList[i].ask; |
|
|
|
// 确认连接开始的节点 |
|
|
|
if(nodeId == 1) { |
|
|
|
this.startNodeId = this.videoObj.outs[0] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.preQuestionId = this.videoObj.questionId; |
|
|
|
// 直接自动开始播放 |
|
|
|
if (nodeId == 1) { |
|
|
|
this.nextQuestion(2, null) |
|
|
|
this.nextQuestion(this.startNodeId, null) |
|
|
|
} |
|
|
|
}, |
|
|
|
getAnswer(outId) { |
|
|
|
|