From 17777b476f533de808cef7533a3e4f1e91e76b53 Mon Sep 17 00:00:00 2001 From: kylin L <452061493@qq.com> Date: Wed, 24 Apr 2024 11:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E9=BB=91=E5=B1=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E6=94=B9=E4=B8=BA=E5=8A=A8=E6=80=81=E6=9F=A5=E6=89=BE?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/s-video/res-s-video.vue | 13 +++++++++---- components/s-video/s-video.vue | 15 +++++++++++---- subpkg/complete/complete.vue | 1 + 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/components/s-video/res-s-video.vue b/components/s-video/res-s-video.vue index 45bc0f9..5b655f1 100644 --- a/components/s-video/res-s-video.vue +++ b/components/s-video/res-s-video.vue @@ -88,6 +88,7 @@ isResVideo: false, innerAudioContext: null, failUrl: uni.$http.baseUrl + "/profile//images/fail.gif", + startNodeId: 2, }; }, computed: { @@ -190,7 +191,7 @@ }, nextQuestion(outId, obj) { // 点击开始后先增加题次 - if (2 == outId) { + if(this.startNodeId==outId) { // this.$api.addQuestionFre({ // roleId : this.jsonId, // // userId : this.userId @@ -231,7 +232,7 @@ } // 所选答案错误处理1: 用于之前的对错提示展示 - if (isCorrect == 0 && 2 != outId) { + if(isCorrect == 0 && this.startNodeId != outId) { this.isError = true; this.isOk = false; } else { @@ -295,12 +296,16 @@ this.videoObj = this.videoObjList[i]; 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) + if(nodeId == 1) { + this.nextQuestion(this.startNodeId, null) } }, getAnswer(outId) { diff --git a/components/s-video/s-video.vue b/components/s-video/s-video.vue index 763c717..1ca4b61 100644 --- a/components/s-video/s-video.vue +++ b/components/s-video/s-video.vue @@ -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) { diff --git a/subpkg/complete/complete.vue b/subpkg/complete/complete.vue index bf3331e..ff083cb 100644 --- a/subpkg/complete/complete.vue +++ b/subpkg/complete/complete.vue @@ -161,6 +161,7 @@ this.timer = setTimeout(() => { this.showMedal = false this.showLayer = false + this.resCheck = false clearTimeout(this.timer) }, 5000) this.roleId = options.roleId != null ? options.roleId : this.roleId