From e62e96b4b36b49bbee3328d9a581f0b9d4cb649b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 17 Sep 2025 09:29:08 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- src/pages/course/components/chartFive.vue | 2 +- src/pages/course/components/chartFour.vue | 2 +- src/pages/course/components/chartThree.vue | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index d09195dc..467a5637 100644 --- a/.env.development +++ b/.env.development @@ -26,7 +26,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # dev # 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.92:9786' # UAT # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' @@ -44,7 +44,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # 于嘉文 # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.143:9604' # 孙宇 -# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.139:9604' +VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.139:9604' # 付丙鑫 # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.145:9602' diff --git a/src/pages/course/components/chartFive.vue b/src/pages/course/components/chartFive.vue index 327b21e0..b43d42ed 100644 --- a/src/pages/course/components/chartFive.vue +++ b/src/pages/course/components/chartFive.vue @@ -18,7 +18,7 @@ - {{ item.gradeDimens || item.gradeDimensName }} + {{ item.gradeDimensName || item.gradeDimens }} {{ item.anlyGrade }} diff --git a/src/pages/course/components/chartFour.vue b/src/pages/course/components/chartFour.vue index 17d70295..3b2130db 100644 --- a/src/pages/course/components/chartFour.vue +++ b/src/pages/course/components/chartFour.vue @@ -17,7 +17,7 @@ - {{ item.gradeDimensName }} + {{ item.gradeDimensName || item.gradeDimens }} {{ item.anlyGrade }} diff --git a/src/pages/course/components/chartThree.vue b/src/pages/course/components/chartThree.vue index 44e0160a..d96b33ac 100644 --- a/src/pages/course/components/chartThree.vue +++ b/src/pages/course/components/chartThree.vue @@ -20,7 +20,7 @@ - {{ item.gradeDimensName }} + {{ item.gradeDimensName || item.gradeDimens }} {{ item.anlyGrade }} From 6411ea98ff93c8323accd115f538224eb136d5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Wed, 17 Sep 2025 09:42:05 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 8 +- src/pages/courseDetail/index.vue | 1 + .../components/examRecordList.vue | 87 +++---- .../components/practiceRecordList.vue | 87 +++---- .../components/studyRecordItem.vue | 1 + .../components/studyRecordList.vue | 88 +++---- src/pages/courseRecord/index.vue | 122 ++++------ .../components/examRecordItem.vue | 11 +- .../components/examRecordList.vue | 68 ------ src/pages/examinationRecord/index.vue | 73 +++--- .../favorites/components/favoritesCourse.vue | 158 +++++-------- .../favorites/components/favoritesTask.vue | 217 ++++++++---------- src/pages/favorites/index.vue | 144 +++++------- src/pages/index/dialog.vue | 1 + .../learningTasks/components/content.vue | 4 - src/pages/learningTasks/index.vue | 25 +- .../preview/components/previewCourse.vue | 103 +++------ src/pages/preview/index.vue | 126 +++++----- 18 files changed, 493 insertions(+), 831 deletions(-) delete mode 100644 src/pages/examinationRecord/components/examRecordList.vue diff --git a/.env.development b/.env.development index d09195dc..5b24174e 100644 --- a/.env.development +++ b/.env.development @@ -1,17 +1,17 @@ # 开发环境 ENV = 'development' # 'development' - +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # UAT # VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786' # DEV -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # app入口 -#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' + + #VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001' -#VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786' +# VITE_APP_BASE_API_Url = 'http://25.16.122.92:9786' #VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' # h5专用地址x2 diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index 1a20ef05..2de16cca 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -286,6 +286,7 @@ if (pages.length >= 2) { const prevPage = pages[pages.length - 2]; if (prevPage.route === 'pages/favorites/index') { + uni.$emit('refresh_favorites_list', { type: 'course', state: !!form.value.collectId, // 最终是收藏了还是取消了 diff --git a/src/pages/courseRecord/components/examRecordList.vue b/src/pages/courseRecord/components/examRecordList.vue index 5d4a33ec..ffbc474e 100644 --- a/src/pages/courseRecord/components/examRecordList.vue +++ b/src/pages/courseRecord/components/examRecordList.vue @@ -1,68 +1,41 @@ - diff --git a/src/pages/courseRecord/components/practiceRecordList.vue b/src/pages/courseRecord/components/practiceRecordList.vue index dc5ea6c9..cab11185 100644 --- a/src/pages/courseRecord/components/practiceRecordList.vue +++ b/src/pages/courseRecord/components/practiceRecordList.vue @@ -1,68 +1,41 @@ - diff --git a/src/pages/courseRecord/components/studyRecordItem.vue b/src/pages/courseRecord/components/studyRecordItem.vue index 491aef22..7b017933 100644 --- a/src/pages/courseRecord/components/studyRecordItem.vue +++ b/src/pages/courseRecord/components/studyRecordItem.vue @@ -58,6 +58,7 @@ diff --git a/src/pages/courseRecord/index.vue b/src/pages/courseRecord/index.vue index 7463f6e4..4c990064 100644 --- a/src/pages/courseRecord/index.vue +++ b/src/pages/courseRecord/index.vue @@ -1,54 +1,63 @@ diff --git a/src/pages/examinationRecord/index.vue b/src/pages/examinationRecord/index.vue index 8e0fd61f..9bbab722 100644 --- a/src/pages/examinationRecord/index.vue +++ b/src/pages/examinationRecord/index.vue @@ -1,59 +1,34 @@ diff --git a/src/pages/favorites/components/favoritesCourse.vue b/src/pages/favorites/components/favoritesCourse.vue index 56a99ce1..15384c26 100644 --- a/src/pages/favorites/components/favoritesCourse.vue +++ b/src/pages/favorites/components/favoritesCourse.vue @@ -1,52 +1,55 @@ diff --git a/src/pages/preview/components/previewCourse.vue b/src/pages/preview/components/previewCourse.vue index 01e42a85..c63c15d9 100644 --- a/src/pages/preview/components/previewCourse.vue +++ b/src/pages/preview/components/previewCourse.vue @@ -1,87 +1,56 @@ \ No newline at end of file + From 1257d726b7dd579408f825237e44c295cc484ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 17 Sep 2025 09:42:44 +0800 Subject: [PATCH 03/10] fix: bug --- .env.development | 2 +- src/api/request.js | 4 ++-- src/pages/course/study.vue | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env.development b/.env.development index 467a5637..15881e23 100644 --- a/.env.development +++ b/.env.development @@ -44,7 +44,7 @@ VITE_APP_BASE_H5_API_Url = 'http://25.18.122.92:9786' # 于嘉文 # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.143:9604' # 孙宇 -VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.139:9604' +# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.139:9604' # 付丙鑫 # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.145:9602' diff --git a/src/api/request.js b/src/api/request.js index be358012..cda6bc54 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -21,7 +21,7 @@ export const get_base_url = (url = '') => { // #endif } else { // 其他环境,包括生产环境,sit环境,uat环境 return ENV.VITE_APP_BASE_API_Url - + } } @@ -46,7 +46,7 @@ export const goto_login_fun = (from = 'http') => { if (page_route === 'pages/login/login') return; common.hideLoading() common.show('未登录', '现在去登录', false).then(() => { - common.navigateTo('/pages/login/login') + // common.navigateTo('/pages/login/login') if (from === 'socket' && page_route !== '') { common.redirectTo('/pages/login/login?path=' + page_route) } else { diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 8411859e..29dbb772 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -671,7 +671,7 @@ const initsocketTask = () => { } } else { // if(['0005', 'QQ0005'].includes(res.rtnCode)) { - // goto_login_fun(); + // goto_login_fun('socket'); // } } }) @@ -722,6 +722,7 @@ const changeAppHeightBottom = height => { // #endif } onHide(() => { + console.log('onHide') //#ifdef APP-PLUS uni.offKeyboardHeightChange(setHeight) // #endif @@ -733,6 +734,7 @@ onHide(() => { // }).finally(() => {}) }) onShow(() => { + console.log('onShow') //#ifdef APP-PLUS uni.onKeyboardHeightChange(setHeight) // #endif @@ -742,6 +744,7 @@ onShow(() => { }) const watchFlag = ref(1) onUnload(() => { + console.log('onUnload') socketStore.closeSocket() changePlayItemId('') console.log(typeof teacherVoiceObj); From dbf2af05551180039b1641df3f653b0ae1af14ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 17 Sep 2025 10:44:18 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=B5=8B=E8=AF=95pdf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- src/pages/index/dialog.vue | 3 ++- src/pages/index/preview.vue | 12 +++++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.env.development b/.env.development index 15881e23..b5caf08c 100644 --- a/.env.development +++ b/.env.development @@ -24,9 +24,9 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # 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.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/pages/index/dialog.vue b/src/pages/index/dialog.vue index e5b8c304..e02a5e80 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -473,7 +473,8 @@ }); break; case 'preview': - if (getPhoneEnvBool('AND')) { + // if (getPhoneEnvBool('AND')) { + if (false) { common.navigateTo('/pages/index/preview?fileId=' + info.docId); } else { const base_url = get_base_url('/traask/traFilePreview/'); diff --git a/src/pages/index/preview.vue b/src/pages/index/preview.vue index 478f4b3f..19afb5bd 100644 --- a/src/pages/index/preview.vue +++ b/src/pages/index/preview.vue @@ -37,9 +37,15 @@ export default { this.fileId = params.fileId || '' }, onShow() { - this.openPdfFn({ - fileId: this.fileId - }) + if (getPhoneEnvBool('AND')) { + this.openPdfFn({ + fileId: this.fileId + }) + }else{ + const base_url = get_base_url('/traask/traFilePreview/'); + let fileUrl = base_url + '/traask/traFilePreview/' + info.docId; + this.showUrl = fileUrl + } }, onReady() { //#ifdef APP-PLUS From f0756f3d8a2b4cfd4249236715c15bc2e6841bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Wed, 17 Sep 2025 11:00:54 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=91=E7=9A=84?= =?UTF-8?q?=E6=94=B6=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 8 ++--- src/pages/courseDetail/index.vue | 12 +++---- .../favorites/components/favoritesCourse.vue | 10 +++--- .../favorites/components/favoritesTask.vue | 33 ++++++++---------- src/pages/favorites/index.vue | 34 ++++++++----------- src/pages/learningTasks/details.vue | 11 ++---- src/pages/login/login.vue | 4 +-- 7 files changed, 48 insertions(+), 64 deletions(-) diff --git a/.env.development b/.env.development index 87a63ae8..a8eb1205 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' @@ -10,9 +10,9 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # app入口 -#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001' +# VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001' # VITE_APP_BASE_API_Url = 'http://25.16.122.92:9786' -#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' +# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' # h5专用地址x2 @@ -26,7 +26,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # dev # 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/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index 2de16cca..43020f56 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -272,7 +272,7 @@ }); onLoad((params) => { crsId.value = params.crsId; - collectId.value = params.collectId || ''; + collectId.value = params.collectId || null; isPreview.value = params.isPreview || ''; }); onShow(() => { @@ -286,13 +286,11 @@ if (pages.length >= 2) { const prevPage = pages[pages.length - 2]; if (prevPage.route === 'pages/favorites/index') { + // if (prevPage.$vm && typeof prevPage.$vm.$?.exposed?.reload === 'function') { + // prevPage.$vm.$?.exposed?.reload('course', form.value); + // } + uni.$emit('update_course_item', form.value); - uni.$emit('refresh_favorites_list', { - type: 'course', - state: !!form.value.collectId, // 最终是收藏了还是取消了 - old: collectId.value, // 进入时候的收藏id - new: form.value.collectId // 新的收藏id - }); } } } diff --git a/src/pages/favorites/components/favoritesCourse.vue b/src/pages/favorites/components/favoritesCourse.vue index 15384c26..8a240617 100644 --- a/src/pages/favorites/components/favoritesCourse.vue +++ b/src/pages/favorites/components/favoritesCourse.vue @@ -17,7 +17,7 @@ v-for="(item, index) in data_list" @click="swipeActionClick" > - + {{ item.evalGrade ?? 0 }}分 @@ -80,10 +80,12 @@ }); }; - - + const reloadPage = () => { + total.value == -1; + reload(true); + }; defineExpose({ - + reloadPage }); const props = defineProps(['tabIndex', 'currentIndex']); diff --git a/src/pages/favorites/components/favoritesTask.vue b/src/pages/favorites/components/favoritesTask.vue index 7491eece..af906472 100644 --- a/src/pages/favorites/components/favoritesTask.vue +++ b/src/pages/favorites/components/favoritesTask.vue @@ -17,7 +17,7 @@ v-for="(item, index) in data_list" @click="swipeActionClick" > - + 已完成 @@ -46,10 +46,6 @@ }}门课程 - @@ -104,7 +100,7 @@ } } setPageCache('learning_tasks_details', item); - common.navigateTo(`/pages/learningTasks/details?collectId=${item.collectionId}`); + common.navigateTo(`/pages/learningTasks/details?collectId=${item.collectionId}&taskId=${item.taskId}`); }; const getStatusClass = (isFinish) => { if (isFinish === '02') return 'completed'; @@ -119,20 +115,21 @@ { immediate: true } ); }); - // const updateData = (item) => { - // console.log('收藏的updateData', item); - // console.log('收藏的updatedata_list', data_list); - // const index = data_list.findIndex((res) => res.taskId === item.taskId); - // console.log('updateData', index, item); - // if (index !== -1) { - // data_list[index] = item; - // } - // }; + + const updateData = (item) => { + // 这里是收藏记录,如果是取消收藏,那就得重新刷新列表 + if (item.collectionId === null) { + reload(); + } else { + const index = data_list.value.findIndex((res) => res.taskId === item.taskId); + if (index !== -1) { + data_list.value[index] = item; + } + } + }; defineExpose({ - // getData, - // refreshData, - // updateData + updateData }); diff --git a/src/pages/favorites/index.vue b/src/pages/favorites/index.vue index 581362aa..ea3e0403 100644 --- a/src/pages/favorites/index.vue +++ b/src/pages/favorites/index.vue @@ -51,7 +51,7 @@ import common from '@/common/common'; import useIndexList from '@/composables/useIndexList.js'; const { tabAct, listItemRefs, tabChange, swiperChange, search } = useIndexList(); - + const tabList = ref([ { name: '课程收藏' @@ -62,28 +62,22 @@ ]); onLoad(() => { - // 里面取消收藏后重新刷新列表 - // uni.$on('refresh_favorites_list', (params) => { - // if (params.type === 'course') { - // courseRef.value?.refreshData(params); - // } else if (params.type === 'task') { - // taskRef.value?.refreshData(params); - // } - // }); - // // 完成任务后更新列表单条信息 - // uni.$on('refresh_favorites_data', (res) => { - // console.log('列表监听里面学习完成后更新任务历程', res); - // if (tabAct.value === 0) { - // courseRef.value?.updateData(res); - // } else if (tabAct.value === 1) { - // taskRef.value?.updateData(res); - // } - // }); + uni.$on('update_tasks_item', (item) => { + setTimeout(() => { + listItemRefs.value[1]?.updateData(item); + }, 100); + }); + uni.$on('update_course_item', (item) => { + setTimeout(() => { + listItemRefs.value[0]?.reloadPage(); + }, 100); + }); }); onUnload(() => { - // uni.$off('refresh_favorites_data'); - // uni.$off('refresh_favorites_list'); + uni.$off('update_tasks_item'); + uni.$off('update_course_item'); }); + diff --git a/src/pages/testingHall/index.vue b/src/pages/testingHall/index.vue index d49403a1..b01e6989 100644 --- a/src/pages/testingHall/index.vue +++ b/src/pages/testingHall/index.vue @@ -1,106 +1,106 @@ From cbeab8a1f4b32acd4ddf0ec5b288ff070d573faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 17 Sep 2025 14:42:19 +0800 Subject: [PATCH 08/10] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/dialog.vue | 127 ++++++++++++++++++++++--------------- 1 file changed, 75 insertions(+), 52 deletions(-) diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index f8bd4c06..47fe4136 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -424,35 +424,35 @@ const talkItemEvents = ({ type, data, id, info = {} }) => { } else { const base_url = get_base_url('/traask/traFilePreview/') let fileUrl = base_url + '/traask/traFilePreview/' + info.docId - const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf' - downloadAndSaveAvatar(fileUrl, localFilePath).then(res=>{ - uni.openDocument({ - filePath: res, - showMenu: true, - success: function () { - console.log('打开文档成功') - } - }) - }) - // uni.downloadFile({ - // url: fileUrl, - // success: function (res) { - - // uni.saveFile({ - // tempFilePath: res.tempFilePath, - // success: function (resS) { - // var filePath = resS.savedFilePath - // uni.openDocument({ - // filePath: filePath, - // showMenu: true, - // success: function () { - // console.log('打开文档成功') - // } - // }) - // } - // }) - // } - // }) + const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf' + downloadAndSaveAvatar(fileUrl, localFilePath).then(res => { + uni.openDocument({ + filePath: res, + showMenu: true, + success: function () { + console.log('打开文档成功') + } + }) + }) + // uni.downloadFile({ + // url: fileUrl, + // success: function (res) { + + // uni.saveFile({ + // tempFilePath: res.tempFilePath, + // success: function (resS) { + // var filePath = resS.savedFilePath + // uni.openDocument({ + // filePath: filePath, + // showMenu: true, + // success: function () { + // console.log('打开文档成功') + // } + // }) + // } + // }) + // } + // }) } break case 'toCourse': @@ -462,29 +462,39 @@ const talkItemEvents = ({ type, data, id, info = {} }) => { break } } - const downloadAndSaveAvatar = async (fileUrl, localFilePath) => { - try { - return new Promise((resolve, reject) => { - console.log('开始下载:', fileUrl) - const dtask = plus.downloader.createDownload(fileUrl, { - filename: localFilePath - }, (d, status) => { - if (status === 200) { - console.log("保存路径:", d.filename) - resolve(d.filename) - } else { - console.error("文件下载失败:", status) - reject(new Error(`下载失败,状态码: ${status}`)) - } - }) - - dtask.start() - }) - } catch (error) { - console.error('创建目录失败:', error) - throw error - } - } +const downloadAndSaveAvatar = async (fileUrl, localFilePath) => { + try { + //#ifdef APP-PLUS + return new Promise((resolve, reject) => { + console.log('开始下载:', fileUrl) + const dtask = plus.downloader.createDownload( + fileUrl, + { + filename: localFilePath + }, + (d, status) => { + if (status === 200) { + console.log('保存路径:', d.filename) + resolve(d.filename) + } else { + console.error('文件下载失败:', status) + reject(new Error(`下载失败,状态码: ${status}`)) + } + } + ) + dtask.start() + }) + // #endif + //#ifdef H5 + return new Promise((resolve, reject) => { + resolve() + }) + // #endif + } catch (error) { + console.error('创建目录失败:', error) + throw error + } +} const feedbackAnswer = params => { talkingList.value.forEach(t => { if (t.seqNo === params.askId) { @@ -758,6 +768,18 @@ const changeAppHeightBottom = height => { bottomHeight.value = systemInfo.screenHeight - systemInfo.safeArea.bottom + 'px' // #endif } + +const deleteFolder = () => { + //#ifdef APP-PLUS + plus.io.resolveLocalFileSystemURL('_doc/pdf_view', function (entry) { + console.log('entry', entry) + entry.removeRecursively(function (res) { + console.log('删除成功') + }) + }) + // #endif +} + //#ifdef APP-PLUS onHide(() => { uni.offKeyboardHeightChange(setHeight) @@ -768,6 +790,7 @@ onShow(() => { // #endif onUnload(() => { watchFlag.value = 1 + deleteFolder() socketStore?.closeSocket() // setupKeyboardHeightListener(changeAppHeightBottom) }) From 376e54f4dd6d1d2819d1f86e7ea1360b34a29190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Wed, 17 Sep 2025 15:48:58 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=80=83=E8=AF=95?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/examination.js | 10 + .../components/examRecordItem.vue | 2 +- .../components/practiceRecordItem.vue | 2 +- .../components/studyRecordItem.vue | 2 +- src/pages/courseRecord/useItemList.js | 3 +- src/pages/learningTasks/details.vue | 3 +- .../testingHall/components/content-item.vue | 1 + src/pages/testingHall/components/content.vue | 88 +---- src/pages/testingHall/details.vue | 304 ++++++++++-------- src/pages/testingHall/index.vue | 58 +--- 11 files changed, 218 insertions(+), 257 deletions(-) diff --git a/.env.development b/.env.development index a48f4b38..db90fd74 100644 --- a/.env.development +++ b/.env.development @@ -24,7 +24,7 @@ VITE_APP_BASE_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:7002' # sit # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.92:9786' diff --git a/src/api/examination.js b/src/api/examination.js index 1f4ee2d3..3cfb371b 100644 --- a/src/api/examination.js +++ b/src/api/examination.js @@ -31,6 +31,16 @@ export const queryPaperExamScore = (data) => { data }); }; +// 根据试卷id查询详情 +export const queryTraExamPapersByPapersId = (data) => { + return request({ + url: base_url + '/traExamPapers/queryTraExamPapersByPapersId', + method: 'post', + toastErrors: true, + data + }); +}; + // ↑↑↑↑↑↑↑↑↑考试中心考试↑↑↑↑↑↑↑ diff --git a/src/pages/courseRecord/components/examRecordItem.vue b/src/pages/courseRecord/components/examRecordItem.vue index 9ccd6920..461dafb2 100644 --- a/src/pages/courseRecord/components/examRecordItem.vue +++ b/src/pages/courseRecord/components/examRecordItem.vue @@ -14,7 +14,7 @@ 历史最高分 - + {{ item.examCnt || 0 }} 答题正确率 - + {{ item.exrCnt || '0' }} 学习时长 - + {{ item.stdyCnt || 0 }} { + const show_list_click = (num = -1) => { + if (num === 0) return; show_list_state.value = !show_list_state.value; if (show_list_state.value) { nextTick(() => { diff --git a/src/pages/learningTasks/details.vue b/src/pages/learningTasks/details.vue index b1498e92..67096ef6 100644 --- a/src/pages/learningTasks/details.vue +++ b/src/pages/learningTasks/details.vue @@ -150,7 +150,6 @@ import { queryAllTraTaskCrsInfo, queryTraTaskInfoByTaskId } from '@/api/learningTasks.js'; import { passTheExamIcon, completeTheExercisesIcon, lockIcon } from '@/common/imgSvg'; import { insertTraPersonalCollectionTask, deleteTraPersonalCollectionById } from '@/api/favorites.js'; - import useZpaging from '@/composables/useZpaging.js'; import common from '@/common/common'; import { getPageCache } from '@/common/common'; @@ -528,7 +527,7 @@ background-position: top; background-color: #fff; } - + .detail_div { height: 250rpx; z-index: 2; diff --git a/src/pages/testingHall/components/content-item.vue b/src/pages/testingHall/components/content-item.vue index 4bee10da..5032cf80 100644 --- a/src/pages/testingHall/components/content-item.vue +++ b/src/pages/testingHall/components/content-item.vue @@ -32,6 +32,7 @@ setPageCache('testing_hall_details', item) common.navigateTo('/pages/testingHall/details'); } + diff --git a/src/pages/testingHall/details.vue b/src/pages/testingHall/details.vue index f4959bf2..bceabeb0 100644 --- a/src/pages/testingHall/details.vue +++ b/src/pages/testingHall/details.vue @@ -1,145 +1,142 @@