From 0730f6936103d094302c3e86dd491210a59ea4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Sep 2025 08:53:07 +0800 Subject: [PATCH 1/4] fix: bug --- .env.development | 6 +++--- src/pages/course/components/touchBtn.vue | 1 + src/pages/course/study.vue | 8 ++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index 0b7218c4..b092e389 100644 --- a/.env.development +++ b/.env.development @@ -19,15 +19,15 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002' # dev -# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' +VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' # sit -VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' +# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' # UAT # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # 任东 -VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' +# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604' diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 69f2381e..b1ac4d71 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -277,6 +277,7 @@ const activeNum = ref(1) const getRecordPermission = (obj) => { + if(isDisabled.value) return if (isTalking.value) { common.msg('操作频繁,请稍后重试!') setTimeout(() => { diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 888961a1..bab2a422 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -81,8 +81,8 @@ :onlyVoice="answerOnlyVoice" :canAnswer="testAnswer" :adjustPosition="true" - :canAnswerText="'每个问题最多连续发送五次答案!'" - :isDisabled="(lastTalkingInfo.type || 0) !== 4" /> + :canAnswerText="canAnswerText" + :isDisabled="(lastTalkingInfo.type || 0) !== 4 || ['SN','MU','JD'].includes(lastTalkingInfo.qnsTyp)"/> @@ -357,6 +357,10 @@ const answerOnlyVoice = computed(() => { return lastTalkingInfo.value.answerWay === 'V' }) +const canAnswerText = computed(() => { + return '每个问题最多连续发送五次答案!' +}) + // 获取段落 const getGraphInfoUnStudy = (flag = 0) => { let _id = new Date().getTime() + 'id' From f482e6d208e8008d89d9ee35e17fd94cae0c0288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Sep 2025 15:41:41 +0800 Subject: [PATCH 2/4] fix: bug --- src/pages/index/dialog.vue | 44 ++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index aff3e114..f9ba70ce 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -11,7 +11,12 @@ - + + + 历史 + 消息 + 我的 + @@ -463,9 +468,19 @@ }) } const historyRef = ref(null) + const showMenuList = ref(false) const showHistory = () => { + showMenuList.value = false historyRef.value.open() } + const toMessage = () => { + showMenuList.value = false + common.navigateTo('/pages/messageNotification/index') + } + const toMePage = () => { + showMenuList.value = false + common.switchTab('/pages/me/index') + } const showHistoryDetail = (item) => { queryAskHisByBatchIdPaging({ @@ -787,18 +802,39 @@ .seek-setting { position: absolute; - z-index: 3; + z-index: 13; right: 45rpx; top: 8rpx; font-size: 26rpx; width: 140rpx; height: 52rpx; padding: 10rpx 0; - overflow: hidden; + // overflow: hidden; line-height: 32rpx; text-align: right; padding-right: 48rpx; - + .more-list{ + position: absolute; + top: 100%; + right: 0; + width: 100rpx; + text-align: center; + background-color: #fff; + border-radius: 12rpx; + padding: 16rpx 0; + display: none; + z-index: 21; + &.show{ + display: block; + } + .more-item{ + line-height: 60rpx; + font-size: 29rpx; + color: #333; + position: relative; + z-index: 22; + } + } .image-icon { width: 30rpx; height: 32rpx; From 889c25e03ba819b0d534232049da438adcbea054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Sep 2025 15:56:06 +0800 Subject: [PATCH 3/4] fix: bug --- src/pages/index/components/answer.vue | 7 ++++++- src/pages/index/dialog.vue | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/index/components/answer.vue b/src/pages/index/components/answer.vue index 7f5c7413..8af4d290 100644 --- a/src/pages/index/components/answer.vue +++ b/src/pages/index/components/answer.vue @@ -20,6 +20,7 @@ {{index+1}}. {{item.docName}} + 本次回答参考资料来源于网络 @@ -236,7 +237,11 @@ } } } - + .link-cont-desc{ + margin-bottom: 12rpx; + font-size: 24rpx; + color: #999; + } .link-cont { margin-bottom: 12rpx; font-size: 28rpx; diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index f9ba70ce..72cd412d 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -200,8 +200,8 @@ const createNewDialog = () => { + common.msg('已经是最新对话') common.redirectTo(`/pages/index/dialog`) - // talkingList.value = [] } const showModelComfirm = ref(false) const reconcatNum = ref(1) From 25f01d49bb75f7aa54cba9459a1db5488389fb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Fri, 5 Sep 2025 15:59:18 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 6 +- src/api/examination.js | 16 ++- src/api/wrongQuestionRecord.js | 13 ++- src/pages/courseDetail/index.vue | 11 +- .../components/examRecordItem.vue | 41 ++----- .../components/practiceRecordItem.vue | 59 ++-------- .../components/studyRecordItem.vue | 68 ++--------- src/pages/courseRecord/useItemList.js | 106 ++++++++++++++++++ src/pages/examination/components/dialog.vue | 3 - src/pages/examination/index.vue | 53 +++++++-- src/pages/examination/result.vue | 6 +- .../components/examRecordItem.vue | 43 ++----- src/pages/practice/index.vue | 2 +- src/pages/wrongQuestionRecord/correct.vue | 11 +- 14 files changed, 231 insertions(+), 207 deletions(-) create mode 100644 src/pages/courseRecord/useItemList.js diff --git a/.env.development b/.env.development index 40bc1365..b4bbb8aa 100644 --- a/.env.development +++ b/.env.development @@ -15,7 +15,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' # dev @@ -27,8 +27,8 @@ VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # 任东 -VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' -VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' +#VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' +#VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604' # 张建成 diff --git a/src/api/examination.js b/src/api/examination.js index 0e683358..1f4ee2d3 100644 --- a/src/api/examination.js +++ b/src/api/examination.js @@ -33,6 +33,7 @@ export const queryPaperExamScore = (data) => { }; // ↑↑↑↑↑↑↑↑↑考试中心考试↑↑↑↑↑↑↑ + // ↓↓↓↓↓↓↓↓↓课程考试↓↓↓↓↓↓↓↓ export const startExamByCrs = (data) => { @@ -83,4 +84,17 @@ export const queryPaperExamRankingList = (data) => { data }); }; - \ No newline at end of file + + +// 考试过程中提交结果,后端用来缓存(考试中心考试和课程考试共用这个缓存接口) + export const commitPaperCache = (data) => { + return request({ + url: base_url + '/traExamPapers/commitPaperCache', + method: 'post', + toastErrors: true, + data + }); + }; + + + \ No newline at end of file diff --git a/src/api/wrongQuestionRecord.js b/src/api/wrongQuestionRecord.js index 6a51dcbd..305c8f3e 100644 --- a/src/api/wrongQuestionRecord.js +++ b/src/api/wrongQuestionRecord.js @@ -40,4 +40,15 @@ export const queryMistakesAnswerByMisId = (data) => { toastErrors: false, data }); -}; \ No newline at end of file +}; + +// 根据ID查题 +export const queryMistakesCorrectByMisId = (data) => { + return request({ + url: base_url + '/traMistakesCollection/queryMistakesCorrectByMisId', + method: 'post', + toastErrors: false, + data + }); +}; + diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index 850831fc..1a20ef05 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -17,7 +17,7 @@ - {{ form.crsName || '' }} + {{form.crsName}} @@ -75,19 +75,15 @@ > - - - - @@ -381,7 +377,9 @@ padding-top: 36rpx; padding-left: 42rpx; padding-bottom: 24rpx; - min-height: 158rpx; + + // overflow: hidden; + justify-content: space-between; } @@ -390,6 +388,7 @@ color: #333333; font-weight: 600; margin-bottom: 20rpx; + min-height: 36rpx; } .title-icon { diff --git a/src/pages/courseRecord/components/examRecordItem.vue b/src/pages/courseRecord/components/examRecordItem.vue index 522958c6..9ccd6920 100644 --- a/src/pages/courseRecord/components/examRecordItem.vue +++ b/src/pages/courseRecord/components/examRecordItem.vue @@ -19,7 +19,7 @@ {{ item.examCnt || 0 }} @@ -60,7 +61,7 @@ import { computed, ref, reactive } from 'vue'; import common from '@/common/common'; import { queryCrsExamHisByExamId } from '@/api/courseRecord.js'; - const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据 + import { useItemList } from '../useItemList.js'; const props = defineProps({ item: { type: Object, @@ -68,33 +69,9 @@ } }); const item = computed(() => props.item); - const data_list = reactive([]); - const total = ref(-1); - const show_list_state = ref(false); - const list_div_height = computed(() => { - if (!show_list_state.value) { - return '0'; - } else if (status.value === 'loading') { - return '100rpx'; - } else { - return data_list.length * 136 + 'rpx'; - } - }); - - // 点击获取考试详情 - const show_list_click = () => { - show_list_state.value = !show_list_state.value; - if (total.value === -1) { - //加载数据 - status.value = 'loading'; - data_list.length = 0; - queryCrsExamHisByExamId({ examId: item.value.examId }).then((res) => { - data_list.push(...res.body); - total.value = data_list.length; - status.value = 'loadmore'; - }); - } - }; + const fetchFunction = (params) => queryCrsExamHisByExamId({ examId: item.value.examId, ...params }); + const { status, data_list, show_list_state, list_div_height, show_list_click, getData } = useItemList(fetchFunction); + // 跳转到详情 const click_list_item = (list_item) => { const papersName = item.value.examName; @@ -247,7 +224,7 @@ /* 添加过渡动画,包含延迟效果 */ transition: transform 0.2s ease; } - .click_text_icon_action{ + .click_text_icon_action { transform: rotate(90deg); } } diff --git a/src/pages/courseRecord/components/practiceRecordItem.vue b/src/pages/courseRecord/components/practiceRecordItem.vue index ef84054e..cea6b05e 100644 --- a/src/pages/courseRecord/components/practiceRecordItem.vue +++ b/src/pages/courseRecord/components/practiceRecordItem.vue @@ -47,9 +47,10 @@ @@ -60,7 +61,8 @@ import { computed, ref, reactive } from 'vue'; import common from '@/common/common'; import { queryPracticeHis } from '@/api/courseRecord.js'; - const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据 + import { useItemList, formatDuration } from '../useItemList.js'; + const props = defineProps({ item: { type: Object, @@ -68,60 +70,15 @@ } }); const item = computed(() => props.item); - const data_list = reactive([]); - const total = ref(-1); - - const show_list_state = ref(false); - const list_div_height = computed(() => { - if (!show_list_state.value) { - return '0'; - } else if (status.value === 'loading') { - return '100rpx'; - } else { - return data_list.length * 136 + 'rpx'; - } - }); - - // 点击获取详情 - const show_list_click = () => { - show_list_state.value = !show_list_state.value; - if (total.value === -1) { - //加载数据 - status.value = 'loading'; - data_list.length = 0; - queryPracticeHis({ crsId: item.value.crsId }).then((res) => { - data_list.push(...res.body); - total.value = data_list.length; - status.value = 'loadmore'; - }); - } - }; + + const fetchFunction = (params) => queryPracticeHis({ crsId: item.value.crsId, ...params }); + const { status, data_list, show_list_state, list_div_height, show_list_click, getData } = useItemList(fetchFunction); // 跳转到详情 const click_list_item = (list_item) => { common.navigateTo(`/pages/courseRecord/coursePracticeRecordDetail?exrId=${list_item.exrId}`); }; - // 计算两个标准时间的时间差值 - const formatDuration = (startTm, endTm) => { - if(endTm === null || startTm === null) return "00:00:00"; - // 解析时间字符串为时间戳(毫秒) - const startTime = new Date(startTm).getTime(); - const endTime = new Date(endTm).getTime(); - - // 计算时间差(秒),确保为正数 - const seconds = Math.abs(Math.floor((endTime - startTime) / 1000)); - // 计算时、分、秒 - const hours = Math.floor(seconds / 3600); - const minutes = Math.floor((seconds % 3600) / 60); - const remainingSeconds = seconds % 60; - - // 补零格式化函数(统一处理所有单位) - const formatNumber = (num) => num.toString().padStart(2, '0'); - - // 小时、分钟、秒均保持两位数格式 - return `${formatNumber(hours)}:${formatNumber(minutes)}:${formatNumber(remainingSeconds)}`; - };