From c03386f65073a04e7e4917cd7f5088e2b1732a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Mon, 24 Nov 2025 09:16:33 +0800 Subject: [PATCH 01/11] fix: bug --- src/pages/sparring/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/sparring/index.vue b/src/pages/sparring/index.vue index 0d5487ba..c5e9c7ab 100644 --- a/src/pages/sparring/index.vue +++ b/src/pages/sparring/index.vue @@ -363,7 +363,7 @@ if(res.body.inRange){ common.navigateTo('/pages/sparring/detail?traId=' + item.traId) }else{ - common.show(res.body.message) + common.show('提示', res.body.message, false) } }) } From 71d4c62d48a42d46a80d34b703187745d30cfdf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Mon, 24 Nov 2025 09:40:41 +0800 Subject: [PATCH 02/11] =?UTF-8?q?fix=20:=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../preview/components/previewAiSparring.vue | 64 ++++++++++++++++--- .../sparring/components/sparring-item.vue | 2 +- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/src/pages/preview/components/previewAiSparring.vue b/src/pages/preview/components/previewAiSparring.vue index 37273b71..5d4e91b3 100644 --- a/src/pages/preview/components/previewAiSparring.vue +++ b/src/pages/preview/components/previewAiSparring.vue @@ -1,8 +1,19 @@ @@ -13,7 +24,9 @@ reactive, onMounted, nextTick, - watch + watch, + unref, + computed } from 'vue'; import { queryTraListPreviewPaging @@ -33,6 +46,18 @@ fetchFunction: queryTraListPreviewPaging }); const props = defineProps(['tabIndex', 'currentIndex']); + + + const sparringList = computed(() => { + return unref(data_list) + }) + const leftsparringList = computed(() => { + return sparringList.value.filter((t, index) => index % 2 === 0) + }) + const rightsparringList = computed(() => { + return sparringList.value.filter((t, index) => index % 2 === 1) + }) + const toSparringDetail = (item) => { if (item.traId) { checkTraPartnerInfoById({ @@ -64,15 +89,34 @@ border-radius: 16rpx; } - .sparring-item-box { + // .sparring-item-box { + // width: 50%; + // float: left; + // margin-top: 24rpx; + // margin-bottom: -24rpx; + // // background-color: #f1f1f1; + // // margin-bottom: 16rpx; + // &:nth-child(2n-1) { + // // margin-right: 16rpx; + // } + // } + + .left-items { width: 50%; float: left; - margin-top: 24rpx; - margin-bottom: -24rpx; - // background-color: #f1f1f1; - // margin-bottom: 16rpx; - &:nth-child(2n-1) { - // margin-right: 16rpx; - } + overflow: hidden; + } + + .right-items { + width: 50%; + float: left; + overflow: hidden; + } + + .sparring-item-box { + // width: 50%; + width: 100%; + float: left; + } \ No newline at end of file diff --git a/src/pages/sparring/components/sparring-item.vue b/src/pages/sparring/components/sparring-item.vue index 3d498b07..8f2e64a6 100644 --- a/src/pages/sparring/components/sparring-item.vue +++ b/src/pages/sparring/components/sparring-item.vue @@ -13,7 +13,7 @@ {{itemInfo.traName}} - + {{item.tagName}} From 148942ff1bb5694d8293f1b4880a25663420f9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Mon, 24 Nov 2025 10:03:12 +0800 Subject: [PATCH 03/11] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sparring/components/question.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pages/sparring/components/question.vue b/src/pages/sparring/components/question.vue index 886858e2..6d216f0b 100644 --- a/src/pages/sparring/components/question.vue +++ b/src/pages/sparring/components/question.vue @@ -171,6 +171,21 @@ deep: true, immediate: true }) + watch( + () => props.activeVoiceId, + (val) => { + if (val !== props.dataInfo.id) { + if (isPlaying.value) { + isPlaying.value = false + if (!talkUserVoiceObj.value) return + talkUserVoiceObj.value.pause() + } + } + }, { + deep: true, + immediate: true + } + )