修改bug1

This commit is contained in:
田岩
2025-07-11 16:02:47 +08:00
9 changed files with 85 additions and 10861 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
package-lock
package-lock.json
node_modules
.DS_Store
dist
-10829
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -59,8 +59,9 @@ const navigateBack = (delta = 1, fun = () => {}) => {
}
//关闭当前页面,跳转到应用内的某个页面。
const redirectTo = url => uni.redirectTo({
url: url
const redirectTo = (url, obj = {}) => uni.redirectTo({
url: url,
...obj
});
// 时间转换时间戳
+41 -5
View File
@@ -1,5 +1,12 @@
<template>
<image :src="imgUrlShow" fit="cover" :mode="mode"></image>
<view v-bind="$attrs">
<image :src="imgUrlShow" fit="cover" :mode="mode" @click="showDetail" style="width: 100%;height: 100%;"></image>
<uv-overlay :show="showModel" opacity=".6" @click="showModel = false">
<view class="overlay-box">
<image class="detail-img" :src="imgUrlShow" fit="cover" :mode="mode"></image>
</view>
</uv-overlay>
</view>
</template>
<script>
@@ -35,12 +42,17 @@
type: String,
default: 'widthFix'
},
previewDetail: {
default: '',
type:[String, Boolean]
}
},
data() {
return {
imgUrlShow: '',
watching: false,
base_url: get_base_url()
base_url: get_base_url(),
showModel: false
};
},
computed:{
@@ -52,6 +64,10 @@
watch: {
imgId: {
handler(newval, oldval) {
if(newval.indexOf('http') === 0){
this.imgUrlShow = newval
return
}
if (newval && this.watching) {
this.getPreviewUrlBlob(newval);
}
@@ -70,6 +86,11 @@
}
},
methods: {
showDetail(){
if(!!this.previewDetail){
this.showModel = true
}
},
getPreviewUrlBlob(id) {
if (!id) {
this.imgUrlShow = ''
@@ -107,7 +128,11 @@
},
mounted() {
if (this.imgId) {
this.getPreviewUrlBlob(this.imgId);
if(this.imgId.indexOf('http') === 0){
this.imgUrlShow = this.imgId
}else{
this.getPreviewUrlBlob(this.imgId);
}
}
this.watching = true
if(this.src) {
@@ -117,6 +142,17 @@
}
</script>
<style>
<style lang="scss" scoped>
.overlay-box{
position: relative;
height: 100%;
.detail-img{
position: absolute;
left: 50%;
top: 50%;
max-width: 100%;
max-height: 100%;
transform: translate(-50%, -50%);
}
}
</style>
@@ -30,6 +30,10 @@
watch: {
fileId: {
handler(newval, oldval) {
if(newval.indexOf('http:') === 0){
this.fileUrlShow = newval
return
}
if (newval && this.watching) {
this.getPreviewUrlBlob(newval);
}
@@ -57,7 +61,11 @@
},
mounted() {
if (this.fileId) {
this.getPreviewUrlBlob(this.fileId);
if(this.fileId.indexOf('http:') === 0){
this.fileUrlShow = this.fileId
}else{
this.getPreviewUrlBlob(this.fileId);
}
}
this.watching = true
},
+3 -1
View File
@@ -24,7 +24,7 @@
{{ showContent }}
</text>
<view v-if="type === 3">
<ImagePreview class="cont-img-box" v-if="(dataInfo.imageAddrs||[]).length>0" :imgId="dataInfo.imageAddrs[0]"></ImagePreview>
<ImagePreview class="cont-img-box" v-if="(dataInfo.imageAddrs||[]).length>0" :imgId="dataInfo.imageAddrs[0]" :previewDetail="true"></ImagePreview>
<VideoPreview class="cont-img-box" v-if="(dataInfo.vidoAddrs||[]).length>0" :imgId="dataInfo.vidoAddrs[0]"></VideoPreview>
</view>
<view v-if="type === 5 && !dataInfo.isLoading" style="padding-top: 16rpx;">
@@ -317,9 +317,11 @@ const audioCacheObj = computed(() => storageStore.audioObj)
// 重播
const restartPlay = () => {
if(itemVoice.value){
emit('changePlay', '')
emit('changePlay', unref(dataInfo)?.id)
setTimeout(()=>{
talkVoiceObj.value.src = itemVoice.value
talkVoiceObj.value.seek(0)
talkVoiceObj.value.play()
},100)
}else{
+3 -1
View File
@@ -9,7 +9,7 @@
>按住说话
</view>
<view class="touch-btn" v-if="keyboardIsShow">
<uv-input class="input-box" ref="inputRef" v-model.trim="answerValue" maxlength="1000"
<uv-input class="input-box" ref="inputRef" v-model.trim="answerValue" maxlength="500"
placeholderStyle='color:#999999;font-size:26rpx' placeholder="请输入答案">
</uv-input>
</view>
@@ -60,6 +60,7 @@ const recordObjCom = uni.getRecorderManager()
const initRecord = () => {
unref(recordObjCom)?.onStop((res, duration)=>{
audioPath.value = res.tempFilePath
console.log(duration)
})
}
const startRecord = () => {
@@ -112,6 +113,7 @@ const showOverlayTalking = (obj) => {
}
}
const hideOverlayTalking = (obj) => {
if(!showTalkingModel.value) return
showTalkingModel.value = false
//#ifdef APP-PLUS
stopRecord()
+24 -20
View File
@@ -21,7 +21,8 @@
<view class="right-name">{{item.teacherName}}</view>
<view class="right-desc">描述{{item.voiceDesc || '--'}}</view>
<view class="audio-box">
<view :class="['talking-gif', activeVoiceTeachNo === item.teacherNo ? 'is-play':'']"></view>
<view :class="['talking-gif', activeVoiceTeachNo === item.teacherNo && !loadingTeacherVoice ? 'is-play':'']"></view>
<CommonLoading color="#06f" v-show="activeVoiceTeachNo === item.teacherNo && loadingTeacherVoice" style="float: left;"/>
<view class="play-btn" @click="playTeacherVoice(item)">
<image class="icon" v-if="activeVoiceTeachNo !== item.teacherNo" src="@/static/images/course/play-blue.png" style="width: 100%;height: 100%;"></image>
<image class="icon" v-else src="@/static/images/course/stop-blue.png" style="width: 100%;height: 100%;"></image>
@@ -243,6 +244,7 @@ teacherVoiceObj.onEnded(()=>{
activeVoiceTeachNo.value = ''
teacherVoiceObj.src = ''
})
const loadingTeacherVoice = ref(false)
const playTeacherVoice = (item) =>{
teacherVoiceObj.stop()
teacherVoiceObj.src = ''
@@ -253,12 +255,15 @@ const playTeacherVoice = (item) =>{
teacherVoiceObj.src = item.voicePath
teacherVoiceObj.play()
}else{
loadingTeacherVoice.value = true
storageStore.getStorageById('audio', item.teacherNo, (url)=>{
if(url){
teacherVoiceObj.src = _cache
teacherVoiceObj.src = url
teacherVoiceObj.play()
loadingTeacherVoice.value = false
}else{
downloadVoiceFile('/trastudy/traStdyInfo/trialListening?teachNo='+item.teacherNo).then(res=>{
loadingTeacherVoice.value = false
item.voicePath = res.tempFilePath
teacherVoiceObj.src = item.voicePath
teacherVoiceObj.play()
@@ -534,12 +539,13 @@ onLoad((params) => {
crsId.value = params.crsId||'';
crsNum.value = params.crsNum||'';
startPgrphId.value = params.pgrphId||'';
getData('1');
});
const showTalkingModel = ref(false)
// 录音
onMounted(()=>{
getData('1');
})
// onMounted(()=>{
// getData('1');
// })
// onShow(()=>{
// getData('2');
// })
@@ -675,17 +681,6 @@ const withdrawNow = (data) => {
const loadingQstLogId = ref('')
// 完成
const finishQuestionNow = (data) => {
let _id1 = new Date().getTime() + 'id'
talkingList.value.push({
id: _id1,
talkingContent: '完成',
userInfo: {...choiceTeacherInfo.value},
type: 0
})
// waitMakeEvaluateApi({
// qstLogId: data.qstLogId
// })
textChartApi({
processType: 'ANSER-OVER',
requestBody: JSON.stringify({
@@ -694,6 +689,18 @@ const finishQuestionNow = (data) => {
})
.then(res=> {
// common.msg('完成成功,开始获取评分维度数据!')
let _state = res.body.chatBody.processStat
if(_state = 'ER'){
common.msg('提交答案失败!')
return
}
let _id1 = new Date().getTime() + 'id'
talkingList.value.push({
id: _id1,
talkingContent: '完成',
userInfo: {...choiceTeacherInfo.value},
type: 0
})
loadingQstLogId.value = res.body.chatBody.qstLogId
qstLogId.value = loadingQstLogId.value
let _id = new Date().getTime() + 'id'
@@ -711,10 +718,6 @@ const finishQuestionNow = (data) => {
// 查询问题回答评分
const getQuestionEvalateRequest = (id, data) => {
if(loadingQstLogId.value){
// queryQuestionEvalateApi({
// qstLogId:loadingQstLogId.value
// })
textChartApi({
processType: 'ANSER-RESULT',
requestBody: JSON.stringify({
@@ -957,6 +960,7 @@ const chooseRateNow = (item) => {
.talking-gif{
width: 140rpx;
height: 40rpx;
margin-right: 20rpx;
// background-color: #ccc;
background: url(@/static/images/course/voice-gray.png) no-repeat;
background-size: 100%;
+1 -1
View File
@@ -84,7 +84,7 @@
<image class="icon" src="@/static/images/index/navigation_course.png"></image>
<view class="title">课程中心</view>
</view>
<view class="item" @click="common.navigateTo('/pages/index/dialog')">
<view class="item" @click="common.navigateTo('/pages/index/dialog',{ animationType: 'slide-in-bottom'})">
<image class="icon" src="@/static/images/index/navigation_question_answering.png"></image>
<view class="title">AI问答</view>
</view>