From 0d708632ea8dff402e0fde86e652f34820917e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Wed, 17 Sep 2025 22:30:31 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=AD=E9=9F=B3?= =?UTF-8?q?=E6=8E=89=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common.js | 10 ++++++---- src/components/examination/question.vue | 1 - src/components/examination/touchBtn.vue | 20 ++++++++++++++------ src/pages/examination/index.vue | 17 +++++++++-------- src/pages/practice/index.vue | 7 +++++-- src/pages/wrongQuestionRecord/correct.vue | 12 ++++++++++-- 6 files changed, 44 insertions(+), 23 deletions(-) diff --git a/src/api/common.js b/src/api/common.js index 3fd4c96e..6b581b7d 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -86,22 +86,24 @@ export const commonUploadVoiceFile = (file, url, data = {}, fileKey = 'voice') = filePath: file, name: fileKey, formData: data, + timeout: 6000, success(result) { try { const res = JSON.parse(result.data); if (res.rtnCode === '0000') { - resolve(result); + return resolve(result); } else if (REQUES_ERROR_CODES['NO_LOGIN'].includes(res.rtnCode)) { goto_login_fun() - } else { - reject(new Error(res.message)); + return reject('NO_LOGIN'); } + return reject('Other'); } catch (error) { reject(new Error('Failed to parse response')); } }, fail(error) { - reject(new Error('Upload failed')); + console.log('err', error); + return reject('Other'); } }); }); diff --git a/src/components/examination/question.vue b/src/components/examination/question.vue index 2d8693d3..ce182717 100644 --- a/src/components/examination/question.vue +++ b/src/components/examination/question.vue @@ -206,7 +206,6 @@ // 赋值显示 console.log('displayTime', displayTime); voiceTime.value = displayTime + 's'; - console.log('displayTime', voiceTime.value); }); watch( () => props.dataInfo.voicePath, diff --git a/src/components/examination/touchBtn.vue b/src/components/examination/touchBtn.vue index 63ae6fd5..8be65c9f 100644 --- a/src/components/examination/touchBtn.vue +++ b/src/components/examination/touchBtn.vue @@ -148,6 +148,7 @@ }; // 结束录音 const stopRecord = (status = false) => { + console.log('结束录音stopRecord', status); if (props.isDisabled) return; if (startTimer.value) { clearTimeout(startTimer.value); @@ -162,10 +163,12 @@ const times = Math.max(500 - endTime + startTime, 0); setTimeout(() => { console.log('延迟数据', times); - nextTick(() => { - popupRef.value.close(); - recorderManager.stop(); - }); + // nextTick(() => { + + // }); + popupRef.value.close(); + console.log('停止录音'); + recorderManager.stop(); }, times); } nextTick(() => (recordingStatus.value = 'not_started')); @@ -181,13 +184,18 @@ console.log('说话时长', recordDuration); if (props.minRecordDuration > recordDuration) { nextTick(() => common.msg('说话时间太短,没有听清!')); + // console.log('说话时间太短,没有听清'); return; } - - stopRecord(true); // 在去主动执行一次关闭 + popupRef.value?.close(); + recordingStatus.value = 'not_started' + // stopRecord(true); // 在去主动执行一次关闭 console.log('录音结束,时长:', recordDuration, '秒'); emit('submit', 'voice', res.tempFilePath); }); + recorderManager.onError(function (err) { + console.log('录音错误', err); + }); recorderManager.onStart(function (res) { // 检测是否已经抬手结束了 console.log('检测是否已经抬手结束了', recordingStatus.value); diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue index c39ecf01..8e403499 100644 --- a/src/pages/examination/index.vue +++ b/src/pages/examination/index.vue @@ -190,10 +190,9 @@ papersId: '', // 试卷ID limitTm: 0, // 考试限制时间 papersName: '', // 试卷名称 - isCacheExam: '' ,// 是否是缓存试卷(继续答题试卷) - flagQuery: '' , - flagQueryDetail: '' , - + isCacheExam: '', // 是否是缓存试卷(继续答题试卷) + flagQuery: '', + flagQueryDetail: '' }); // 试卷信息 const topicList = reactive([]); // 问题列表 const popup_input_bottom = ref('0px'); @@ -304,6 +303,7 @@ const topic = topicList[questionNumber.value]; touchBtnRef.value?.clearinputText(); // 清除发送框数据 if (type === 'voice') { + if(topic.es_status == '00') return; topic.es_status = '00'; // 00转圈 const voicePath = submitObj; commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {}) @@ -326,9 +326,11 @@ } } }) - .catch((err) => { + .catch((error) => { topic.es_status = ''; // 取消转圈 - common.msg('系统异常,请联系管理员'); + if (error === 'Other') { + common.msg('系统异常,请联系管理员'); + } }); } else if (type === 'text') { topic.es_status = '01'; @@ -339,14 +341,13 @@ } }; - const answerCacheList = ref({}); const setAnswerCacheList = (value) => { console.log('触发变化', value); answerCacheList.value = value; common.setValue(examinationAnswerCacheKey, value); }; - + // 添加试题答案缓存 const addTopicAnswerCache = () => { const my_answer = topic.value.my_answer; diff --git a/src/pages/practice/index.vue b/src/pages/practice/index.vue index 0810d20d..b5c6e187 100644 --- a/src/pages/practice/index.vue +++ b/src/pages/practice/index.vue @@ -306,6 +306,7 @@ const topic = topicList[questionNumber.value] touchBtnRef.value?.clearinputText(); // 清除发送框数据 if (type === 'voice') { + if(topic.es_status == '00') return; topic.es_status = '00'; // 00转圈 const voicePath = submitObj; commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {}) @@ -327,9 +328,11 @@ } } }) - .catch((err) => { + .catch((error) => { topic.es_status = ''; // 取消转圈 - common.msg('系统异常,请联系管理员'); + if (error === 'Other') { + common.msg('系统异常,请联系管理员'); + } }); } else if (type === 'text') { topic.es_status = '01'; diff --git a/src/pages/wrongQuestionRecord/correct.vue b/src/pages/wrongQuestionRecord/correct.vue index 84fe1ffc..14eeb2d1 100644 --- a/src/pages/wrongQuestionRecord/correct.vue +++ b/src/pages/wrongQuestionRecord/correct.vue @@ -287,18 +287,24 @@ const touchBtnSubmit = (type, submitObj) => { const topic = topicList[questionNumber.value]; touchBtnRef.value?.clearinputText(); // 清除发送框数据 + console.log('录音组件提交'); if (type === 'voice') { + if(topic.es_status == '00') return; topic.es_status = '00'; // 00转圈 const voicePath = submitObj; commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {}) .then((res) => { + console.log('_contentsssss', res); let _res = JSON.parse(res.data); if (_res.rtnCode === '0000') { const _content = _res.body.transContent.trim(); + console.log('_content', _content); if (_content === '') { topic.es_status = ''; // 取消转圈 + console.log('未识别到文字'); return common.msg('未识别到文字'); } else { + console.log('识别到了文字', _content); topic.es_status = '02'; topic.my_answer = { anserResult: _res.body.transContent, @@ -309,9 +315,11 @@ } } }) - .catch((err) => { + .catch((error) => { topic.es_status = ''; // 取消转圈 - common.msg('系统异常,请联系管理员'); + if (error === 'Other') { + common.msg('系统异常,请联系管理员'); + } }); } else if (type === 'text') { topic.es_status = '01'; From cf429c3ad29e8d25192c52dc53a6162bb3cdc8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 18 Sep 2025 08:56:19 +0800 Subject: [PATCH 2/6] fix: bug --- .env.development | 4 ++-- src/enum.js | 3 ++- src/pages/examRanking/index.vue | 10 +++++++--- src/pages/me/index.vue | 4 +++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index db90fd74..d7fcd8d3 100644 --- a/.env.development +++ b/.env.development @@ -24,9 +24,9 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # dev -# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7002' +# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' # sit -# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.92:9786' +VITE_APP_BASE_H5_API_Url = 'http://25.18.122.92:9786' # UAT # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' diff --git a/src/enum.js b/src/enum.js index 117cf9cf..7ec50154 100644 --- a/src/enum.js +++ b/src/enum.js @@ -31,4 +31,5 @@ export const SUBJECT_TYPE = [{ value: "ES", label: "问答题", } -] \ No newline at end of file +] +export const defaultAvatar = '/static/images/me/default_user_avatar.png' \ No newline at end of file diff --git a/src/pages/examRanking/index.vue b/src/pages/examRanking/index.vue index 63a10c70..66a536d0 100644 --- a/src/pages/examRanking/index.vue +++ b/src/pages/examRanking/index.vue @@ -28,7 +28,8 @@ - + + {{item.userName}} {{item.orgName}} @@ -48,7 +49,8 @@ - + + {{userRankObj.userName}} {{userRankObj.orgName}} @@ -63,6 +65,7 @@ - \ No newline at end of file +.course-center { + position: relative; + display: flex; + flex-direction: column; + .top-bg { + background: linear-gradient(16deg, rgba(234, 246, 255, 0) 0%, #c3e6ff 100%); + height: 480rpx; + width: 750rpx; + } + .bot-bg { + // background-color: #F6F8FF; + background: linear-gradient(136deg, rgba(234, 246, 255, 0) 0%, #c3e6ff 100%); + width: 750rpx; + flex: 1; + } + .course-center-body { + position: absolute; + overflow: hidden; + left: 0; + top: 0; + height: 100%; + width: 100%; + padding: 0 15rpx; + box-sizing: border-box; + display: flex; + flex-direction: column; + padding-top: v-bind(pageTopPadding); + // padding-top: var(--status-bar-height); + .body-title { + height: 90rpx; + // background-color: red; + text-align: center; + font-size: 33rpx; + padding-top: 10rpx; + line-height: 46rpx; + box-sizing: border-box; + font-weight: 500; + color: #000; + position: relative; + // margin-bottom: 23rpx; + .arrow-icon { + position: absolute; + left: 36rpx; + top: 20rpx; + color: #000; + } + } + .input-view { + } + .tabs-view { + background: #ffffff; + margin-top: 23rpx; + border-radius: 23rpx; + padding: 6rpx 10rpx 12rpx; + margin-bottom: 15rpx; + } + .list-view { + flex: 1; + overflow: hidden; + margin-bottom: 15rpx; + background: #ffffff; + border-radius: 23rpx; + display: flex; + flex-direction: column; + position: relative; + .filter-list { + position: absolute; + top: 84rpx; + left: 0; + width: 100%; + height: 588rpx; + padding-bottom: 80rpx; + overflow-y: hidden; + z-index: 15; + background-color: #f9f9f9; + box-shadow: 0rpx 12rpx 20rpx rgba(160, 160, 160, 0.25); + border-radius: 0 0 0rpx 0rpx; + box-sizing: border-box; + position: relative; + .scroll-box-tags { + height: 508rpx; + padding: 0rpx 25rpx; + box-sizing: border-box; + } + .filter-type { + padding: 10rpx 0; + box-sizing: border-box; + .filter-type-title { + font-size: 29rpx; + line-height: 40rpx; + margin-bottom: 15rpx; + color: #000; + } + .filter-type-list { + overflow: hidden; + .filter-type-item { + // width: calc(25% - 18rpx); + display: inline-block; + font-size: 29rpx; + box-sizing: border-box; + padding: 0 20rpx; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + text-align: center; + float: left; + margin-right: 24rpx; + height: 65rpx; + line-height: 65rpx; + background-color: #f1f3f8; + border-radius: 6rpx; + margin-bottom: 20rpx; + &:nth-child(4n) { + margin-right: 24rpx; + } + &.is-active { + color: #06f; + } + } + } + & + .filter-type { + margin-top: 20rpx; + } + } + .btns-box { + height: 80rpx; + position: absolute; + background-color: #fff; + bottom: 0; + left: 0; + width: 100%; + text-align: center; + padding-top: 10rpx; + .btn-sub { + display: inline-block; + text-align: center; + background-color: #06f; + height: 60rpx; + line-height: 58rpx; + border: 1rpx solid #06f; + padding: 0 40rpx; + color: #fff; + border-radius: 8rpx; + &.cencle-btn { + background-color: #fff; + color: #06f; + margin-right: 40rpx; + } + } + } + } + .model-filter-list { + position: fixed; + width: calc(100vw - 33rpx); + height: 80vh; + overflow: hidden; + top: 500rpx; + left: 17rpx; + z-index: 1; + background-color: rgba(0, 0, 0, 0.2); + } + .filter-list, + .model-filter-list { + display: none; + &.show { + display: block; + } + } + .filter-btn { + position: absolute; + right: 0; + top: 0; + height: 83rpx; + width: 120rpx; + line-height: 83rpx; + font-size: 26rpx; + background: #fff; + z-index: 2; + text-align: center; + box-shadow: -4rpx 0 6rpx rgba(0, 0, 0, 0.05); + white-space: nowrap; + padding-right: 30rpx; + box-sizing: border-box; + .filter-icon { + // display: inline-block; + font-size: 26rpx; + position: absolute; + right: 15rpx; + top: 50%; + transform: translateY(-50%); + } + } + .tags-view { + height: 84rpx; + display: block; + padding: 15rpx 120rpx 15rpx 20rpx; + box-sizing: border-box; + white-space: nowrap; + border-bottom: 2rpx solid #eee; + .tags-item { + margin-right: 30rpx; + display: inline-block; + &.active-tags-item { + position: relative; + overflow: hidden; + border-radius: 4rpx; + overflow: hidden; + &::before { + content: ''; + display: block; + width: 40rpx; + height: 40rpx; + position: absolute; + right: -20rpx; + bottom: -20rpx; + transform: rotateZ(-45deg); + background-color: #06f; + overflow: hidden; + z-index: 10; + } + &::after { + content: ''; + display: block; + width: 8rpx; + height: 4rpx; + position: absolute; + right: 3rpx; + bottom: 8rpx; + transform: rotateZ(-45deg); + border-left: 1px solid #fff; + border-bottom: 1px solid #fff; + z-index: 11; + } + } + ::v-deep .uv-tags { + padding: 0 20rpx; + .uv-tags__text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 200rpx; + } + } + } + } + .course-list { + display: flex; + flex: 1; + overflow: hidden; + .left-type-list { + width: 152rpx; + border-right: 2rpx solid #eee; + overflow-y: auto; + .type-item { + min-height: 90rpx; + line-height: 40rpx; + font-size: 22rpx; + box-sizing: border-box; + padding: 25rpx 18rpx; + overflow: hidden; + // text-overflow: ellipsis; + word-break: break-all; + text-align: center; + white-space: pre-wrap; + &.is-active { + background-color: rgba(44, 142, 242, 0.1); + color: #06f; + } + } + } + .right-course-list { + flex: 1; + overflow-y: auto; + .type-list { + .type-title { + font-size: 33rpx; + line-height: 43rpx; + margin: 20rpx 15rpx 5rpx; + min-height: 43rpx; + // overflow: hidden; + // text-overflow: ellipsis; + // white-space: nowrap; + word-break: break-all; + font-weight: 600; + .left-color { + width: 8rpx; + height: 33rpx; + margin-top: 5rpx; + float: left; + overflow: hidden; + background-color: #06f; + margin-right: 8rpx; + } + } + } + } + } + } + .loading-box { + width: 100%; + height: 100rpx; + position: relative; + .loading-val { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + } + } +} + diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 29dbb772..06dc8751 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -82,7 +82,7 @@ :canAnswer="testAnswer" :adjustPosition="true" :canAnswerText="canAnswerText" - :isDisabled="(lastTalkingInfo.type || 0) !== 4 || ['SN','MU','JD'].includes(lastTalkingInfo.qnsTyp)"/> + :isDisabled="(lastTalkingInfo.type || 0) !== 4 || ['SN', 'MU', 'JD'].includes(lastTalkingInfo.qnsTyp)" /> @@ -166,7 +166,7 @@ const pageTopPadding = computed(() => statusBarHeight + 'px') const isContinue = ref('N') // 初始化数据 const getData = async flag => { - isContinue.value = "N" + isContinue.value = 'N' try { const { body } = await getCourseStudyInfoApi({ crsId: crsId.value @@ -179,11 +179,11 @@ const getData = async flag => { if (isPreview.value) { resStartStudyNow(body.teacheList) } else { - if(body.isStdyFinish === 'Y'){ - // 重新学习 - resStartStudyNow(body.teacheList) - return - } + if (body.isStdyFinish === 'Y') { + // 重新学习 + resStartStudyNow(body.teacheList) + return + } if (body.stdyProgressFlag === 'N') { step.value = 1 } else { @@ -207,7 +207,7 @@ const getData = async flag => { // 继续学习 , 获取学习历史接口 // 滚动到最下面 scrollToBottomNow() - isContinue.value = "Y" + isContinue.value = 'Y' sendMessage({ commond: 'STDY', body: { @@ -342,7 +342,7 @@ const nextStep = () => { crsId: crsId.value, teacherNo: choiceTeacher.value, studyType: isPreview.value ? 'P' : 'S', - isContinue: isContinue.value + isContinue: isContinue.value } }) step.value = 2 @@ -369,7 +369,7 @@ const answerOnlyVoice = computed(() => { }) const canAnswerText = computed(() => { - return '每个问题最多连续发送五次答案!' + return '每个问题最多连续发送五次答案!' }) const oldStdyId = ref('') @@ -380,8 +380,8 @@ const getGraphInfoUnStudy = (flag = 0) => { crsId: crsId.value, stdyId: unref(stdyId), stdyBatch: unref(stdyBatch), - oldStdyId: unref(oldStdyId), - isContinue: isContinue.value + oldStdyId: unref(oldStdyId), + isContinue: isContinue.value } if (flag === 1 && !!startPgrphId.value) { _data.pgrphId = startPgrphId.value @@ -400,7 +400,7 @@ const getGraphInfoUnStudy = (flag = 0) => { common .show('提示', '您已学完全部知识点', false) .then(res => { - common.navigateBack() + common.navigateBack() // common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study&isPreview=true`) }) .finally(() => {}) @@ -413,7 +413,7 @@ const getGraphInfoUnStudy = (flag = 0) => { common.redirectTo(`/pages/courseDetail/submit?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study&imgId=${imageId.value}`) } else { // 取消 - common.navigateBack() + common.navigateBack() // common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`) } }) @@ -525,8 +525,8 @@ const nextQuestionSuccess = (info, type = 'next') => { stdyId: unref(stdyId), pgrphId: info?.pgrphId, logId: info?.logId, - oldStdyId: unref(oldStdyId), - isContinue: isContinue.value + oldStdyId: unref(oldStdyId), + isContinue: isContinue.value }) }).then(res => { talkingList.value.push({ @@ -562,9 +562,9 @@ const nextQuestionSuccess = (info, type = 'next') => { processType: 'NEW-ANSER', //NEW-KNOW requestBody: JSON.stringify({ stdyId: unref(stdyId), - stdyPgrphId: info.stdyPgrphId, - qnsId: info.qnsId - }) + stdyPgrphId: info.stdyPgrphId, + qnsId: info.qnsId + }) }).then(res => { let _body = res.body || {} if (!_body.chatBody) { @@ -603,7 +603,7 @@ const nextQuestionSuccess = (info, type = 'next') => { requestBody: JSON.stringify({ logId: unref(logId), pgrphId: info.pgrphId, - stdyId: unref(stdyId) + stdyId: unref(stdyId) }) }).then(res => { let _body = res.body || {} @@ -664,7 +664,7 @@ const initsocketTask = () => { if (commond === 'STDYBTH' && !stdyId.value) { stdyId.value = body.stdyId || '' stdyBatch.value = body.stdyBatch || '' - oldStdyId.value = body.oldStdyId || '' + oldStdyId.value = body.oldStdyId || '' logId.value = body.logId || '' getGraphInfoUnStudy(1) step.value = 2 @@ -722,13 +722,11 @@ const changeAppHeightBottom = height => { // #endif } onHide(() => { - console.log('onHide') + changePlayItemId('') + socketStore.closeSocket() //#ifdef APP-PLUS uni.offKeyboardHeightChange(setHeight) // #endif - // if (watchFlag.value === 1) return - changePlayItemId('') - socketStore.closeSocket() // common.show('提示信息', '检测到您已离开,即将退出学习页面。',false, '','确认').then((res) => { // common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`) // }).finally(() => {}) @@ -747,11 +745,11 @@ onUnload(() => { console.log('onUnload') socketStore.closeSocket() changePlayItemId('') - console.log(typeof teacherVoiceObj); - try{ - teacherVoiceObj?.stop() - teacherVoiceObj.src = '' - // 0910杨航叫我这么改的 + console.log(typeof teacherVoiceObj) + try { + teacherVoiceObj?.stop() + teacherVoiceObj.src = '' + // 0910杨航叫我这么改的 } catch {} }) const testAnswer = computed(() => { @@ -810,7 +808,7 @@ const uploadRecordNow = voicePath => { id: _id }) scrollToBottomNow() - let _path = isPreview.value ? '/trastudy/traStdychat/previewVoiceChart' : '/trastudy/traStdychat/voiceChart' + let _path = isPreview.value ? '/trastudy/traStdychat/previewVoiceChart' : '/trastudy/traStdychat/voiceChart' commonUploadVoiceFile(voicePath, _path, { processType: 'ANSER-VOICE', requestBody: JSON.stringify(_data) @@ -933,7 +931,7 @@ const withdrawNow = data => { const loadingExecLogId = ref('') const answerQuestionNow = data => { let _data = { - stdyId: unref(stdyId), + stdyId: unref(stdyId), qnsId: data.qnsId, // 问题ID 必输项:true 类型:String pgrphId: data.pgrphId, // 段落ID 必输项:true 类型:String crsId: crsId.value, // 课程ID 必输项:true 类型:String From c2141549eb69401d8acf6e3c53b643e8d7fc9ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Thu, 18 Sep 2025 10:38:44 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=99=82=E9=96=93?= =?UTF-8?q?=E6=9C=83=E9=A1=AF=E7=A4=BA=E4=B8=8A=E6=AC=A1=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/components/examination/question.vue | 24 +- src/pages/course/components/talkingItem.vue | 1905 ++++++++++--------- 3 files changed, 1028 insertions(+), 903 deletions(-) diff --git a/.env.development b/.env.development index f1545767..70d0ab7c 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 开发环境 ENV = 'development' # 'development' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # UAT # VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786' diff --git a/src/components/examination/question.vue b/src/components/examination/question.vue index ce182717..678d4a7a 100644 --- a/src/components/examination/question.vue +++ b/src/components/examination/question.vue @@ -81,9 +81,9 @@ import { computed, unref, ref, toRefs, watch, onMounted, nextTick } from 'vue'; import { onUnload } from '@dcloudio/uni-app'; // import { useinnerAudio, useAudioFun } from '@/store/innerAudio'; - + import { useAudio } from './useAudio.js'; - import {downloadFile} from '@/api/common.js' + import { downloadFile } from '@/api/common.js'; const props = defineProps({ dataInfo: { default: () => ({}), @@ -128,7 +128,7 @@ }); const innerAudio = useAudio(); - + const status = computed(() => props.status); watch( () => props.status, @@ -157,6 +157,9 @@ nextTick(() => { textShow.value = true; }); + setTimeout(() => { + voiceTime.value = ''; + }, 0); } emit('buutton_click', type, props.dataInfo); }; @@ -173,7 +176,7 @@ textShow.value = false; } }; - + const playVoice = () => { // isPlaying.value = true; console.log('点击播放'); @@ -210,15 +213,18 @@ watch( () => props.dataInfo.voicePath, (newVal) => { - console.log('newVal', newVal); - if(newVal === '' && props.dataInfo.ossKey) { // 去下载oss内容 + + if (newVal === '' && props.dataInfo.ossKey) { + // 去下载oss内容 console.log('去下载oss内容'); - downloadFile(props.dataInfo.ossKey).then(res => { + downloadFile(props.dataInfo.ossKey).then((res) => { + voiceTime.value = ''; innerAudio.setAudioSrc(res.tempFilePath); - }) - } else if(newVal === undefined){ + }); + } else if (newVal === undefined) { innerAudio.stopAudio(); } else { + voiceTime.value = ''; innerAudio.setAudioSrc(newVal); } }, diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 06453ab7..f5f1a5b1 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -10,955 +10,1074 @@ 8 问题反馈信息 9 已学完当前知识点反馈信息 --> -