修改考试提交栏不清楚bug

This commit is contained in:
田岩
2025-09-03 13:45:58 +08:00
parent 07ab7aa24d
commit 2ce7c72a3d
4 changed files with 40 additions and 39 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# h5专用地址
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
#VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# sit
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
+1 -4
View File
@@ -268,7 +268,7 @@
// 录音按钮提交
const touchBtnSubmit = (type, submitObj) => {
// const old_text = touchBtnRef.value?.clearinputText(); // 清除发送框数据
touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
topic.value.es_status = '00'; // 00转圈
const voicePath = submitObj;
@@ -277,7 +277,6 @@
let _res = JSON.parse(res.data);
if (_res.rtnCode === '0000') {
const _content = _res.body.transContent.trim();
console.log('_content', _content);
if (_content === '') {
topic.value.es_status = ''; // 取消转圈
return common.msg('未识别到文字');
@@ -294,8 +293,6 @@
})
.catch((err) => {
topic.value.es_status = ''; // 取消转圈
// 失败了再把发送框数据还原回去
// touchBtnRef.value?.clearinputText(old_text); // 清除发送框数据
common.msg('系统异常,请联系管理员');
});
} else if (type === 'text') {
+19 -18
View File
@@ -4,7 +4,6 @@
<view class="nav-div">
<view class="title ellipsis-text">
{{ paperData.name }}
</view>
<view class="back_div" @click="exit_practice">
<image :src="practiceExitIcon()" class="img"></image>
@@ -24,7 +23,7 @@
</view>
</view>
</view>
<view class="progress">
<uv-line-progress
:percentage="progress"
@@ -298,9 +297,8 @@
};
// 录音组件提交
const touchBtnSubmit = (type, submitObj) => {
const old_text = touchBtnRef.value?.clearinputText(); // 清除发送框数据
const touchBtnSubmit = (type, submitObj) => {1
touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
topic.value.es_status = '00'; // 00转圈
const voicePath = submitObj;
@@ -308,19 +306,23 @@
.then((res) => {
let _res = JSON.parse(res.data);
if (_res.rtnCode === '0000') {
topic.value.es_status = '02';
topic.value.my_answer = {
anserResult: _res.body.transContent,
ossKey: _res.body.fileId,
ossAddr: _res.body.ossFileAddr,
voicePath: voicePath
};
const _content = _res.body.transContent.trim();
if (_content === '') {
topic.value.es_status = ''; // 取消转圈
return common.msg('未识别到文字');
} else {
topic.value.es_status = '02';
topic.value.my_answer = {
anserResult: _res.body.transContent,
ossKey: _res.body.fileId,
ossAddr: _res.body.ossFileAddr,
voicePath: voicePath
};
}
}
})
.catch((err) => {
topic.value.es_status = ''; // 取消转圈
// 失败了再把发送框数据还原回去
touchBtnRef.value?.clearinputText(old_text); // 清除发送框数据
common.msg('系统异常,请联系管理员');
});
} else if (type === 'text') {
@@ -370,11 +372,10 @@
// 中途退出
dialogRef.value.close();
common.loading();
try{
try {
await practiceCommit({ exrId: paperData.exrId, examLenTm: practiceTime.value, stat: 'U' });
common.navigateBack();
}catch(e){
}
} catch (e) {}
common.hideLoading();
} else if (key === 'revert') {
// 返回
@@ -710,7 +711,7 @@
.grey {
margin-right: 8rpx;
}
.countdown_time{
.countdown_time {
white-space: nowrap;
}
color: #ffffff;
+19 -16
View File
@@ -79,17 +79,17 @@
</template>
<script setup>
import { ref, reactive, computed, nextTick} from 'vue';
import { ref, reactive, computed, nextTick } from 'vue';
import { onLoad, onHide, onShow, onUnload } from '@dcloudio/uni-app';
import Feedback from '@/pages/examination/components/feedback.vue';
import Dialog from '@/pages/examination/components/dialog.vue';
import Subject from '@/components/examination/subject.vue';
import TouchBtn from '@/components/examination/touchBtn.vue';
import common from '@/common/common';
import {getPageCache, setupKeyboardHeightListener } from '@/common/common';
import { getPageCache, setupKeyboardHeightListener } from '@/common/common';
import { commonUploadVoiceFile } from '@/api/common.js';
import {practiceExitIcon } from '@/common/imgSvg';
import {practiceCommit, queryCrsPracticeAnswerResult } from '@/api/practice.js';
import { practiceExitIcon } from '@/common/imgSvg';
import { practiceCommit, queryCrsPracticeAnswerResult } from '@/api/practice.js';
import { queryMistakesAnswerByMisId, mistakesCorrect } from '@/api/wrongQuestionRecord.js';
const feedbackRef = ref(null);
@@ -287,8 +287,7 @@
// 录音组件提交
const touchBtnSubmit = (type, submitObj) => {
const old_text = touchBtnRef.value?.clearinputText(); // 清除发送框数据
touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
topic.value.es_status = '00'; // 00转圈
const voicePath = submitObj;
@@ -296,19 +295,23 @@
.then((res) => {
let _res = JSON.parse(res.data);
if (_res.rtnCode === '0000') {
topic.value.es_status = '02';
topic.value.my_answer = {
anserResult: _res.body.transContent,
ossKey: _res.body.fileId,
ossAddr: _res.body.ossFileAddr,
voicePath: voicePath
};
const _content = _res.body.transContent.trim();
if (_content === '') {
topic.value.es_status = ''; // 取消转圈
return common.msg('未识别到文字');
} else {
topic.value.es_status = '02';
topic.value.my_answer = {
anserResult: _res.body.transContent,
ossKey: _res.body.fileId,
ossAddr: _res.body.ossFileAddr,
voicePath: voicePath
};
}
}
})
.catch((err) => {
topic.value.es_status = ''; // 取消转圈
// 失败了再把发送框数据还原回去
touchBtnRef.value?.clearinputText(old_text); // 清除发送框数据
common.msg('系统异常,请联系管理员');
});
} else if (type === 'text') {
@@ -356,7 +359,7 @@
// 判断是否加载
if (last_id in storageIdDict.value) {
return;
}else {
} else {
addRequestProblem(index + 1, success);
}
});