Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
田岩
2025-11-17 19:23:44 +08:00
8 changed files with 47 additions and 14 deletions
+6
View File
@@ -119,6 +119,8 @@
</view>
</uv-overlay>
<PreviewDetail />
<badge ref="badgeRef"></badge>
<points ref="pointsRef" @confirm="pointsConfirm"></points>
</view>
</template>
@@ -134,6 +136,8 @@ import TalkingItem from '@/pages/course/components/talkingItem.vue'
import ImagePreview from '@/components/image-preview/image-preview.vue'
import PreviewDetail from '@/components/image-preview/preview-detail.vue'
import TouchBtn from '@/pages/course/components/touchBtn.vue'
import badge from '@/components/points-and-badge/badge';
import points from '@/components/points-and-badge/points';
import { useSocketStore } from '@/store/socket.js'
import { useStorageStore } from '@/store/storage.js'
@@ -159,6 +163,8 @@ const flagVal = ref('1')
const isUploadingVoice = ref(false)
const isPreview = ref(false)
const IsAndEnv = ref(getPhoneEnvBool('AND'))
const badgeRef = ref(null);
const pointsRef = ref(null);
const ajaxApi = computed(() => (isPreview.value ? textChartPreviewApi : textChartApi))
+7
View File
@@ -163,6 +163,7 @@
} from '@/api/dialog.js';
import Feedback from './components/feedback.vue';
import History from './components/history.vue';
import badge from '@/components/points-and-badge/badge';
const { statusBarHeight } = uni.getWindowInfo();
@@ -649,6 +650,12 @@
case '错题':
common.navigateTo('/pages/wrongQuestionRecord/index');
break;
case '去PK':
common.navigateTo('/pages/competition/index');
break;
case '分析':
common.navigateTo('/pages/analytics/study');
break;
default:
common.msg('页面建设中,敬请期待!');
break;
+6
View File
@@ -48,6 +48,12 @@
<view class="no_search" v-show="no_list_state">
<image class="img" src="@/static/images/search/no_search.png" mode="widthFix"></image>
<view class="text">暂无任何搜索记录</view>
<!-- <live-pusher
url=""
:enable-camera="false"
@statechange="statechange"
@netstatus="netstatus"
></live-pusher> -->
</view>
</view>
</template>
+3 -2
View File
@@ -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()
@@ -16,7 +16,7 @@
:isAnswering="props.isAnswering" @handleEvents="handleEvents" :activeVoiceId="activeVoiceId">
</answerVue>
<view v-else></view>
<view class="talking-tips" v-if="talkingType === 'answer'">
<view class="talking-tips" v-if="talkingType === 'answer' && !isExam">
<view class="talking-tips-btn" @click="getTips()">回答提示</view>
<view class="talking-tips-loading" v-if="loadingTips">
<CommonLoading color="#06f" />
@@ -71,6 +71,10 @@
default: false,
type: Boolean
},
isExam: {
default: false,
type: Boolean
},
})
watch(() => props.activeVoiceId, () => {}, {
deep: true,
+7 -6
View File
@@ -60,12 +60,13 @@
@click="previewFile(item)"> {{ item.dataName }}.{{ item.dataSuffix }} </view>
</view>
</view>
<view class="body-bottom" v-if="isPreview">
<view class="body-bottom-btn" @click="toChooseRole('preview')">预览陪练</view>
<view class="body-bottom">
<!-- v-if="isPreview" -->
<!-- <view class="body-bottom-btn" @click="toChooseRole('preview')">预览陪练</view>
</view>
<view class="body-bottom" v-else>
<view class="body-bottom-btn" @click="toChooseRole('test')">去练习</view>
<view class="body-bottom-btn" @click="toChooseRole('exam')">去考试</view>
<view class="body-bottom" v-else> -->
<view class="body-bottom-btn" @click="toChooseRole('01')">去练习</view>
<view class="body-bottom-btn" @click="toChooseRole('02')">去考试</view>
</view>
</view>
</view>
@@ -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 => {
+6 -1
View File
@@ -99,6 +99,7 @@
} from "@/api/sparring.js"
const traId = ref('')
const execId = ref('')
const talkingType = ref('')
const feedbackRef = ref()
const roleInfo = ref({})
const showAllTalk = ref(false)
@@ -181,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 => {
@@ -248,10 +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(() => {})
+7 -4
View File
@@ -58,7 +58,7 @@
</view>
<view class="talking-box">
<TalkingItem v-for="(item, index) in talkingList" :talkingType="item.type" :talkingInfo="item" :roleInfo="detailInfo"
:traId="traId" :execId="execId"
:traId="traId" :execId="execId" :isExam="talkingType === '02'"
:isLast="index + 1 === talkingList.length" :isAnswering="!answerIsOver"
:activeVoiceId="activeVoiceTalkingItemId" @handleEvents="talkItemEvents"></TalkingItem>
</view>
@@ -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/partnersocket/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){
@@ -404,11 +405,12 @@
const overTalking = () => {
partnerChatReportTrigger({
execId: execId.value,
traId: traId.value
traId: traId.value,
talkingType: isPreview.value? 'preview' : 'practice'
}).then(res=>{
watchFlag.value = 1;
socketStore?.closeSocket();
common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value)
common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':''))
})
}
const sendMessage = (data) => {
@@ -421,6 +423,7 @@
traId.value = params.traId;
chaId.value = params.chaId;
talkingType.value = params.type;
isPreview.value = params.isPreview === '1'
getDetailInfo()
});
onUnload(() => {