diff --git a/src/pages/sparring/chooseRole.vue b/src/pages/sparring/chooseRole.vue
index e90b0c5b..70f94dd0 100644
--- a/src/pages/sparring/chooseRole.vue
+++ b/src/pages/sparring/chooseRole.vue
@@ -91,13 +91,14 @@
console.log('轮播图切换:', e);
currentIndex.value = data.index;
}
-
+ const isPreview = ref(false)
const toTip = () => {
- common.navigateTo('/pages/sparring/tip?traId=' + traId.value + '&chaId=' + activeRole.value.chaId + '&type=' + talkingType.value)
+ common.navigateTo('/pages/sparring/tip?traId=' + traId.value + '&chaId=' + activeRole.value.chaId + '&type=' + talkingType.value+ '&isPreview=' + (isPreview.value ?'1':''))
}
onLoad((params) => {
traId.value = params.traId;
talkingType.value = params.type
+ isPreview.value = params.isPreview === '1'
});
onMounted(() => {
getDetailInfo()
diff --git a/src/pages/sparring/components/talking-item.vue b/src/pages/sparring/components/talking-item.vue
index 7173256b..06426b37 100644
--- a/src/pages/sparring/components/talking-item.vue
+++ b/src/pages/sparring/components/talking-item.vue
@@ -16,7 +16,7 @@
:isAnswering="props.isAnswering" @handleEvents="handleEvents" :activeVoiceId="activeVoiceId">
-
+
回答提示
@@ -71,6 +71,10 @@
default: false,
type: Boolean
},
+ isExam: {
+ default: false,
+ type: Boolean
+ },
})
watch(() => props.activeVoiceId, () => {}, {
deep: true,
diff --git a/src/pages/sparring/detail.vue b/src/pages/sparring/detail.vue
index 26db1305..c3c3fed6 100644
--- a/src/pages/sparring/detail.vue
+++ b/src/pages/sparring/detail.vue
@@ -60,12 +60,13 @@
@click="previewFile(item)"> {{ item.dataName }}.{{ item.dataSuffix }}
-
- 预览陪练
+
+
+
+ 去练习
+ 去考试
@@ -118,7 +119,7 @@
})
}
const toChooseRole = type => {
- common.navigateTo('/pages/sparring/chooseRole?traId=' + traId.value + '&type=' + type)
+ common.navigateTo('/pages/sparring/chooseRole?traId=' + traId.value + '&type=' + type + '&isPreview=' + (isPreview.value ?'1':''))
}
const isPreview = ref(false)
onLoad(params => {
diff --git a/src/pages/sparring/result.vue b/src/pages/sparring/result.vue
index a309e982..caae7a50 100644
--- a/src/pages/sparring/result.vue
+++ b/src/pages/sparring/result.vue
@@ -182,7 +182,8 @@
const getData = () => {
partnerChatReport({
traId: traId.value,
- execId: execId.value
+ execId: execId.value,
+ talkingType: isPreview.value? 'preview' : 'practice'
// traId: 'PARTNERINFO02501812207220251103160409000007402',
// execId: 'db2f275b-c04a-4572-83dd-74a95ff49d67'
}).then(res => {
@@ -249,11 +250,13 @@
console.log(_str)
return _str
}
+ const isPreview = ref(false)
onLoad((params) => {
traId.value = params.traId;
execId.value = params.execId
talkingType.value = params.type;
showLoading.value = true
+ isPreview.value = params.isPreview === '1'
getData()
});
onMounted(() => {})
diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue
index 2e318ba0..8212515e 100644
--- a/src/pages/sparring/tip.vue
+++ b/src/pages/sparring/tip.vue
@@ -58,7 +58,7 @@
@@ -129,6 +129,7 @@
const traId = ref('')
const chaId = ref('')
const talkingType = ref('')
+ const isPreview = ref(false)
const detailInfo = ref({})
const currentIndex = ref(0)
const showRoleInfo = ref(false)
@@ -249,7 +250,7 @@
const answerText = ref('')
const touchBtnCallBack = ref(null)
const initsocketTask = () => {
- let _src = talkingType.value === 'preview'?'/trapractice/previewsocket/open':'/trapractice/partnersocket/open'
+ let _src = isPreview.value ?'/trapractice/previewsocket/open':'/trapractice/partnersocket/open'
socketStore.creatSocket(_src + '?summary=');
// unref(SocketObj).on('open', (res)=>{
// if(!answerIsOver.value){
@@ -405,11 +406,11 @@
partnerChatReportTrigger({
execId: execId.value,
traId: traId.value,
- talkingType: talkingType.value
+ talkingType: isPreview.value? 'preview' : 'practice'
}).then(res=>{
watchFlag.value = 1;
socketStore?.closeSocket();
- common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value)
+ common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':''))
})
}
const sendMessage = (data) => {
@@ -422,6 +423,7 @@
traId.value = params.traId;
chaId.value = params.chaId;
talkingType.value = params.type;
+ isPreview.value = params.isPreview === '1'
getDetailInfo()
});
onUnload(() => {